diff --git a/aggiorna.sh b/aggiorna.sh old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock index b60144f0..97af440d 100644 --- a/composer.lock +++ b/composer.lock @@ -8,31 +8,31 @@ "packages": [ { "name": "asm89/stack-cors", - "version": "v2.1.1", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/50f57105bad3d97a43ec4a485eb57daf347eafea", + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" + "php": "^7.3|^8.0", + "symfony/http-foundation": "^5.3|^6|^7", + "symfony/http-kernel": "^5.3|^6|^7" }, "require-dev": { - "phpunit/phpunit": "^7|^9", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -58,9 +58,9 @@ ], "support": { "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" + "source": "https://github.com/asm89/stack-cors/tree/v2.2.0" }, - "time": "2022-01-18T09:12:03+00:00" + "time": "2023-11-14T13:51:46+00:00" }, { "name": "automattic/woocommerce", @@ -117,26 +117,25 @@ }, { "name": "brick/math", - "version": "0.9.3", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.9.2" + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "5.0.0" }, "type": "library", "autoload": { @@ -161,39 +160,104 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.3" + "source": "https://github.com/brick/math/tree/0.11.0" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" } ], - "time": "2021-08-15T20:50:18+00:00" + "time": "2023-01-15T23:15:59+00:00" }, { - "name": "codexshaper/laravel-woocommerce", - "version": "v3.0.1", + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", "source": { "type": "git", - "url": "https://github.com/Codexshaper/laravel-woocommerce.git", - "reference": "029741518cbe23ddd5dd780dc209300029538196" + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codexshaper/laravel-woocommerce/zipball/029741518cbe23ddd5dd780dc209300029538196", - "reference": "029741518cbe23ddd5dd780dc209300029538196", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2023-12-11T17:09:12+00:00" + }, + { + "name": "codexshaper/laravel-woocommerce", + "version": "v3.0.4", + "source": { + "type": "git", + "url": "https://github.com/Codexshaper/laravel-woocommerce.git", + "reference": "4b8865d937699ed386818f2188e23ee9926c8100" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codexshaper/laravel-woocommerce/zipball/4b8865d937699ed386818f2188e23ee9926c8100", + "reference": "4b8865d937699ed386818f2188e23ee9926c8100", "shasum": "" }, "require": { "automattic/woocommerce": "^3.0" }, "require-dev": { - "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0", + "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0", "phpunit/phpunit": "^7.0|^8.0|^9.3" }, "type": "library", @@ -226,6 +290,7 @@ "Variation": "Codexshaper\\WooCommerce\\Models\\Variation", "Webhook": "Codexshaper\\WooCommerce\\Facades\\Webhook", "WooCommerce": "Codexshaper\\WooCommerce\\Facades\\WooCommerce", + "WooAnalytics": "Codexshaper\\WooCommerce\\Facades\\WooAnalytics", "Query": "Codexshaper\\WooCommerce\\Facades\\Query" } } @@ -257,34 +322,34 @@ ], "support": { "issues": "https://github.com/Codexshaper/laravel-woocommerce/issues", - "source": "https://github.com/Codexshaper/laravel-woocommerce/tree/v3.0.1" + "source": "https://github.com/Codexshaper/laravel-woocommerce/tree/v3.0.4" }, - "time": "2020-11-12T10:19:30+00:00" + "time": "2024-03-05T11:43:18+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.4", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" }, "type": "library", "autoload": { @@ -334,7 +399,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -350,7 +415,7 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:16:43+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", @@ -562,16 +627,16 @@ }, { "name": "fideloper/proxy", - "version": "4.4.1", + "version": "4.4.2", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", "shasum": "" }, "require": { @@ -581,7 +646,7 @@ "require-dev": { "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5.8|^9.3.3" }, "type": "library", "extra": { @@ -614,9 +679,9 @@ ], "support": { "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" + "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" }, - "time": "2020-10-22T13:48:01+00:00" + "time": "2022-02-09T13:33:34+00:00" }, { "name": "fruitcake/laravel-cors", @@ -695,26 +760,27 @@ "type": "github" } ], + "abandoned": true, "time": "2022-02-23T14:25:13+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -723,10 +789,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -736,8 +803,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "7.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -803,7 +871,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -819,38 +887,37 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -887,7 +954,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -903,26 +970,26 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -930,17 +997,18 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.2-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -1002,7 +1070,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -1018,7 +1086,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "laravel/framework", @@ -1184,38 +1252,36 @@ }, { "name": "laravel/tinker", - "version": "v2.7.2", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "dff39b661e827dae6e092412f976658df82dbac5" + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", - "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -1246,9 +1312,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.2" + "source": "https://github.com/laravel/tinker/tree/v2.9.0" }, - "time": "2022-03-23T12:38:24+00:00" + "time": "2024-01-04T16:10:04+00:00" }, { "name": "league/commonmark", @@ -1345,16 +1411,16 @@ }, { "name": "league/flysystem", - "version": "1.1.9", + "version": "1.1.10", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", "shasum": "" }, "require": { @@ -1427,7 +1493,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" }, "funding": [ { @@ -1435,30 +1501,30 @@ "type": "other" } ], - "time": "2021-12-09T09:40:50+00:00" + "time": "2022-10-04T09:16:37+00:00" }, { "name": "league/mime-type-detection", - "version": "1.11.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, "type": "library", "autoload": { @@ -1479,7 +1545,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -1491,20 +1557,20 @@ "type": "tidelift" } ], - "time": "2022-04-17T13:12:02+00:00" + "time": "2024-01-28T23:22:08+00:00" }, { "name": "monolog/monolog", - "version": "2.5.0", + "version": "2.9.3", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4192345e260f1d51b365536199744b987e160edc" + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", - "reference": "4192345e260f1d51b365536199744b987e160edc", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", "shasum": "" }, "require": { @@ -1517,18 +1583,22 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", - "graylog2/gelf-php": "^1.4.2", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -1543,7 +1613,6 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -1578,7 +1647,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.5.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.3" }, "funding": [ { @@ -1590,38 +1659,45 @@ "type": "tidelift" } ], - "time": "2022-04-08T15:43:54+00:00" + "time": "2024-04-12T20:52:51+00:00" }, { "name": "nesbot/carbon", - "version": "2.57.0", + "version": "2.72.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -1678,37 +1754,43 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], - "time": "2022-02-13T18:13:33+00:00" + "time": "2024-01-25T10:35:09+00:00" }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1716,7 +1798,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1740,9 +1822,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2024-03-05T20:51:40+00:00" }, { "name": "opis/closure", @@ -1811,29 +1893,33 @@ }, { "name": "phpoption/phpoption", - "version": "1.8.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1866,7 +1952,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -1878,7 +1964,55 @@ "type": "tidelift" } ], - "time": "2021-12-04T23:24:31+00:00" + "time": "2023-11-12T21:59:55+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" }, { "name": "psr/container", @@ -1980,21 +2114,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -2014,7 +2148,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -2026,27 +2160,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -2066,10 +2200,10 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -2081,31 +2215,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2120,7 +2254,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -2134,9 +2268,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -2241,39 +2375,36 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", + "version": "v0.12.3", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, "bin": [ "bin/psysh" @@ -2281,7 +2412,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.11.x-dev" + "dev-main": "0.12.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false } }, "autoload": { @@ -2313,9 +2448,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" }, - "time": "2022-02-28T15:28:54+00:00" + "time": "2024-04-02T15:57:53+00:00" }, { "name": "ralouphie/getallheaders", @@ -2363,42 +2498,53 @@ }, { "name": "ramsey/collection", - "version": "1.2.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", "shasum": "" }, "require": { - "php": "^7.3 || ^8", + "php": "^7.4 || ^8.0", "symfony/polyfill-php81": "^1.23" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -2426,7 +2572,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/1.3.0" }, "funding": [ { @@ -2438,28 +2584,27 @@ "type": "tidelift" } ], - "time": "2021-10-10T03:01:02+00:00" + "time": "2022-12-27T19:12:24+00:00" }, { "name": "ramsey/uuid", - "version": "4.3.1", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", - "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", - "ext-ctype": "*", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", - "ramsey/collection": "^1.0" + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -2471,24 +2616,23 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -2520,7 +2664,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.3.1" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -2532,7 +2676,7 @@ "type": "tidelift" } ], - "time": "2022-03-27T21:42:02+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "spatie/db-dumper", @@ -2813,16 +2957,16 @@ }, { "name": "symfony/console", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b" + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", + "url": "https://api.github.com/repos/symfony/console/zipball/f3e591c48688a0cfa1a3296205926c05e84b22b1", + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1", "shasum": "" }, "require": { @@ -2887,12 +3031,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.8" + "source": "https://github.com/symfony/console/tree/v5.4.39" }, "funding": [ { @@ -2908,20 +3052,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T16:02:29+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/css-selector", - "version": "v6.0.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a" + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/1955d595c12c111629cc814d3f2a2ff13580508a", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f1d00bddb83a4cb2138564b2150001cb6ce272b1", + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1", "shasum": "" }, "require": { @@ -2957,7 +3101,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.0.3" + "source": "https://github.com/symfony/css-selector/tree/v6.0.19" }, "funding": [ { @@ -2973,11 +3117,11 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -3024,7 +3168,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -3044,16 +3188,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c1fcde614dfe99d62a83b796a53b8bad358b266a" + "reference": "9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1fcde614dfe99d62a83b796a53b8bad358b266a", - "reference": "c1fcde614dfe99d62a83b796a53b8bad358b266a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd", + "reference": "9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd", "shasum": "" }, "require": { @@ -3095,7 +3239,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.8" + "source": "https://github.com/symfony/error-handler/tree/v5.4.39" }, "funding": [ { @@ -3111,20 +3255,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:48:08+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.3", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { @@ -3178,7 +3322,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -3194,11 +3338,11 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -3257,7 +3401,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -3277,16 +3421,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" + "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", + "url": "https://api.github.com/repos/symfony/finder/zipball/f6a96e4fcd468a25fede16ee665f50ced856bd0a", + "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a", "shasum": "" }, "require": { @@ -3320,7 +3464,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.8" + "source": "https://github.com/symfony/finder/tree/v5.4.39" }, "funding": [ { @@ -3336,20 +3480,20 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:07:45+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2" + "reference": "3356c93efc30b0c85a37606bdfef16b813faec0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2", - "reference": "ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3356c93efc30b0c85a37606bdfef16b813faec0e", + "reference": "3356c93efc30b0c85a37606bdfef16b813faec0e", "shasum": "" }, "require": { @@ -3361,8 +3505,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -3393,7 +3540,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.8" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.39" }, "funding": [ { @@ -3409,20 +3556,20 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:14:12+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "cf7e61106abfc19b305ca0aedc41724ced89a02a" + "reference": "1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/cf7e61106abfc19b305ca0aedc41724ced89a02a", - "reference": "cf7e61106abfc19b305ca0aedc41724ced89a02a", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0", + "reference": "1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0", "shasum": "" }, "require": { @@ -3431,7 +3578,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^4.4|^5.0|^6.0", "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16" @@ -3471,6 +3618,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -3505,7 +3653,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.8" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.39" }, "funding": [ { @@ -3521,20 +3669,20 @@ "type": "tidelift" } ], - "time": "2022-04-27T17:22:21+00:00" + "time": "2024-04-29T11:17:46+00:00" }, { "name": "symfony/mime", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "af49bc163ec3272f677bde3bc44c0d766c1fd662" + "reference": "a5364f016fd9e090f7b4f250a97ea6925a5ca985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/af49bc163ec3272f677bde3bc44c0d766c1fd662", - "reference": "af49bc163ec3272f677bde3bc44c0d766c1fd662", + "url": "https://api.github.com/repos/symfony/mime/zipball/a5364f016fd9e090f7b4f250a97ea6925a5ca985", + "reference": "a5364f016fd9e090f7b4f250a97ea6925a5ca985", "shasum": "" }, "require": { @@ -3548,15 +3696,17 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<4.4", + "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.4", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3" }, "type": "library", "autoload": { @@ -3588,7 +3738,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.8" + "source": "https://github.com/symfony/mime/tree/v5.4.39" }, "funding": [ { @@ -3604,20 +3754,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:48:08+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -3631,9 +3781,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3670,7 +3817,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -3686,20 +3833,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f", + "reference": "cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f", "shasum": "" }, "require": { @@ -3713,9 +3860,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3753,7 +3897,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.29.0" }, "funding": [ { @@ -3769,20 +3913,20 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -3793,9 +3937,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3834,7 +3975,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -3850,20 +3991,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -3876,9 +4017,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3921,7 +4059,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -3937,20 +4075,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -3961,9 +4099,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4005,7 +4140,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -4021,20 +4156,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4048,9 +4183,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4088,7 +4220,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4104,20 +4236,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -4125,9 +4257,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4164,7 +4293,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -4180,20 +4309,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { @@ -4201,9 +4330,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4243,7 +4369,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" }, "funding": [ { @@ -4259,20 +4385,20 @@ "type": "tidelift" } ], - "time": "2021-06-05T21:20:04+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -4280,9 +4406,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4326,7 +4449,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -4342,20 +4465,20 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -4363,9 +4486,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4405,7 +4525,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -4421,20 +4541,20 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3" + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", + "url": "https://api.github.com/repos/symfony/process/zipball/85a554acd7c28522241faf2e97b9541247a0d3d5", + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5", "shasum": "" }, "require": { @@ -4467,7 +4587,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.8" + "source": "https://github.com/symfony/process/tree/v5.4.39" }, "funding": [ { @@ -4483,20 +4603,20 @@ "type": "tidelift" } ], - "time": "2022-04-08T05:07:18+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/routing", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7" + "reference": "5485974ef20de1150dd195a81e9da4915d45263f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", + "url": "https://api.github.com/repos/symfony/routing/zipball/5485974ef20de1150dd195a81e9da4915d45263f", + "reference": "5485974ef20de1150dd195a81e9da4915d45263f", "shasum": "" }, "require": { @@ -4511,7 +4631,7 @@ "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", "symfony/config": "^5.3|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", @@ -4557,7 +4677,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.8" + "source": "https://github.com/symfony/routing/tree/v5.4.39" }, "funding": [ { @@ -4573,20 +4693,20 @@ "type": "tidelift" } ], - "time": "2022-04-18T21:45:37+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.1", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -4640,7 +4760,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -4656,20 +4776,20 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/string", - "version": "v6.0.8", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { @@ -4725,7 +4845,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.8" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -4741,20 +4861,20 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation", - "version": "v6.0.8", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "3d38cf8f8834148c4457681d539bc204de701501" + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/3d38cf8f8834148c4457681d539bc204de701501", - "reference": "3d38cf8f8834148c4457681d539bc204de701501", + "url": "https://api.github.com/repos/symfony/translation/zipball/9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", "shasum": "" }, "require": { @@ -4820,7 +4940,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.8" + "source": "https://github.com/symfony/translation/tree/v6.0.19" }, "funding": [ { @@ -4836,20 +4956,20 @@ "type": "tidelift" } ], - "time": "2022-04-22T08:18:02+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9" + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", "shasum": "" }, "require": { @@ -4898,7 +5018,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" }, "funding": [ { @@ -4914,20 +5034,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-06-27T17:10:44+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.8", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053" + "reference": "1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cdcadd343d31ad16fc5e006b0de81ea307435053", - "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e", + "reference": "1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e", "shasum": "" }, "require": { @@ -4936,12 +5056,12 @@ "symfony/polyfill-php80": "^1.16" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", "symfony/console": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -4987,7 +5107,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.39" }, "funding": [ { @@ -5003,27 +5123,27 @@ "type": "tidelift" } ], - "time": "2022-04-26T13:19:20+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.4", + "version": "v2.2.7", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" @@ -5054,22 +5174,22 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" }, - "time": "2021-12-08T09:12:39+00:00" + "time": "2023-12-08T13:03:43+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v4.2.2", + "version": "v4.3.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc" + "reference": "67a491df68208bef8c37092db11fa3885008efcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/77e974614d2ead521f18069dccc571696f52b8dc", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", + "reference": "67a491df68208bef8c37092db11fa3885008efcf", "shasum": "" }, "require": { @@ -5081,7 +5201,7 @@ "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -5089,8 +5209,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -5122,7 +5246,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.2" + "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" }, "funding": [ { @@ -5134,7 +5258,7 @@ "type": "tidelift" } ], - "time": "2021-12-12T23:07:53+00:00" + "time": "2022-10-16T00:51:09+00:00" }, { "name": "voku/portable-ascii", @@ -5214,30 +5338,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -5264,7 +5388,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -5280,20 +5404,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "facade/flare-client-php", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", "shasum": "" }, "require": { @@ -5306,7 +5430,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", + "phpunit/phpunit": "^7.5", "spatie/phpunit-snapshot-assertions": "^2.0" }, "type": "library", @@ -5337,7 +5461,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" + "source": "https://github.com/facade/flare-client-php/tree/1.10.0" }, "funding": [ { @@ -5345,20 +5469,20 @@ "type": "github" } ], - "time": "2021-09-13T12:16:46+00:00" + "time": "2022-08-09T11:23:57+00:00" }, { "name": "facade/ignition", - "version": "2.17.5", + "version": "2.17.7", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c" + "reference": "b4f5955825bb4b74cba0f94001761c46335c33e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d71996f83c9a5a7807331b8986ac890352b7a0c", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c", + "url": "https://api.github.com/repos/facade/ignition/zipball/b4f5955825bb4b74cba0f94001761c46335c33e9", + "reference": "b4f5955825bb4b74cba0f94001761c46335c33e9", "shasum": "" }, "require": { @@ -5423,7 +5547,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2022-02-23T18:31:24+00:00" + "time": "2023-01-26T12:34:59+00:00" }, { "name": "facade/ignition-contracts", @@ -5480,20 +5604,20 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -5504,7 +5628,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -5514,11 +5639,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.19-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -5541,22 +5661,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2022-02-02T17:38:57+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "filp/whoops", - "version": "2.14.5", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -5606,7 +5726,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.5" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -5614,7 +5734,7 @@ "type": "github" } ], - "time": "2022-01-07T12:00:00+00:00" + "time": "2023-11-03T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -5669,38 +5789,38 @@ }, { "name": "mockery/mockery", - "version": "1.5.0", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -5711,12 +5831,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -5734,23 +5862,26 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2022-01-20T13:18:17+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -5788,7 +5919,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -5796,7 +5927,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nunomaduro/collision", @@ -5888,20 +6019,21 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -5942,9 +6074,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -5997,252 +6135,25 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -6257,8 +6168,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -6291,7 +6202,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -6299,7 +6211,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6544,20 +6456,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.20", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -6568,31 +6480,26 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -6600,7 +6507,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -6631,7 +6538,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -6641,22 +6549,26 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-04-01T12:37:26+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -6691,7 +6603,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -6699,7 +6611,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -6814,16 +6726,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -6876,7 +6788,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -6884,24 +6796,24 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -6933,7 +6845,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -6941,20 +6853,20 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -6999,7 +6911,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -7007,20 +6919,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -7062,7 +6974,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -7070,20 +6982,20 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -7139,7 +7051,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -7147,20 +7059,20 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -7203,7 +7115,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -7211,24 +7123,24 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -7260,7 +7172,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -7268,7 +7180,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -7384,16 +7296,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -7432,10 +7344,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -7443,20 +7355,20 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -7468,7 +7380,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7489,8 +7401,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -7498,20 +7409,20 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -7523,7 +7434,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -7546,7 +7457,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -7554,7 +7465,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -7611,16 +7522,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -7649,7 +7560,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -7657,65 +7568,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], diff --git a/composer_update.sh b/composer_update.sh new file mode 100755 index 00000000..bf0dc62e --- /dev/null +++ b/composer_update.sh @@ -0,0 +1,2 @@ +/usr/bin/php8.2 /usr/local/bin/composer update + diff --git a/run_provapao.sh b/run_provapao.sh new file mode 100755 index 00000000..94bc864d --- /dev/null +++ b/run_provapao.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./aggiorna.sh +sudo php artisan product:testpao + diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore deleted file mode 100755 index d6b7ef32..00000000 --- a/storage/logs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/logs/laravel-2024-05-17.log b/storage/logs/laravel-2024-05-17.log new file mode 100644 index 00000000..2afa234a --- /dev/null +++ b/storage/logs/laravel-2024-05-17.log @@ -0,0 +1,2677 @@ +[2024-05-17 13:40:02] local.INFO: Running order:gmupdate command +[2024-05-17 13:40:09] local.INFO: Running product:updateqta command +[2024-05-17 13:44:02] local.INFO: Controllo schedule... +[2024-05-17 13:45:00] local.ERROR: The stream or file "/var/www/html/apimacro/storage/logs/testpao-2024-05-17.log" could not be opened in append mode: Failed to open stream: Permission denied +The exception occurred while attempting to log: Articoli: +Quanti Articoli: 0\nCodice: 3500 QtaDisp: -4 DataOra: 2024-05-17 13:20:01.433 +Codice: 9264 QtaDisp: 344 DataOra: 2024-05-17 13:20:01.433 +Codice: 12167 QtaDisp: 46 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 30812, + "name": "Formicaio - Nuovo", + "slug": "formicaio-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/formicaio\/?attribute_pa_versione=nuovo", + "date_created": "2022-03-20T14:34:15", + "date_created_gmt": "2022-03-20T13:34:15", + "date_modified": "2024-05-17T13:33:47", + "date_modified_gmt": "2024-05-17T11:33:47", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "12167", + "price": "12.0000", + "regular_price": "12.0000", + "sale_price": "", + "date_on_sale_from": null, + "date_on_sale_from_gmt": null, + "date_on_sale_to": null, + "date_on_sale_to_gmt": null, + "on_sale": false, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 46, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 30811, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 34926, + "date_created": "2022-03-21T08:46:59", + "date_created_gmt": "2022-03-21T06:46:59", + "date_modified": "2022-03-21T08:46:59", + "date_modified_gmt": "2022-03-21T06:46:59", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/03\/il-formicaio.jpg", + "name": "il-formicaio.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "12,00€<\/span><\/bdi><\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 143749, + "key": "ISBN", + "value": "9788828503569" + }, + { + "id": 143750, + "key": "misure", + "value": "cm 22x22" + }, + { + "id": 143751, + "key": "formato", + "value": "Cartonato" + }, + { + "id": 143752, + "key": "pagine", + "value": "16" + }, + { + "id": 143753, + "key": "edizione", + "value": "1\u00b0 Novembre 2019" + }, + { + "id": 1083274, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1702940592, + "payload": [] + } + } + }, + { + "id": 1113836, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1113851, + "key": "_wc_gla_synced_at", + "value": "1714126419" + }, + { + "id": 1113852, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_30812" + } + }, + { + "id": 1307441, + "key": "_rank_math_gtin_code", + "value": "9788828503569" + }, + { + "id": 1307442, + "key": "_wc_gla_gtin", + "value": "9788828503569" + }, + { + "id": 1312978, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/30812" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/30811" + } + ] + } +} +Codice: 14230 QtaDisp: 773 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 25211, + "name": "Mandala per Guarire - Nuovo", + "slug": "mandala-per-guarire-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/?post_type=product&p=25210&attribute_pa_versione=nuovo", + "date_created": "2021-12-17T11:57:57", + "date_created_gmt": "2021-12-17T10:57:57", + "date_modified": "2024-05-17T13:28:41", + "date_modified_gmt": "2024-05-17T11:28:41", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14230", + "price": "13.7750", + "regular_price": "14.5000", + "sale_price": "13.7750", + "date_on_sale_from": "2023-12-04T00:00:00", + "date_on_sale_from_gmt": "2023-12-03T23:00:00", + "date_on_sale_to": "2099-12-31T00:00:00", + "date_on_sale_to_gmt": "2099-12-30T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 773, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 25210, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 28076, + "date_created": "2022-02-02T09:48:33", + "date_created_gmt": "2022-02-02T07:48:33", + "date_modified": "2022-02-02T09:48:33", + "date_modified_gmt": "2022-02-02T07:48:33", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/02\/mandala-per-guarire.jpg", + "name": "mandala-per-guarire.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 14,50€.<\/span>13,78€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 13,78€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 75361, + "key": "ISBN", + "value": "9788865933503" + }, + { + "id": 116824, + "key": "pagine", + "value": "288" + }, + { + "id": 116825, + "key": "edizione", + "value": "2\u00b0 ed agg. Maggio 20" + }, + { + "id": 116826, + "key": "misure", + "value": "cm 22x24" + }, + { + "id": 116827, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1083214, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1703695891, + "payload": [] + } + } + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/25211" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/25210" + } + ] + } +} +Codice: 14313 QtaDisp: 1792 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 29988, + "name": "L'Alveare - Nuovo", + "slug": "alveare-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/alveare\/?attribute_pa_versione=nuovo", + "date_created": "2022-03-20T13:51:59", + "date_created_gmt": "2022-03-20T12:51:59", + "date_modified": "2024-05-17T13:31:27", + "date_modified_gmt": "2024-05-17T11:31:27", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14313", + "price": "14.5000", + "regular_price": "14.5000", + "sale_price": "", + "date_on_sale_from": null, + "date_on_sale_from_gmt": null, + "date_on_sale_to": null, + "date_on_sale_to_gmt": null, + "on_sale": false, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 1792, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 29987, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 35224, + "date_created": "2022-03-21T10:38:31", + "date_created_gmt": "2022-03-21T08:38:31", + "date_modified": "2022-03-21T10:38:31", + "date_modified_gmt": "2022-03-21T08:38:31", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/03\/l-alveare-20100.jpg", + "name": "l-alveare-20100.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,50€<\/span><\/bdi><\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 122624, + "key": "ISBN", + "value": "9788865933596" + }, + { + "id": 122625, + "key": "misure", + "value": "cm 21x22" + }, + { + "id": 122626, + "key": "formato", + "value": "Cartonato" + }, + { + "id": 122627, + "key": "pagine", + "value": "16" + }, + { + "id": 122628, + "key": "edizione", + "value": "" + }, + { + "id": 1082986, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1702940953, + "payload": [] + } + } + }, + { + "id": 1111071, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1111094, + "key": "_wc_gla_synced_at", + "value": "1714126405" + }, + { + "id": 1111095, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_29988" + } + }, + { + "id": 1307671, + "key": "_rank_math_gtin_code", + "value": "9788865933596" + }, + { + "id": 1307672, + "key": "_wc_gla_gtin", + "value": "9788865933596" + }, + { + "id": 1312925, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/29988" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/29987" + } + ] + } +} +Codice: 14417 QtaDisp: 1603 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 24303, + "name": "Colorpedia Degli Animali - Nuovo", + "slug": "colorpedia-degli-animali-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/colorpedia-degli-animali\/?attribute_pa_versione=nuovo", + "date_created": "2021-12-17T11:20:38", + "date_created_gmt": "2021-12-17T10:20:38", + "date_modified": "2024-05-17T13:31:07", + "date_modified_gmt": "2024-05-17T11:31:07", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14417", + "price": "10.9250", + "regular_price": "11.5000", + "sale_price": "10.9250", + "date_on_sale_from": "2024-05-08T00:00:00", + "date_on_sale_from_gmt": "2024-05-07T22:00:00", + "date_on_sale_to": "2099-05-08T00:00:00", + "date_on_sale_to_gmt": "2099-05-07T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 1603, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 24302, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 28398, + "date_created": "2022-02-02T10:13:49", + "date_created_gmt": "2022-02-02T08:13:49", + "date_modified": "2022-02-02T10:13:49", + "date_modified_gmt": "2022-02-02T08:13:49", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/02\/colorpedia-degli-animali1.jpg", + "name": "colorpedia-degli-animali1.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "11,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 11,50€.<\/span>10,93€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 10,93€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 53782, + "key": "ISBN", + "value": "9788865933633" + }, + { + "id": 119546, + "key": "pagine", + "value": "96" + }, + { + "id": 119547, + "key": "edizione", + "value": "" + }, + { + "id": 119548, + "key": "misure", + "value": "cm 22x24,5" + }, + { + "id": 119549, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1108313, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1108360, + "key": "_wc_gla_synced_at", + "value": "1714126349" + }, + { + "id": 1108361, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_24303" + } + }, + { + "id": 1308702, + "key": "_rank_math_gtin_code", + "value": "9788865933633" + }, + { + "id": 1308703, + "key": "_wc_gla_gtin", + "value": "9788865933633" + }, + { + "id": 1312697, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/24303" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/24302" + } + ] + } +} +Codice: 16702 QtaDisp: 950 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 46843, + "name": "Il tuo corpo in equilibrio - Nuovo", + "slug": "body-into-balance-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/il-tuo-corpo-in-equilibrio\/?attribute_pa_versione=nuovo", + "date_created": "2023-05-05T02:09:49", + "date_created_gmt": "2023-05-05T00:09:49", + "date_modified": "2024-05-17T13:29:30", + "date_modified_gmt": "2024-05-17T11:29:30", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "16702", + "price": "29.9250", + "regular_price": "31.5000", + "sale_price": "29.9250", + "date_on_sale_from": "2024-03-15T00:00:00", + "date_on_sale_from_gmt": "2024-03-14T23:00:00", + "date_on_sale_to": "2099-03-15T00:00:00", + "date_on_sale_to_gmt": "2099-03-14T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 951, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 46842, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 64869, + "date_created": "2024-05-07T14:31:52", + "date_created_gmt": "2024-05-07T10:31:52", + "date_modified": "2024-05-07T14:31:52", + "date_modified_gmt": "2024-05-07T10:31:52", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/05\/corpo-in-equilibrio.jpg", + "name": "corpo-in-equilibrio", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "31,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 31,50€.<\/span>29,93€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 29,93€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 378967, + "key": "ISBN", + "value": "9788828528302" + }, + { + "id": 378968, + "key": "misure", + "value": "" + }, + { + "id": 378969, + "key": "formato", + "value": "Brossura" + }, + { + "id": 378970, + "key": "pagine", + "value": "" + }, + { + "id": 378971, + "key": "edizione", + "value": "" + }, + { + "id": 378972, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/46843" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/46842" + } + ] + } +} +Codice: 17652 QtaDisp: 3015 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 54099, + "name": "The miracle morning - Nuovo", + "slug": "miracle-morning-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/the-miracle-morning-2\/?attribute_pa_versione=nuovo", + "date_created": "2023-08-26T02:10:26", + "date_created_gmt": "2023-08-26T00:10:26", + "date_modified": "2024-05-17T13:31:55", + "date_modified_gmt": "2024-05-17T11:31:55", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "17652", + "price": "19.0000", + "regular_price": "20.0000", + "sale_price": "19.0000", + "date_on_sale_from": "2024-05-02T00:00:00", + "date_on_sale_from_gmt": "2024-05-01T22:00:00", + "date_on_sale_to": "2099-05-02T00:00:00", + "date_on_sale_to_gmt": "2099-05-01T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 3016, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 54098, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 65084, + "date_created": "2024-05-14T13:53:53", + "date_created_gmt": "2024-05-14T09:53:53", + "date_modified": "2024-05-14T13:53:53", + "date_modified_gmt": "2024-05-14T09:53:53", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/08\/the-miracle-morning-2-600x600-1.webp", + "name": "the-miracle-morning-2-600×600", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "20,00€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 20,00€.<\/span>19,00€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 19,00€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 450891, + "key": "ISBN", + "value": "9788828506720" + }, + { + "id": 450892, + "key": "misure", + "value": "" + }, + { + "id": 450893, + "key": "pagine", + "value": "" + }, + { + "id": 450894, + "key": "edizione", + "value": "" + }, + { + "id": 450895, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/54099" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/54098" + } + ] + } +} +Codice: 20862 QtaDisp: 456 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 59015, + "name": "Il Caso Majorana Pelizza - Nuovo", + "slug": "caso-majorana-pelizza-nuovo-2", + "permalink": "https:\/\/www.fioredellavita.it\/il-caso-majorana-pelizza\/?attribute_pa_versione=nuovo", + "date_created": "2024-01-17T02:07:12", + "date_created_gmt": "2024-01-17T01:07:12", + "date_modified": "2024-05-17T13:26:22", + "date_modified_gmt": "2024-05-17T11:26:22", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "20862", + "price": "23.6550", + "regular_price": "24.9000", + "sale_price": "23.6550", + "date_on_sale_from": "2023-10-03T00:00:00", + "date_on_sale_from_gmt": "2023-10-02T22:00:00", + "date_on_sale_to": "2099-10-03T00:00:00", + "date_on_sale_to_gmt": "2099-10-02T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 457, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 59014, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 58169, + "date_created": "2023-12-29T18:10:46", + "date_created_gmt": "2023-12-29T16:10:46", + "date_modified": "2023-12-29T18:11:13", + "date_modified_gmt": "2023-12-29T16:11:13", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/05\/caso-majorana-pelizza.jpg", + "name": "caso-majorana-pelizza", + "alt": "majorana pelizza - rino di stefano" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "24,90€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 24,90€.<\/span>23,66€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 23,66€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 1114351, + "key": "ISBN", + "value": "9788828510079" + }, + { + "id": 1114352, + "key": "misure", + "value": "cm 13,5x20,5" + }, + { + "id": 1114353, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1114354, + "key": "pagine", + "value": "528" + }, + { + "id": 1114355, + "key": "edizione", + "value": "" + }, + { + "id": 1114356, + "key": "ristampa", + "value": "" + }, + { + "id": 1249854, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1295790, + "key": "_wc_gla_synced_at", + "value": "1714126716" + }, + { + "id": 1295791, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_59015" + } + }, + { + "id": 1305104, + "key": "_rank_math_gtin_code", + "value": "9788828510079" + }, + { + "id": 1305105, + "key": "_wc_gla_gtin", + "value": "9788828510079" + }, + { + "id": 1314896, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59015" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59014" + } + ] + } +} +Codice: 21568 QtaDisp: 568 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 59512, + "name": "Il piccolo libro del lasciar andare - Nuovo", + "slug": "il-piccolo-libro-del-lasciar-andare-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/il-piccolo-libro-del-lasciar-andare\/?attribute_pa_versione=nuovo", + "date_created": "2024-01-24T02:07:50", + "date_created_gmt": "2024-01-24T01:07:50", + "date_modified": "2024-05-17T13:27:27", + "date_modified_gmt": "2024-05-17T11:27:27", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "21568", + "price": "14.1550", + "regular_price": "14.9000", + "sale_price": "14.1550", + "date_on_sale_from": "2024-04-24T00:00:00", + "date_on_sale_from_gmt": "2024-04-23T22:00:00", + "date_on_sale_to": "2099-04-24T00:00:00", + "date_on_sale_to_gmt": "2099-04-23T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 569, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 59511, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 64973, + "date_created": "2024-05-09T13:34:57", + "date_created_gmt": "2024-05-09T09:34:57", + "date_modified": "2024-05-09T13:34:57", + "date_modified_gmt": "2024-05-09T09:34:57", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2024\/01\/il-piccolo-libro-del-lasciar-andare.jpg", + "name": "il-piccolo-libro-del-lasciar-andare", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,90€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 14,90€.<\/span>14,16€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 14,16€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 1123381, + "key": "ISBN", + "value": "9788828511694" + }, + { + "id": 1123382, + "key": "misure", + "value": "cm 14x20" + }, + { + "id": 1123383, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1123384, + "key": "pagine", + "value": "168" + }, + { + "id": 1123385, + "key": "edizione", + "value": "" + }, + { + "id": 1123386, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59512" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59511" + } + ] + } +} + {"exception":"[object] (UnexpectedValueException(code: 0): The stream or file \"/var/www/html/apimacro/storage/logs/testpao-2024-05-17.log\" could not be opened in append mode: Failed to open stream: Permission denied +The exception occurred while attempting to log: Articoli: +Quanti Articoli: 0\\nCodice: 3500 QtaDisp: -4 DataOra: 2024-05-17 13:20:01.433 +Codice: 9264 QtaDisp: 344 DataOra: 2024-05-17 13:20:01.433 +Codice: 12167 QtaDisp: 46 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 30812, + \"name\": \"Formicaio - Nuovo\", + \"slug\": \"formicaio-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/formicaio\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2022-03-20T14:34:15\", + \"date_created_gmt\": \"2022-03-20T13:34:15\", + \"date_modified\": \"2024-05-17T13:33:47\", + \"date_modified_gmt\": \"2024-05-17T11:33:47\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"12167\", + \"price\": \"12.0000\", + \"regular_price\": \"12.0000\", + \"sale_price\": \"\", + \"date_on_sale_from\": null, + \"date_on_sale_from_gmt\": null, + \"date_on_sale_to\": null, + \"date_on_sale_to_gmt\": null, + \"on_sale\": false, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 46, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 30811, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 34926, + \"date_created\": \"2022-03-21T08:46:59\", + \"date_created_gmt\": \"2022-03-21T06:46:59\", + \"date_modified\": \"2022-03-21T08:46:59\", + \"date_modified_gmt\": \"2022-03-21T06:46:59\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2022\\/03\\/il-formicaio.jpg\", + \"name\": \"il-formicaio.jpg\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"12,00€<\\/span><\\/bdi><\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 143749, + \"key\": \"ISBN\", + \"value\": \"9788828503569\" + }, + { + \"id\": 143750, + \"key\": \"misure\", + \"value\": \"cm 22x22\" + }, + { + \"id\": 143751, + \"key\": \"formato\", + \"value\": \"Cartonato\" + }, + { + \"id\": 143752, + \"key\": \"pagine\", + \"value\": \"16\" + }, + { + \"id\": 143753, + \"key\": \"edizione\", + \"value\": \"1\\u00b0 Novembre 2019\" + }, + { + \"id\": 1083274, + \"key\": \"_jetpack_related_posts_cache\", + \"value\": { + \"67696d537e07ad54368a45e6e9a79fd6\": { + \"expires\": 1702940592, + \"payload\": [] + } + } + }, + { + \"id\": 1113836, + \"key\": \"_wc_gla_sync_status\", + \"value\": \"synced\" + }, + { + \"id\": 1113851, + \"key\": \"_wc_gla_synced_at\", + \"value\": \"1714126419\" + }, + { + \"id\": 1113852, + \"key\": \"_wc_gla_google_ids\", + \"value\": { + \"IT\": \"online:it:IT:gla_30812\" + } + }, + { + \"id\": 1307441, + \"key\": \"_rank_math_gtin_code\", + \"value\": \"9788828503569\" + }, + { + \"id\": 1307442, + \"key\": \"_wc_gla_gtin\", + \"value\": \"9788828503569\" + }, + { + \"id\": 1312978, + \"key\": \"_wc_gla_mc_status\", + \"value\": \"disapproved\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/30812\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/30811\" + } + ] + } +} +Codice: 14230 QtaDisp: 773 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 25211, + \"name\": \"Mandala per Guarire - Nuovo\", + \"slug\": \"mandala-per-guarire-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/?post_type=product&p=25210&attribute_pa_versione=nuovo\", + \"date_created\": \"2021-12-17T11:57:57\", + \"date_created_gmt\": \"2021-12-17T10:57:57\", + \"date_modified\": \"2024-05-17T13:28:41\", + \"date_modified_gmt\": \"2024-05-17T11:28:41\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"14230\", + \"price\": \"13.7750\", + \"regular_price\": \"14.5000\", + \"sale_price\": \"13.7750\", + \"date_on_sale_from\": \"2023-12-04T00:00:00\", + \"date_on_sale_from_gmt\": \"2023-12-03T23:00:00\", + \"date_on_sale_to\": \"2099-12-31T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-12-30T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 773, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 25210, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 28076, + \"date_created\": \"2022-02-02T09:48:33\", + \"date_created_gmt\": \"2022-02-02T07:48:33\", + \"date_modified\": \"2022-02-02T09:48:33\", + \"date_modified_gmt\": \"2022-02-02T07:48:33\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2022\\/02\\/mandala-per-guarire.jpg\", + \"name\": \"mandala-per-guarire.jpg\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"14,50€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 14,50€.<\\/span>13,78€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 13,78€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 75361, + \"key\": \"ISBN\", + \"value\": \"9788865933503\" + }, + { + \"id\": 116824, + \"key\": \"pagine\", + \"value\": \"288\" + }, + { + \"id\": 116825, + \"key\": \"edizione\", + \"value\": \"2\\u00b0 ed agg. Maggio 20\" + }, + { + \"id\": 116826, + \"key\": \"misure\", + \"value\": \"cm 22x24\" + }, + { + \"id\": 116827, + \"key\": \"formato\", + \"value\": \"Brossura\" + }, + { + \"id\": 1083214, + \"key\": \"_jetpack_related_posts_cache\", + \"value\": { + \"67696d537e07ad54368a45e6e9a79fd6\": { + \"expires\": 1703695891, + \"payload\": [] + } + } + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/25211\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/25210\" + } + ] + } +} +Codice: 14313 QtaDisp: 1792 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 29988, + \"name\": \"L'Alveare - Nuovo\", + \"slug\": \"alveare-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/alveare\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2022-03-20T13:51:59\", + \"date_created_gmt\": \"2022-03-20T12:51:59\", + \"date_modified\": \"2024-05-17T13:31:27\", + \"date_modified_gmt\": \"2024-05-17T11:31:27\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"14313\", + \"price\": \"14.5000\", + \"regular_price\": \"14.5000\", + \"sale_price\": \"\", + \"date_on_sale_from\": null, + \"date_on_sale_from_gmt\": null, + \"date_on_sale_to\": null, + \"date_on_sale_to_gmt\": null, + \"on_sale\": false, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 1792, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 29987, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 35224, + \"date_created\": \"2022-03-21T10:38:31\", + \"date_created_gmt\": \"2022-03-21T08:38:31\", + \"date_modified\": \"2022-03-21T10:38:31\", + \"date_modified_gmt\": \"2022-03-21T08:38:31\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2022\\/03\\/l-alveare-20100.jpg\", + \"name\": \"l-alveare-20100.jpg\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"14,50€<\\/span><\\/bdi><\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 122624, + \"key\": \"ISBN\", + \"value\": \"9788865933596\" + }, + { + \"id\": 122625, + \"key\": \"misure\", + \"value\": \"cm 21x22\" + }, + { + \"id\": 122626, + \"key\": \"formato\", + \"value\": \"Cartonato\" + }, + { + \"id\": 122627, + \"key\": \"pagine\", + \"value\": \"16\" + }, + { + \"id\": 122628, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 1082986, + \"key\": \"_jetpack_related_posts_cache\", + \"value\": { + \"67696d537e07ad54368a45e6e9a79fd6\": { + \"expires\": 1702940953, + \"payload\": [] + } + } + }, + { + \"id\": 1111071, + \"key\": \"_wc_gla_sync_status\", + \"value\": \"synced\" + }, + { + \"id\": 1111094, + \"key\": \"_wc_gla_synced_at\", + \"value\": \"1714126405\" + }, + { + \"id\": 1111095, + \"key\": \"_wc_gla_google_ids\", + \"value\": { + \"IT\": \"online:it:IT:gla_29988\" + } + }, + { + \"id\": 1307671, + \"key\": \"_rank_math_gtin_code\", + \"value\": \"9788865933596\" + }, + { + \"id\": 1307672, + \"key\": \"_wc_gla_gtin\", + \"value\": \"9788865933596\" + }, + { + \"id\": 1312925, + \"key\": \"_wc_gla_mc_status\", + \"value\": \"disapproved\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/29988\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/29987\" + } + ] + } +} +Codice: 14417 QtaDisp: 1603 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 24303, + \"name\": \"Colorpedia Degli Animali - Nuovo\", + \"slug\": \"colorpedia-degli-animali-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/colorpedia-degli-animali\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2021-12-17T11:20:38\", + \"date_created_gmt\": \"2021-12-17T10:20:38\", + \"date_modified\": \"2024-05-17T13:31:07\", + \"date_modified_gmt\": \"2024-05-17T11:31:07\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"14417\", + \"price\": \"10.9250\", + \"regular_price\": \"11.5000\", + \"sale_price\": \"10.9250\", + \"date_on_sale_from\": \"2024-05-08T00:00:00\", + \"date_on_sale_from_gmt\": \"2024-05-07T22:00:00\", + \"date_on_sale_to\": \"2099-05-08T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-05-07T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 1603, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 24302, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 28398, + \"date_created\": \"2022-02-02T10:13:49\", + \"date_created_gmt\": \"2022-02-02T08:13:49\", + \"date_modified\": \"2022-02-02T10:13:49\", + \"date_modified_gmt\": \"2022-02-02T08:13:49\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2022\\/02\\/colorpedia-degli-animali1.jpg\", + \"name\": \"colorpedia-degli-animali1.jpg\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"11,50€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 11,50€.<\\/span>10,93€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 10,93€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 53782, + \"key\": \"ISBN\", + \"value\": \"9788865933633\" + }, + { + \"id\": 119546, + \"key\": \"pagine\", + \"value\": \"96\" + }, + { + \"id\": 119547, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 119548, + \"key\": \"misure\", + \"value\": \"cm 22x24,5\" + }, + { + \"id\": 119549, + \"key\": \"formato\", + \"value\": \"Brossura\" + }, + { + \"id\": 1108313, + \"key\": \"_wc_gla_sync_status\", + \"value\": \"synced\" + }, + { + \"id\": 1108360, + \"key\": \"_wc_gla_synced_at\", + \"value\": \"1714126349\" + }, + { + \"id\": 1108361, + \"key\": \"_wc_gla_google_ids\", + \"value\": { + \"IT\": \"online:it:IT:gla_24303\" + } + }, + { + \"id\": 1308702, + \"key\": \"_rank_math_gtin_code\", + \"value\": \"9788865933633\" + }, + { + \"id\": 1308703, + \"key\": \"_wc_gla_gtin\", + \"value\": \"9788865933633\" + }, + { + \"id\": 1312697, + \"key\": \"_wc_gla_mc_status\", + \"value\": \"disapproved\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/24303\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/24302\" + } + ] + } +} +Codice: 16702 QtaDisp: 950 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 46843, + \"name\": \"Il tuo corpo in equilibrio - Nuovo\", + \"slug\": \"body-into-balance-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/il-tuo-corpo-in-equilibrio\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2023-05-05T02:09:49\", + \"date_created_gmt\": \"2023-05-05T00:09:49\", + \"date_modified\": \"2024-05-17T13:29:30\", + \"date_modified_gmt\": \"2024-05-17T11:29:30\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"16702\", + \"price\": \"29.9250\", + \"regular_price\": \"31.5000\", + \"sale_price\": \"29.9250\", + \"date_on_sale_from\": \"2024-03-15T00:00:00\", + \"date_on_sale_from_gmt\": \"2024-03-14T23:00:00\", + \"date_on_sale_to\": \"2099-03-15T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-03-14T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 951, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 46842, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 64869, + \"date_created\": \"2024-05-07T14:31:52\", + \"date_created_gmt\": \"2024-05-07T10:31:52\", + \"date_modified\": \"2024-05-07T14:31:52\", + \"date_modified_gmt\": \"2024-05-07T10:31:52\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2023\\/05\\/corpo-in-equilibrio.jpg\", + \"name\": \"corpo-in-equilibrio\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"31,50€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 31,50€.<\\/span>29,93€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 29,93€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 378967, + \"key\": \"ISBN\", + \"value\": \"9788828528302\" + }, + { + \"id\": 378968, + \"key\": \"misure\", + \"value\": \"\" + }, + { + \"id\": 378969, + \"key\": \"formato\", + \"value\": \"Brossura\" + }, + { + \"id\": 378970, + \"key\": \"pagine\", + \"value\": \"\" + }, + { + \"id\": 378971, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 378972, + \"key\": \"ristampa\", + \"value\": \"\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/46843\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/46842\" + } + ] + } +} +Codice: 17652 QtaDisp: 3015 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 54099, + \"name\": \"The miracle morning - Nuovo\", + \"slug\": \"miracle-morning-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/the-miracle-morning-2\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2023-08-26T02:10:26\", + \"date_created_gmt\": \"2023-08-26T00:10:26\", + \"date_modified\": \"2024-05-17T13:31:55\", + \"date_modified_gmt\": \"2024-05-17T11:31:55\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"17652\", + \"price\": \"19.0000\", + \"regular_price\": \"20.0000\", + \"sale_price\": \"19.0000\", + \"date_on_sale_from\": \"2024-05-02T00:00:00\", + \"date_on_sale_from_gmt\": \"2024-05-01T22:00:00\", + \"date_on_sale_to\": \"2099-05-02T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-05-01T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 3016, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 54098, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 65084, + \"date_created\": \"2024-05-14T13:53:53\", + \"date_created_gmt\": \"2024-05-14T09:53:53\", + \"date_modified\": \"2024-05-14T13:53:53\", + \"date_modified_gmt\": \"2024-05-14T09:53:53\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2023\\/08\\/the-miracle-morning-2-600x600-1.webp\", + \"name\": \"the-miracle-morning-2-600×600\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"20,00€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 20,00€.<\\/span>19,00€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 19,00€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 450891, + \"key\": \"ISBN\", + \"value\": \"9788828506720\" + }, + { + \"id\": 450892, + \"key\": \"misure\", + \"value\": \"\" + }, + { + \"id\": 450893, + \"key\": \"pagine\", + \"value\": \"\" + }, + { + \"id\": 450894, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 450895, + \"key\": \"ristampa\", + \"value\": \"\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/54099\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/54098\" + } + ] + } +} +Codice: 20862 QtaDisp: 456 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 59015, + \"name\": \"Il Caso Majorana Pelizza - Nuovo\", + \"slug\": \"caso-majorana-pelizza-nuovo-2\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/il-caso-majorana-pelizza\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2024-01-17T02:07:12\", + \"date_created_gmt\": \"2024-01-17T01:07:12\", + \"date_modified\": \"2024-05-17T13:26:22\", + \"date_modified_gmt\": \"2024-05-17T11:26:22\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"20862\", + \"price\": \"23.6550\", + \"regular_price\": \"24.9000\", + \"sale_price\": \"23.6550\", + \"date_on_sale_from\": \"2023-10-03T00:00:00\", + \"date_on_sale_from_gmt\": \"2023-10-02T22:00:00\", + \"date_on_sale_to\": \"2099-10-03T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-10-02T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 457, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 59014, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 58169, + \"date_created\": \"2023-12-29T18:10:46\", + \"date_created_gmt\": \"2023-12-29T16:10:46\", + \"date_modified\": \"2023-12-29T18:11:13\", + \"date_modified_gmt\": \"2023-12-29T16:11:13\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2023\\/05\\/caso-majorana-pelizza.jpg\", + \"name\": \"caso-majorana-pelizza\", + \"alt\": \"majorana pelizza - rino di stefano\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"24,90€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 24,90€.<\\/span>23,66€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 23,66€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 1114351, + \"key\": \"ISBN\", + \"value\": \"9788828510079\" + }, + { + \"id\": 1114352, + \"key\": \"misure\", + \"value\": \"cm 13,5x20,5\" + }, + { + \"id\": 1114353, + \"key\": \"formato\", + \"value\": \"Brossura\" + }, + { + \"id\": 1114354, + \"key\": \"pagine\", + \"value\": \"528\" + }, + { + \"id\": 1114355, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 1114356, + \"key\": \"ristampa\", + \"value\": \"\" + }, + { + \"id\": 1249854, + \"key\": \"_wc_gla_sync_status\", + \"value\": \"synced\" + }, + { + \"id\": 1295790, + \"key\": \"_wc_gla_synced_at\", + \"value\": \"1714126716\" + }, + { + \"id\": 1295791, + \"key\": \"_wc_gla_google_ids\", + \"value\": { + \"IT\": \"online:it:IT:gla_59015\" + } + }, + { + \"id\": 1305104, + \"key\": \"_rank_math_gtin_code\", + \"value\": \"9788828510079\" + }, + { + \"id\": 1305105, + \"key\": \"_wc_gla_gtin\", + \"value\": \"9788828510079\" + }, + { + \"id\": 1314896, + \"key\": \"_wc_gla_mc_status\", + \"value\": \"disapproved\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/59015\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/59014\" + } + ] + } +} +Codice: 21568 QtaDisp: 568 DataOra: 2024-05-17 13:05:00.903 +{ + \"id\": 59512, + \"name\": \"Il piccolo libro del lasciar andare - Nuovo\", + \"slug\": \"il-piccolo-libro-del-lasciar-andare-nuovo\", + \"permalink\": \"https:\\/\\/www.fioredellavita.it\\/il-piccolo-libro-del-lasciar-andare\\/?attribute_pa_versione=nuovo\", + \"date_created\": \"2024-01-24T02:07:50\", + \"date_created_gmt\": \"2024-01-24T01:07:50\", + \"date_modified\": \"2024-05-17T13:27:27\", + \"date_modified_gmt\": \"2024-05-17T11:27:27\", + \"type\": \"variation\", + \"status\": \"publish\", + \"featured\": false, + \"catalog_visibility\": \"visible\", + \"description\": \"\", + \"short_description\": \"\", + \"sku\": \"21568\", + \"price\": \"14.1550\", + \"regular_price\": \"14.9000\", + \"sale_price\": \"14.1550\", + \"date_on_sale_from\": \"2024-04-24T00:00:00\", + \"date_on_sale_from_gmt\": \"2024-04-23T22:00:00\", + \"date_on_sale_to\": \"2099-04-24T00:00:00\", + \"date_on_sale_to_gmt\": \"2099-04-23T23:00:00\", + \"on_sale\": true, + \"purchasable\": true, + \"total_sales\": \"0\", + \"virtual\": false, + \"downloadable\": false, + \"downloads\": [], + \"download_limit\": -1, + \"download_expiry\": -1, + \"external_url\": \"\", + \"button_text\": \"\", + \"tax_status\": \"taxable\", + \"tax_class\": \"\", + \"manage_stock\": true, + \"stock_quantity\": 569, + \"backorders\": \"no\", + \"backorders_allowed\": false, + \"backordered\": false, + \"low_stock_amount\": null, + \"sold_individually\": false, + \"weight\": \"\", + \"dimensions\": { + \"length\": \"\", + \"width\": \"\", + \"height\": \"\" + }, + \"shipping_required\": true, + \"shipping_taxable\": true, + \"shipping_class\": \"\", + \"shipping_class_id\": 0, + \"reviews_allowed\": false, + \"average_rating\": \"0.00\", + \"rating_count\": 0, + \"upsell_ids\": [], + \"cross_sell_ids\": [], + \"parent_id\": 59511, + \"purchase_note\": \"\", + \"categories\": [], + \"tags\": [], + \"images\": [ + { + \"id\": 64973, + \"date_created\": \"2024-05-09T13:34:57\", + \"date_created_gmt\": \"2024-05-09T09:34:57\", + \"date_modified\": \"2024-05-09T13:34:57\", + \"date_modified_gmt\": \"2024-05-09T09:34:57\", + \"src\": \"https:\\/\\/www.fioredellavita.it\\/wp-content\\/uploads\\/2024\\/01\\/il-piccolo-libro-del-lasciar-andare.jpg\", + \"name\": \"il-piccolo-libro-del-lasciar-andare\", + \"alt\": \"\" + } + ], + \"attributes\": [ + { + \"id\": 6, + \"name\": \"Versione\", + \"slug\": \"pa_versione\", + \"option\": \"Nuovo\" + } + ], + \"default_attributes\": [], + \"variations\": [], + \"grouped_products\": [], + \"menu_order\": 0, + \"price_html\": \"14,90€<\\/span><\\/bdi><\\/span><\\/del> Il prezzo originale era: 14,90€.<\\/span>14,16€<\\/span><\\/bdi><\\/span><\\/ins>Il prezzo attuale \\u00e8: 14,16€.<\\/span>\", + \"related_ids\": [], + \"meta_data\": [ + { + \"id\": 1123381, + \"key\": \"ISBN\", + \"value\": \"9788828511694\" + }, + { + \"id\": 1123382, + \"key\": \"misure\", + \"value\": \"cm 14x20\" + }, + { + \"id\": 1123383, + \"key\": \"formato\", + \"value\": \"Brossura\" + }, + { + \"id\": 1123384, + \"key\": \"pagine\", + \"value\": \"168\" + }, + { + \"id\": 1123385, + \"key\": \"edizione\", + \"value\": \"\" + }, + { + \"id\": 1123386, + \"key\": \"ristampa\", + \"value\": \"\" + } + ], + \"stock_status\": \"instock\", + \"has_options\": false, + \"post_password\": \"\", + \"builder_content\": \"\", + \"_links\": { + \"self\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/59512\" + } + ], + \"collection\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\" + } + ], + \"up\": [ + { + \"href\": \"https:\\/\\/www.fioredellavita.it\\/wp-json\\/wc\\/v3\\/products\\/59511\" + } + ] + } +} + at /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:149) +[stacktrace] +#0 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(125): Monolog\\Handler\\StreamHandler->write() +#1 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\\Handler\\RotatingFileHandler->write() +#2 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\\Handler\\AbstractProcessingHandler->handle() +#3 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Logger.php(624): Monolog\\Logger->addRecord() +#4 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Log/Logger.php(174): Monolog\\Logger->notice() +#5 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Log/Logger.php(111): Illuminate\\Log\\Logger->writeLog() +#6 /var/www/html/apimacro/app/Console/Commands/TestPao.php(261): Illuminate\\Log\\Logger->notice() +#7 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\TestPao->handle() +#8 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() +#9 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure() +#10 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod() +#11 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\\Container\\BoundMethod::call() +#12 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\\Container\\Container->call() +#13 /var/www/html/apimacro/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute() +#14 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run() +#15 /var/www/html/apimacro/vendor/symfony/console/Application.php(1040): Illuminate\\Console\\Command->run() +#16 /var/www/html/apimacro/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand() +#17 /var/www/html/apimacro/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun() +#18 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\\Component\\Console\\Application->run() +#19 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run() +#20 /var/www/html/apimacro/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle() +#21 {main} +"} +[2024-05-17 13:45:01] local.INFO: Controllo schedule... +[2024-05-17 13:45:01] local.INFO: Running product:updateqta command +[2024-05-17 13:46:02] local.INFO: Controllo schedule... +[2024-05-17 13:46:43] local.ERROR: The stream or file "/var/www/html/apimacro/storage/logs/testpao-2024-05-17.log" could not be opened in append mode: Failed to open stream: Permission denied +The exception occurred while attempting to log: Articoli: +Quanti Articoli: 0\nCodice: 3500 QtaDisp: -4 DataOra: 2024-05-17 13:20:01.433 + {"exception":"[object] (UnexpectedValueException(code: 0): The stream or file \"/var/www/html/apimacro/storage/logs/testpao-2024-05-17.log\" could not be opened in append mode: Failed to open stream: Permission denied +The exception occurred while attempting to log: Articoli: +Quanti Articoli: 0\\nCodice: 3500 QtaDisp: -4 DataOra: 2024-05-17 13:20:01.433 + at /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:149) +[stacktrace] +#0 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(125): Monolog\\Handler\\StreamHandler->write() +#1 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(48): Monolog\\Handler\\RotatingFileHandler->write() +#2 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Logger.php(399): Monolog\\Handler\\AbstractProcessingHandler->handle() +#3 /var/www/html/apimacro/vendor/monolog/monolog/src/Monolog/Logger.php(624): Monolog\\Logger->addRecord() +#4 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Log/Logger.php(174): Monolog\\Logger->notice() +#5 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Log/Logger.php(111): Illuminate\\Log\\Logger->writeLog() +#6 /var/www/html/apimacro/app/Console/Commands/TestPao.php(261): Illuminate\\Log\\Logger->notice() +#7 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\TestPao->handle() +#8 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() +#9 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure() +#10 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod() +#11 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\\Container\\BoundMethod::call() +#12 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\\Container\\Container->call() +#13 /var/www/html/apimacro/vendor/symfony/console/Command/Command.php(298): Illuminate\\Console\\Command->execute() +#14 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\\Component\\Console\\Command\\Command->run() +#15 /var/www/html/apimacro/vendor/symfony/console/Application.php(1040): Illuminate\\Console\\Command->run() +#16 /var/www/html/apimacro/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand() +#17 /var/www/html/apimacro/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun() +#18 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\\Component\\Console\\Application->run() +#19 /var/www/html/apimacro/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run() +#20 /var/www/html/apimacro/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle() +#21 {main} +"} +[2024-05-17 13:47:01] local.INFO: Controllo schedule... +[2024-05-17 13:55:02] local.INFO: Controllo schedule... +[2024-05-17 13:55:02] local.INFO: Controllo schedule... +[2024-05-17 13:55:02] local.INFO: Running product:updateqta command +[2024-05-17 13:56:02] local.INFO: Controllo schedule... +[2024-05-17 13:56:02] local.INFO: Controllo schedule... +[2024-05-17 13:57:01] local.INFO: Controllo schedule... +[2024-05-17 13:57:01] local.INFO: Controllo schedule... +[2024-05-17 13:57:17] local.INFO: Controllo schedule... +[2024-05-17 13:58:01] local.INFO: Controllo schedule... +[2024-05-17 13:58:01] local.INFO: Controllo schedule... +[2024-05-17 13:59:02] local.INFO: Controllo schedule... +[2024-05-17 13:59:02] local.INFO: Controllo schedule... +[2024-05-17 14:00:01] local.INFO: Controllo schedule... +[2024-05-17 14:00:01] local.INFO: Controllo schedule... +[2024-05-17 14:00:01] local.INFO: Running order:gmupdate command +[2024-05-17 14:00:01] local.INFO: Running order:gmupdate command +[2024-05-17 14:00:07] local.INFO: Running product:updateqta command +[2024-05-17 14:01:02] local.INFO: Controllo schedule... +[2024-05-17 14:01:02] local.INFO: Controllo schedule... +[2024-05-17 14:02:01] local.INFO: Controllo schedule... +[2024-05-17 14:02:01] local.INFO: Controllo schedule... +[2024-05-17 14:02:13] local.INFO: Controllo schedule... +[2024-05-17 14:03:01] local.INFO: Controllo schedule... +[2024-05-17 14:03:02] local.INFO: Controllo schedule... +[2024-05-17 14:04:01] local.INFO: Controllo schedule... +[2024-05-17 14:04:01] local.INFO: Controllo schedule... +[2024-05-17 14:05:01] local.INFO: Controllo schedule... +[2024-05-17 14:05:01] local.INFO: Controllo schedule... +[2024-05-17 14:05:01] local.INFO: Running product:updateqta command +[2024-05-17 14:06:01] local.INFO: Controllo schedule... +[2024-05-17 14:06:01] local.INFO: Controllo schedule... +[2024-05-17 14:07:01] local.INFO: Controllo schedule... +[2024-05-17 14:07:01] local.INFO: Controllo schedule... +[2024-05-17 14:08:02] local.INFO: Controllo schedule... +[2024-05-17 14:08:02] local.INFO: Controllo schedule... +[2024-05-17 14:09:02] local.INFO: Controllo schedule... +[2024-05-17 14:09:02] local.INFO: Controllo schedule... +[2024-05-17 14:10:01] local.INFO: Controllo schedule... +[2024-05-17 14:10:01] local.INFO: Controllo schedule... +[2024-05-17 14:10:01] local.INFO: Running order:gmupdate command +[2024-05-17 14:10:01] local.INFO: Running order:gmupdate command +[2024-05-17 14:10:09] local.INFO: Running product:updateqta command +[2024-05-17 14:11:02] local.INFO: Controllo schedule... +[2024-05-17 14:11:02] local.INFO: Controllo schedule... +[2024-05-17 14:12:01] local.INFO: Controllo schedule... +[2024-05-17 14:12:01] local.INFO: Controllo schedule... +[2024-05-17 14:13:01] local.INFO: Controllo schedule... +[2024-05-17 14:13:01] local.INFO: Controllo schedule... +[2024-05-17 14:14:02] local.INFO: Controllo schedule... +[2024-05-17 14:14:02] local.INFO: Controllo schedule... +[2024-05-17 14:15:01] local.INFO: Controllo schedule... +[2024-05-17 14:15:01] local.INFO: Controllo schedule... +[2024-05-17 14:15:01] local.INFO: Running product:updateqta command +[2024-05-17 14:16:01] local.INFO: Controllo schedule... +[2024-05-17 14:16:01] local.INFO: Controllo schedule... +[2024-05-17 14:17:02] local.INFO: Controllo schedule... +[2024-05-17 14:17:02] local.INFO: Controllo schedule... +[2024-05-17 14:18:01] local.INFO: Controllo schedule... +[2024-05-17 14:18:01] local.INFO: Controllo schedule... +[2024-05-17 14:19:01] local.INFO: Controllo schedule... +[2024-05-17 14:19:01] local.INFO: Controllo schedule... +[2024-05-17 14:20:02] local.INFO: Controllo schedule... +[2024-05-17 14:20:02] local.INFO: Running order:gmupdate command +[2024-05-17 14:20:08] local.INFO: Running product:updateqta command +[2024-05-17 14:21:01] local.INFO: Controllo schedule... +[2024-05-17 14:22:01] local.INFO: Controllo schedule... +[2024-05-17 14:23:01] local.INFO: Controllo schedule... +[2024-05-17 14:24:02] local.INFO: Controllo schedule... diff --git a/storage/logs/testpao-2024-05-17.log b/storage/logs/testpao-2024-05-17.log new file mode 100644 index 00000000..8862f2e4 --- /dev/null +++ b/storage/logs/testpao-2024-05-17.log @@ -0,0 +1,1279 @@ +[2024-05-17 13:37:38] local.NOTICE: Articoli: +Quanti Articoli: 0\nCodice: 3500 QtaDisp: -4 DataOra: 2024-05-17 13:20:01.433 +Codice: 9264 QtaDisp: 344 DataOra: 2024-05-17 13:20:01.433 +Codice: 12167 QtaDisp: 46 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 30812, + "name": "Formicaio - Nuovo", + "slug": "formicaio-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/formicaio\/?attribute_pa_versione=nuovo", + "date_created": "2022-03-20T14:34:15", + "date_created_gmt": "2022-03-20T13:34:15", + "date_modified": "2024-05-17T13:33:47", + "date_modified_gmt": "2024-05-17T11:33:47", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "12167", + "price": "12.0000", + "regular_price": "12.0000", + "sale_price": "", + "date_on_sale_from": null, + "date_on_sale_from_gmt": null, + "date_on_sale_to": null, + "date_on_sale_to_gmt": null, + "on_sale": false, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 46, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 30811, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 34926, + "date_created": "2022-03-21T08:46:59", + "date_created_gmt": "2022-03-21T06:46:59", + "date_modified": "2022-03-21T08:46:59", + "date_modified_gmt": "2022-03-21T06:46:59", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/03\/il-formicaio.jpg", + "name": "il-formicaio.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "12,00€<\/span><\/bdi><\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 143749, + "key": "ISBN", + "value": "9788828503569" + }, + { + "id": 143750, + "key": "misure", + "value": "cm 22x22" + }, + { + "id": 143751, + "key": "formato", + "value": "Cartonato" + }, + { + "id": 143752, + "key": "pagine", + "value": "16" + }, + { + "id": 143753, + "key": "edizione", + "value": "1\u00b0 Novembre 2019" + }, + { + "id": 1083274, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1702940592, + "payload": [] + } + } + }, + { + "id": 1113836, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1113851, + "key": "_wc_gla_synced_at", + "value": "1714126419" + }, + { + "id": 1113852, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_30812" + } + }, + { + "id": 1307441, + "key": "_rank_math_gtin_code", + "value": "9788828503569" + }, + { + "id": 1307442, + "key": "_wc_gla_gtin", + "value": "9788828503569" + }, + { + "id": 1312978, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/30812" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/30811" + } + ] + } +} +Codice: 14230 QtaDisp: 773 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 25211, + "name": "Mandala per Guarire - Nuovo", + "slug": "mandala-per-guarire-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/?post_type=product&p=25210&attribute_pa_versione=nuovo", + "date_created": "2021-12-17T11:57:57", + "date_created_gmt": "2021-12-17T10:57:57", + "date_modified": "2024-05-17T13:28:41", + "date_modified_gmt": "2024-05-17T11:28:41", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14230", + "price": "13.7750", + "regular_price": "14.5000", + "sale_price": "13.7750", + "date_on_sale_from": "2023-12-04T00:00:00", + "date_on_sale_from_gmt": "2023-12-03T23:00:00", + "date_on_sale_to": "2099-12-31T00:00:00", + "date_on_sale_to_gmt": "2099-12-30T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 773, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 25210, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 28076, + "date_created": "2022-02-02T09:48:33", + "date_created_gmt": "2022-02-02T07:48:33", + "date_modified": "2022-02-02T09:48:33", + "date_modified_gmt": "2022-02-02T07:48:33", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/02\/mandala-per-guarire.jpg", + "name": "mandala-per-guarire.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 14,50€.<\/span>13,78€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 13,78€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 75361, + "key": "ISBN", + "value": "9788865933503" + }, + { + "id": 116824, + "key": "pagine", + "value": "288" + }, + { + "id": 116825, + "key": "edizione", + "value": "2\u00b0 ed agg. Maggio 20" + }, + { + "id": 116826, + "key": "misure", + "value": "cm 22x24" + }, + { + "id": 116827, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1083214, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1703695891, + "payload": [] + } + } + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/25211" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/25210" + } + ] + } +} +Codice: 14313 QtaDisp: 1792 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 29988, + "name": "L'Alveare - Nuovo", + "slug": "alveare-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/alveare\/?attribute_pa_versione=nuovo", + "date_created": "2022-03-20T13:51:59", + "date_created_gmt": "2022-03-20T12:51:59", + "date_modified": "2024-05-17T13:31:27", + "date_modified_gmt": "2024-05-17T11:31:27", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14313", + "price": "14.5000", + "regular_price": "14.5000", + "sale_price": "", + "date_on_sale_from": null, + "date_on_sale_from_gmt": null, + "date_on_sale_to": null, + "date_on_sale_to_gmt": null, + "on_sale": false, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 1792, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 29987, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 35224, + "date_created": "2022-03-21T10:38:31", + "date_created_gmt": "2022-03-21T08:38:31", + "date_modified": "2022-03-21T10:38:31", + "date_modified_gmt": "2022-03-21T08:38:31", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/03\/l-alveare-20100.jpg", + "name": "l-alveare-20100.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,50€<\/span><\/bdi><\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 122624, + "key": "ISBN", + "value": "9788865933596" + }, + { + "id": 122625, + "key": "misure", + "value": "cm 21x22" + }, + { + "id": 122626, + "key": "formato", + "value": "Cartonato" + }, + { + "id": 122627, + "key": "pagine", + "value": "16" + }, + { + "id": 122628, + "key": "edizione", + "value": "" + }, + { + "id": 1082986, + "key": "_jetpack_related_posts_cache", + "value": { + "67696d537e07ad54368a45e6e9a79fd6": { + "expires": 1702940953, + "payload": [] + } + } + }, + { + "id": 1111071, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1111094, + "key": "_wc_gla_synced_at", + "value": "1714126405" + }, + { + "id": 1111095, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_29988" + } + }, + { + "id": 1307671, + "key": "_rank_math_gtin_code", + "value": "9788865933596" + }, + { + "id": 1307672, + "key": "_wc_gla_gtin", + "value": "9788865933596" + }, + { + "id": 1312925, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/29988" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/29987" + } + ] + } +} +Codice: 14417 QtaDisp: 1603 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 24303, + "name": "Colorpedia Degli Animali - Nuovo", + "slug": "colorpedia-degli-animali-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/colorpedia-degli-animali\/?attribute_pa_versione=nuovo", + "date_created": "2021-12-17T11:20:38", + "date_created_gmt": "2021-12-17T10:20:38", + "date_modified": "2024-05-17T13:31:07", + "date_modified_gmt": "2024-05-17T11:31:07", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "14417", + "price": "10.9250", + "regular_price": "11.5000", + "sale_price": "10.9250", + "date_on_sale_from": "2024-05-08T00:00:00", + "date_on_sale_from_gmt": "2024-05-07T22:00:00", + "date_on_sale_to": "2099-05-08T00:00:00", + "date_on_sale_to_gmt": "2099-05-07T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 1603, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 24302, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 28398, + "date_created": "2022-02-02T10:13:49", + "date_created_gmt": "2022-02-02T08:13:49", + "date_modified": "2022-02-02T10:13:49", + "date_modified_gmt": "2022-02-02T08:13:49", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2022\/02\/colorpedia-degli-animali1.jpg", + "name": "colorpedia-degli-animali1.jpg", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "11,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 11,50€.<\/span>10,93€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 10,93€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 53782, + "key": "ISBN", + "value": "9788865933633" + }, + { + "id": 119546, + "key": "pagine", + "value": "96" + }, + { + "id": 119547, + "key": "edizione", + "value": "" + }, + { + "id": 119548, + "key": "misure", + "value": "cm 22x24,5" + }, + { + "id": 119549, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1108313, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1108360, + "key": "_wc_gla_synced_at", + "value": "1714126349" + }, + { + "id": 1108361, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_24303" + } + }, + { + "id": 1308702, + "key": "_rank_math_gtin_code", + "value": "9788865933633" + }, + { + "id": 1308703, + "key": "_wc_gla_gtin", + "value": "9788865933633" + }, + { + "id": 1312697, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/24303" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/24302" + } + ] + } +} +Codice: 16702 QtaDisp: 950 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 46843, + "name": "Il tuo corpo in equilibrio - Nuovo", + "slug": "body-into-balance-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/il-tuo-corpo-in-equilibrio\/?attribute_pa_versione=nuovo", + "date_created": "2023-05-05T02:09:49", + "date_created_gmt": "2023-05-05T00:09:49", + "date_modified": "2024-05-17T13:29:30", + "date_modified_gmt": "2024-05-17T11:29:30", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "16702", + "price": "29.9250", + "regular_price": "31.5000", + "sale_price": "29.9250", + "date_on_sale_from": "2024-03-15T00:00:00", + "date_on_sale_from_gmt": "2024-03-14T23:00:00", + "date_on_sale_to": "2099-03-15T00:00:00", + "date_on_sale_to_gmt": "2099-03-14T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 951, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 46842, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 64869, + "date_created": "2024-05-07T14:31:52", + "date_created_gmt": "2024-05-07T10:31:52", + "date_modified": "2024-05-07T14:31:52", + "date_modified_gmt": "2024-05-07T10:31:52", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/05\/corpo-in-equilibrio.jpg", + "name": "corpo-in-equilibrio", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "31,50€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 31,50€.<\/span>29,93€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 29,93€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 378967, + "key": "ISBN", + "value": "9788828528302" + }, + { + "id": 378968, + "key": "misure", + "value": "" + }, + { + "id": 378969, + "key": "formato", + "value": "Brossura" + }, + { + "id": 378970, + "key": "pagine", + "value": "" + }, + { + "id": 378971, + "key": "edizione", + "value": "" + }, + { + "id": 378972, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/46843" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/46842" + } + ] + } +} +Codice: 17652 QtaDisp: 3015 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 54099, + "name": "The miracle morning - Nuovo", + "slug": "miracle-morning-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/the-miracle-morning-2\/?attribute_pa_versione=nuovo", + "date_created": "2023-08-26T02:10:26", + "date_created_gmt": "2023-08-26T00:10:26", + "date_modified": "2024-05-17T13:31:55", + "date_modified_gmt": "2024-05-17T11:31:55", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "17652", + "price": "19.0000", + "regular_price": "20.0000", + "sale_price": "19.0000", + "date_on_sale_from": "2024-05-02T00:00:00", + "date_on_sale_from_gmt": "2024-05-01T22:00:00", + "date_on_sale_to": "2099-05-02T00:00:00", + "date_on_sale_to_gmt": "2099-05-01T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 3016, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 54098, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 65084, + "date_created": "2024-05-14T13:53:53", + "date_created_gmt": "2024-05-14T09:53:53", + "date_modified": "2024-05-14T13:53:53", + "date_modified_gmt": "2024-05-14T09:53:53", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/08\/the-miracle-morning-2-600x600-1.webp", + "name": "the-miracle-morning-2-600×600", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "20,00€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 20,00€.<\/span>19,00€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 19,00€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 450891, + "key": "ISBN", + "value": "9788828506720" + }, + { + "id": 450892, + "key": "misure", + "value": "" + }, + { + "id": 450893, + "key": "pagine", + "value": "" + }, + { + "id": 450894, + "key": "edizione", + "value": "" + }, + { + "id": 450895, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/54099" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/54098" + } + ] + } +} +Codice: 20862 QtaDisp: 456 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 59015, + "name": "Il Caso Majorana Pelizza - Nuovo", + "slug": "caso-majorana-pelizza-nuovo-2", + "permalink": "https:\/\/www.fioredellavita.it\/il-caso-majorana-pelizza\/?attribute_pa_versione=nuovo", + "date_created": "2024-01-17T02:07:12", + "date_created_gmt": "2024-01-17T01:07:12", + "date_modified": "2024-05-17T13:26:22", + "date_modified_gmt": "2024-05-17T11:26:22", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "20862", + "price": "23.6550", + "regular_price": "24.9000", + "sale_price": "23.6550", + "date_on_sale_from": "2023-10-03T00:00:00", + "date_on_sale_from_gmt": "2023-10-02T22:00:00", + "date_on_sale_to": "2099-10-03T00:00:00", + "date_on_sale_to_gmt": "2099-10-02T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 457, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 59014, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 58169, + "date_created": "2023-12-29T18:10:46", + "date_created_gmt": "2023-12-29T16:10:46", + "date_modified": "2023-12-29T18:11:13", + "date_modified_gmt": "2023-12-29T16:11:13", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2023\/05\/caso-majorana-pelizza.jpg", + "name": "caso-majorana-pelizza", + "alt": "majorana pelizza - rino di stefano" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "24,90€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 24,90€.<\/span>23,66€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 23,66€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 1114351, + "key": "ISBN", + "value": "9788828510079" + }, + { + "id": 1114352, + "key": "misure", + "value": "cm 13,5x20,5" + }, + { + "id": 1114353, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1114354, + "key": "pagine", + "value": "528" + }, + { + "id": 1114355, + "key": "edizione", + "value": "" + }, + { + "id": 1114356, + "key": "ristampa", + "value": "" + }, + { + "id": 1249854, + "key": "_wc_gla_sync_status", + "value": "synced" + }, + { + "id": 1295790, + "key": "_wc_gla_synced_at", + "value": "1714126716" + }, + { + "id": 1295791, + "key": "_wc_gla_google_ids", + "value": { + "IT": "online:it:IT:gla_59015" + } + }, + { + "id": 1305104, + "key": "_rank_math_gtin_code", + "value": "9788828510079" + }, + { + "id": 1305105, + "key": "_wc_gla_gtin", + "value": "9788828510079" + }, + { + "id": 1314896, + "key": "_wc_gla_mc_status", + "value": "disapproved" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59015" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59014" + } + ] + } +} +Codice: 21568 QtaDisp: 568 DataOra: 2024-05-17 13:05:00.903 +{ + "id": 59512, + "name": "Il piccolo libro del lasciar andare - Nuovo", + "slug": "il-piccolo-libro-del-lasciar-andare-nuovo", + "permalink": "https:\/\/www.fioredellavita.it\/il-piccolo-libro-del-lasciar-andare\/?attribute_pa_versione=nuovo", + "date_created": "2024-01-24T02:07:50", + "date_created_gmt": "2024-01-24T01:07:50", + "date_modified": "2024-05-17T13:27:27", + "date_modified_gmt": "2024-05-17T11:27:27", + "type": "variation", + "status": "publish", + "featured": false, + "catalog_visibility": "visible", + "description": "", + "short_description": "", + "sku": "21568", + "price": "14.1550", + "regular_price": "14.9000", + "sale_price": "14.1550", + "date_on_sale_from": "2024-04-24T00:00:00", + "date_on_sale_from_gmt": "2024-04-23T22:00:00", + "date_on_sale_to": "2099-04-24T00:00:00", + "date_on_sale_to_gmt": "2099-04-23T23:00:00", + "on_sale": true, + "purchasable": true, + "total_sales": "0", + "virtual": false, + "downloadable": false, + "downloads": [], + "download_limit": -1, + "download_expiry": -1, + "external_url": "", + "button_text": "", + "tax_status": "taxable", + "tax_class": "", + "manage_stock": true, + "stock_quantity": 569, + "backorders": "no", + "backorders_allowed": false, + "backordered": false, + "low_stock_amount": null, + "sold_individually": false, + "weight": "", + "dimensions": { + "length": "", + "width": "", + "height": "" + }, + "shipping_required": true, + "shipping_taxable": true, + "shipping_class": "", + "shipping_class_id": 0, + "reviews_allowed": false, + "average_rating": "0.00", + "rating_count": 0, + "upsell_ids": [], + "cross_sell_ids": [], + "parent_id": 59511, + "purchase_note": "", + "categories": [], + "tags": [], + "images": [ + { + "id": 64973, + "date_created": "2024-05-09T13:34:57", + "date_created_gmt": "2024-05-09T09:34:57", + "date_modified": "2024-05-09T13:34:57", + "date_modified_gmt": "2024-05-09T09:34:57", + "src": "https:\/\/www.fioredellavita.it\/wp-content\/uploads\/2024\/01\/il-piccolo-libro-del-lasciar-andare.jpg", + "name": "il-piccolo-libro-del-lasciar-andare", + "alt": "" + } + ], + "attributes": [ + { + "id": 6, + "name": "Versione", + "slug": "pa_versione", + "option": "Nuovo" + } + ], + "default_attributes": [], + "variations": [], + "grouped_products": [], + "menu_order": 0, + "price_html": "14,90€<\/span><\/bdi><\/span><\/del> Il prezzo originale era: 14,90€.<\/span>14,16€<\/span><\/bdi><\/span><\/ins>Il prezzo attuale \u00e8: 14,16€.<\/span>", + "related_ids": [], + "meta_data": [ + { + "id": 1123381, + "key": "ISBN", + "value": "9788828511694" + }, + { + "id": 1123382, + "key": "misure", + "value": "cm 14x20" + }, + { + "id": 1123383, + "key": "formato", + "value": "Brossura" + }, + { + "id": 1123384, + "key": "pagine", + "value": "168" + }, + { + "id": 1123385, + "key": "edizione", + "value": "" + }, + { + "id": 1123386, + "key": "ristampa", + "value": "" + } + ], + "stock_status": "instock", + "has_options": false, + "post_password": "", + "builder_content": "", + "_links": { + "self": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59512" + } + ], + "collection": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products" + } + ], + "up": [ + { + "href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/59511" + } + ] + } +} + +[2024-05-17 13:54:30] local.NOTICE: Articoli: +Quanti Articoli: 0\nCodice: 17031 QtaDisp: -2 DataOra: 2024-05-17 13:50:00.453 + +[2024-05-17 14:01:52] local.NOTICE: Articoli: +Quanti Articoli: 0\nCodice: 3500 QtaDisp: -2 DataOra: 2024-05-17 14:00:00.733 + diff --git a/storage/logs/updateproducts/update-2024-05-17.log b/storage/logs/updateproducts/update-2024-05-17.log new file mode 100644 index 00000000..62a29023 --- /dev/null +++ b/storage/logs/updateproducts/update-2024-05-17.log @@ -0,0 +1,15 @@ +[2024-05-17 13:39:04] local.NOTICE: Inizio da 2024-05-16 02:07:39 + +[2024-05-17 13:39:26] local.NOTICE: PRODOTTI INSERITI +Diversamente sani - Libri - Brossura - Nuova versione - https://www.fioredellavita.it/?post_type=product&p=65146&attribute_pa_versione=nuovo +PRODOTTI AGGIORNATI +Animali della Fattoria (SERIE) - Libri - Cartonato - Articolo aggiornato - https://www.fioredellavita.it/?post_type=product&p=61664&attribute_pa_versione=nuovo +Corso in Miracoli - Libri - Brossura - Articolo aggiornato - https://www.fioredellavita.it/un-corso-in-miracoli/?attribute_pa_versione=nuovo +Equilibratore dentale FRANCESE - Libri - Brossura - Articolo aggiornato - https://www.fioredellavita.it/?post_type=product&p=65112&attribute_pa_versione=nuovo +Medicina Antroposofica Familiare N.E. - Libri - Brossura - Articolo aggiornato - https://www.fioredellavita.it/?post_type=product&p=25272&attribute_pa_versione=nuovo +EVENTUALI PRODOTTI NON INSERITI +Macro almanacco n.4 - Aprile 2024 - E-book - Pdf/Epub +PRODOTTI NON INSERITI PER PROBLEMI SERVER + +[2024-05-17 13:39:26] local.NOTICE: Fino a 2024-05-17 13:39:03 + diff --git a/storage/logs/updateproductsqta/updateqta-2024-05-17.log b/storage/logs/updateproductsqta/updateqta-2024-05-17.log new file mode 100644 index 00000000..3c3f309e --- /dev/null +++ b/storage/logs/updateproductsqta/updateqta-2024-05-17.log @@ -0,0 +1,4 @@ +[2024-05-17 13:55:07] local.NOTICE: Inizio da 2024-05-17 13:55:02 + Prodotti qta aggiornati 2 +Terminato il 2024-05-17 13:55:07 + diff --git a/storage/logs/updateproductsused/update-2024-05-17.log b/storage/logs/updateproductsused/update-2024-05-17.log new file mode 100644 index 00000000..b68ce8ed --- /dev/null +++ b/storage/logs/updateproductsused/update-2024-05-17.log @@ -0,0 +1,2 @@ +[2024-05-17 13:38:07] local.NOTICE: Inizio da 2024-05-16 22:45:42 + diff --git a/vendor/asm89/stack-cors/README.md b/vendor/asm89/stack-cors/README.md index ee5f2957..93850606 100644 --- a/vendor/asm89/stack-cors/README.md +++ b/vendor/asm89/stack-cors/README.md @@ -22,13 +22,13 @@ This package can be used as a library or as [stack middleware]. | Option | Description | Default value | |------------------------|------------------------------------------------------------|---------------| -| allowedMethods | Matches the request method. | `[]` | -| allowedOrigins | Matches the request origin. | `[]` | -| allowedOriginsPatterns | Matches the request origin with `preg_match`. | `[]` | -| allowedHeaders | Sets the Access-Control-Allow-Headers response header. | `[]` | -| exposedHeaders | Sets the Access-Control-Expose-Headers response header. | `false` | -| maxAge | Sets the Access-Control-Max-Age response header. | `false` | -| supportsCredentials | Sets the Access-Control-Allow-Credentials header. | `false` | +| `allowedMethods` | Matches the request method. | `[]` | +| `allowedOrigins` | Matches the request origin. | `[]` | +| `allowedOriginsPatterns` | Matches the request origin with `preg_match`. | `[]` | +| `allowedHeaders` | Sets the Access-Control-Allow-Headers response header. | `[]` | +| `exposedHeaders` | Sets the Access-Control-Expose-Headers response header. | `false` | +| `maxAge` | Sets the Access-Control-Max-Age response header.
Set to `null` to omit the header/use browser default. | `0` | +| `supportsCredentials` | Sets the Access-Control-Allow-Credentials header. | `false` | The _allowedMethods_ and _allowedHeaders_ options are case-insensitive. @@ -36,6 +36,8 @@ You don't need to provide both _allowedOrigins_ and _allowedOriginsPatterns_. If If `['*']` is provided to _allowedMethods_, _allowedOrigins_ or _allowedHeaders_ all methods / origins / headers are allowed. +If _supportsCredentials_ is `true`, you must [explicitly set](https://fetch.spec.whatwg.org/#cors-protocol-and-credentials) `allowedHeaders` for any headers which are not CORS safelisted. + ### Example: using the library ```php @@ -49,8 +51,8 @@ $cors = new CorsService([ 'allowedOrigins' => ['http://localhost'], 'allowedOriginsPatterns' => ['/localhost:\d/'], 'exposedHeaders' => false, - 'maxAge' => false, - 'supportsCredentials' => false, + 'maxAge' => 600, + 'supportsCredentials' => true, ]); $cors->addActualRequestHeaders(Response $response, $origin); @@ -77,7 +79,7 @@ $app = new Cors($app, [ // you can enter regexes that are matched to the origin request header 'allowedOriginsPatterns' => ['/localhost:\d/'], 'exposedHeaders' => false, - 'maxAge' => false, + 'maxAge' => 600, 'supportsCredentials' => false, ]); ``` diff --git a/vendor/asm89/stack-cors/composer.json b/vendor/asm89/stack-cors/composer.json index 5292e6e5..f755c9f7 100644 --- a/vendor/asm89/stack-cors/composer.json +++ b/vendor/asm89/stack-cors/composer.json @@ -12,12 +12,12 @@ } ], "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" + "php": "^7.3|^8.0", + "symfony/http-foundation": "^5.3|^6|^7", + "symfony/http-kernel": "^5.3|^6|^7" }, "require-dev": { - "phpunit/phpunit": "^7|^9", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { @@ -37,7 +37,9 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } - } + }, + "minimum-stability": "beta", + "prefer-stable": true } diff --git a/vendor/asm89/stack-cors/src/Cors.php b/vendor/asm89/stack-cors/src/Cors.php index ded903e5..9e9bd6d7 100644 --- a/vendor/asm89/stack-cors/src/Cors.php +++ b/vendor/asm89/stack-cors/src/Cors.php @@ -43,7 +43,7 @@ class Cors implements HttpKernelInterface $this->cors = new CorsService(array_merge($this->defaultOptions, $options)); } - public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response + public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response { if ($this->cors->isPreflightRequest($request)) { $response = $this->cors->handlePreflightRequest($request); diff --git a/vendor/autoload.php b/vendor/autoload.php index 9af8fd63..4b1659d6 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d::getLoader(); +return ComposerAutoloaderInit5369a4d76f17a89933afbb2f1c9dc92c::getLoader(); diff --git a/vendor/bin/carbon b/vendor/bin/carbon old mode 100755 new mode 100644 diff --git a/vendor/bin/commonmark b/vendor/bin/commonmark old mode 100755 new mode 100644 diff --git a/vendor/bin/patch-type-declarations b/vendor/bin/patch-type-declarations old mode 100755 new mode 100644 diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse old mode 100755 new mode 100644 diff --git a/vendor/bin/phpunit b/vendor/bin/phpunit old mode 100755 new mode 100644 diff --git a/vendor/bin/psysh b/vendor/bin/psysh old mode 100755 new mode 100644 diff --git a/vendor/bin/var-dump-server b/vendor/bin/var-dump-server old mode 100755 new mode 100644 diff --git a/vendor/brick/math/CHANGELOG.md b/vendor/brick/math/CHANGELOG.md index 03c3d824..17cea8d9 100644 --- a/vendor/brick/math/CHANGELOG.md +++ b/vendor/brick/math/CHANGELOG.md @@ -2,11 +2,41 @@ All notable changes to this project will be documented in this file. +## [0.11.0](https://github.com/brick/math/releases/tag/0.11.0) - 2023-01-16 + +💥 **Breaking changes** + +- Minimum PHP version is now 8.0 +- Methods accepting a union of types are now strongly typed* +- `MathException` now extends `Exception` instead of `RuntimeException` + +* You may now run into type errors if you were passing `Stringable` objects to `of()` or any of the methods +internally calling `of()`, with `strict_types` enabled. You can fix this by casting `Stringable` objects to `string` +first. + +## [0.10.2](https://github.com/brick/math/releases/tag/0.10.2) - 2022-08-11 + +👌 **Improvements** + +- `BigRational::toFloat()` now simplifies the fraction before performing division (#73) thanks to @olsavmic + +## [0.10.1](https://github.com/brick/math/releases/tag/0.10.1) - 2022-08-02 + +✨ **New features** + +- `BigInteger::gcdMultiple()` returns the GCD of multiple `BigInteger` numbers + +## [0.10.0](https://github.com/brick/math/releases/tag/0.10.0) - 2022-06-18 + +💥 **Breaking changes** + +- Minimum PHP version is now 7.4 + ## [0.9.3](https://github.com/brick/math/releases/tag/0.9.3) - 2021-08-15 🚀 **Compatibility with PHP 8.1** -- Support for custom object serialization; this removes a warning on PHP 8.1 due to the `Serializable` interface being deprecated (thanks @TRowbotham) +- Support for custom object serialization; this removes a warning on PHP 8.1 due to the `Serializable` interface being deprecated (#60) thanks @TRowbotham ## [0.9.2](https://github.com/brick/math/releases/tag/0.9.2) - 2021-01-20 @@ -16,7 +46,7 @@ All notable changes to this project will be documented in this file. ## [0.9.1](https://github.com/brick/math/releases/tag/0.9.1) - 2020-08-19 -✨ New features +✨ **New features** - `BigInteger::not()` returns the bitwise `NOT` value @@ -325,8 +355,8 @@ This release also comes with many performance improvements. - `getFraction()` is renamed to `fraction()` - `divideAndRemainder()` is renamed to `quotientAndRemainder()` - `dividedBy()` now takes a **mandatory** `$scale` parameter **before** the rounding mode - - `toBigInteger()` does not accept a `$roundingMode` parameter any more - - `toBigRational()` does not simplify the fraction any more; explicitly add `->simplified()` to get the previous behaviour + - `toBigInteger()` does not accept a `$roundingMode` parameter anymore + - `toBigRational()` does not simplify the fraction anymore; explicitly add `->simplified()` to get the previous behaviour - `BigRational`: - `getSign()` is renamed to `sign()` - `getNumerator()` is renamed to `numerator()` @@ -400,7 +430,7 @@ Added `BigDecimal::divideAndRemainder()` ## [0.2.0](https://github.com/brick/math/releases/tag/0.2.0) - 2015-05-22 -- `min()` and `max()` do not accept an `array` any more, but a variable number of parameters +- `min()` and `max()` do not accept an `array` anymore, but a variable number of parameters - **minimum PHP version is now 5.6** - continuous integration with PHP 7 diff --git a/vendor/brick/math/SECURITY.md b/vendor/brick/math/SECURITY.md deleted file mode 100644 index cc8289bb..00000000 --- a/vendor/brick/math/SECURITY.md +++ /dev/null @@ -1,17 +0,0 @@ -# Security Policy - -## Supported Versions - -Only the last two release streams are supported. - -| Version | Supported | -| ------- | ------------------ | -| 0.9.x | :white_check_mark: | -| 0.8.x | :white_check_mark: | -| < 0.8 | :x: | - -## Reporting a Vulnerability - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. diff --git a/vendor/brick/math/composer.json b/vendor/brick/math/composer.json index ec196632..ed817bdd 100644 --- a/vendor/brick/math/composer.json +++ b/vendor/brick/math/composer.json @@ -14,13 +14,12 @@ ], "license": "MIT", "require": { - "php": "^7.1 || ^8.0", - "ext-json": "*" + "php": "^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "phpunit/phpunit": "^9.0", "php-coveralls/php-coveralls": "^2.2", - "vimeo/psalm": "4.9.2" + "vimeo/psalm": "5.0.0" }, "autoload": { "psr-4": { diff --git a/vendor/brick/math/src/BigDecimal.php b/vendor/brick/math/src/BigDecimal.php index 78246500..02fc6561 100644 --- a/vendor/brick/math/src/BigDecimal.php +++ b/vendor/brick/math/src/BigDecimal.php @@ -22,19 +22,15 @@ final class BigDecimal extends BigNumber * This is a string of digits with an optional leading minus sign. * No leading zero must be present. * No leading minus sign must be present if the value is 0. - * - * @var string */ - private $value; + private string $value; /** * The scale (number of digits after the decimal point) of this decimal number. * * This must be zero or more. - * - * @var int */ - private $scale; + private int $scale; /** * Protected constructor. Use a factory method to obtain an instance. @@ -51,15 +47,11 @@ final class BigDecimal extends BigNumber /** * Creates a BigDecimal of the given value. * - * @param BigNumber|int|float|string $value - * - * @return BigDecimal - * * @throws MathException If the value cannot be converted to a BigDecimal. * * @psalm-pure */ - public static function of($value) : BigNumber + public static function of(BigNumber|int|float|string $value) : BigDecimal { return parent::of($value)->toBigDecimal(); } @@ -72,13 +64,11 @@ final class BigDecimal extends BigNumber * @param BigNumber|int|float|string $value The unscaled value. Must be convertible to a BigInteger. * @param int $scale The scale of the number, positive or zero. * - * @return BigDecimal - * * @throws \InvalidArgumentException If the scale is negative. * * @psalm-pure */ - public static function ofUnscaledValue($value, int $scale = 0) : BigDecimal + public static function ofUnscaledValue(BigNumber|int|float|string $value, int $scale = 0) : BigDecimal { if ($scale < 0) { throw new \InvalidArgumentException('The scale cannot be negative.'); @@ -90,8 +80,6 @@ final class BigDecimal extends BigNumber /** * Returns a BigDecimal representing zero, with a scale of zero. * - * @return BigDecimal - * * @psalm-pure */ public static function zero() : BigDecimal @@ -112,8 +100,6 @@ final class BigDecimal extends BigNumber /** * Returns a BigDecimal representing one, with a scale of zero. * - * @return BigDecimal - * * @psalm-pure */ public static function one() : BigDecimal @@ -134,8 +120,6 @@ final class BigDecimal extends BigNumber /** * Returns a BigDecimal representing ten, with a scale of zero. * - * @return BigDecimal - * * @psalm-pure */ public static function ten() : BigDecimal @@ -160,11 +144,9 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigDecimal. * - * @return BigDecimal The result. - * * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. */ - public function plus($that) : BigDecimal + public function plus(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -191,11 +173,9 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigDecimal. * - * @return BigDecimal The result. - * * @throws MathException If the number is not valid, or is not convertible to a BigDecimal. */ - public function minus($that) : BigDecimal + public function minus(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -218,11 +198,9 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigDecimal. * - * @return BigDecimal The result. - * * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigDecimal. */ - public function multipliedBy($that) : BigDecimal + public function multipliedBy(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -247,12 +225,10 @@ final class BigDecimal extends BigNumber * @param int|null $scale The desired scale, or null to use the scale of this number. * @param int $roundingMode An optional rounding mode. * - * @return BigDecimal - * * @throws \InvalidArgumentException If the scale or rounding mode is invalid. * @throws MathException If the number is invalid, is zero, or rounding was necessary. */ - public function dividedBy($that, ?int $scale = null, int $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal + public function dividedBy(BigNumber|int|float|string $that, ?int $scale = null, int $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal { $that = BigDecimal::of($that); @@ -285,12 +261,10 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. * - * @return BigDecimal The result. - * * @throws MathException If the divisor is not a valid number, is not convertible to a BigDecimal, is zero, * or the result yields an infinite number of digits. */ - public function exactlyDividedBy($that) : BigDecimal + public function exactlyDividedBy(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -326,10 +300,6 @@ final class BigDecimal extends BigNumber * * The result has a scale of `$this->scale * $exponent`. * - * @param int $exponent The exponent. - * - * @return BigDecimal The result. - * * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. */ public function power(int $exponent) : BigDecimal @@ -360,11 +330,9 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. * - * @return BigDecimal The quotient. - * * @throws MathException If the divisor is not a valid decimal number, or is zero. */ - public function quotient($that) : BigDecimal + public function quotient(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -387,11 +355,9 @@ final class BigDecimal extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigDecimal. * - * @return BigDecimal The remainder. - * * @throws MathException If the divisor is not a valid decimal number, or is zero. */ - public function remainder($that) : BigDecimal + public function remainder(BigNumber|int|float|string $that) : BigDecimal { $that = BigDecimal::of($that); @@ -420,7 +386,7 @@ final class BigDecimal extends BigNumber * * @throws MathException If the divisor is not a valid decimal number, or is zero. */ - public function quotientAndRemainder($that) : array + public function quotientAndRemainder(BigNumber|int|float|string $that) : array { $that = BigDecimal::of($that); @@ -444,10 +410,6 @@ final class BigDecimal extends BigNumber /** * Returns the square root of this number, rounded down to the given number of decimals. * - * @param int $scale - * - * @return BigDecimal - * * @throws \InvalidArgumentException If the scale is negative. * @throws NegativeNumberException If this number is negative. */ @@ -488,10 +450,6 @@ final class BigDecimal extends BigNumber /** * Returns a copy of this BigDecimal with the decimal point moved $n places to the left. - * - * @param int $n - * - * @return BigDecimal */ public function withPointMovedLeft(int $n) : BigDecimal { @@ -508,10 +466,6 @@ final class BigDecimal extends BigNumber /** * Returns a copy of this BigDecimal with the decimal point moved $n places to the right. - * - * @param int $n - * - * @return BigDecimal */ public function withPointMovedRight(int $n) : BigDecimal { @@ -538,8 +492,6 @@ final class BigDecimal extends BigNumber /** * Returns a copy of this BigDecimal with any trailing zeros removed from the fractional part. - * - * @return BigDecimal */ public function stripTrailingZeros() : BigDecimal { @@ -571,8 +523,6 @@ final class BigDecimal extends BigNumber /** * Returns the absolute value of this number. - * - * @return BigDecimal */ public function abs() : BigDecimal { @@ -581,18 +531,13 @@ final class BigDecimal extends BigNumber /** * Returns the negated value of this number. - * - * @return BigDecimal */ public function negated() : BigDecimal { return new BigDecimal(Calculator::get()->neg($this->value), $this->scale); } - /** - * {@inheritdoc} - */ - public function compareTo($that) : int + public function compareTo(BigNumber|int|float|string $that) : int { $that = BigNumber::of($that); @@ -609,25 +554,16 @@ final class BigDecimal extends BigNumber return - $that->compareTo($this); } - /** - * {@inheritdoc} - */ public function getSign() : int { return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1); } - /** - * @return BigInteger - */ public function getUnscaledValue() : BigInteger { - return BigInteger::create($this->value); + return self::newBigInteger($this->value); } - /** - * @return int - */ public function getScale() : int { return $this->scale; @@ -637,8 +573,6 @@ final class BigDecimal extends BigNumber * Returns a string representing the integral part of this decimal number. * * Example: `-123.456` => `-123`. - * - * @return string */ public function getIntegralPart() : string { @@ -657,8 +591,6 @@ final class BigDecimal extends BigNumber * If the scale is zero, an empty string is returned. * * Examples: `-123.456` => '456', `123` => ''. - * - * @return string */ public function getFractionalPart() : string { @@ -673,46 +605,32 @@ final class BigDecimal extends BigNumber /** * Returns whether this decimal number has a non-zero fractional part. - * - * @return bool */ public function hasNonZeroFractionalPart() : bool { return $this->getFractionalPart() !== \str_repeat('0', $this->scale); } - /** - * {@inheritdoc} - */ public function toBigInteger() : BigInteger { $zeroScaleDecimal = $this->scale === 0 ? $this : $this->dividedBy(1, 0); - return BigInteger::create($zeroScaleDecimal->value); + return self::newBigInteger($zeroScaleDecimal->value); } - /** - * {@inheritdoc} - */ public function toBigDecimal() : BigDecimal { return $this; } - /** - * {@inheritdoc} - */ public function toBigRational() : BigRational { - $numerator = BigInteger::create($this->value); - $denominator = BigInteger::create('1' . \str_repeat('0', $this->scale)); + $numerator = self::newBigInteger($this->value); + $denominator = self::newBigInteger('1' . \str_repeat('0', $this->scale)); - return BigRational::create($numerator, $denominator, false); + return self::newBigRational($numerator, $denominator, false); } - /** - * {@inheritdoc} - */ public function toScale(int $scale, int $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal { if ($scale === $this->scale) { @@ -722,25 +640,16 @@ final class BigDecimal extends BigNumber return $this->dividedBy(BigDecimal::one(), $scale, $roundingMode); } - /** - * {@inheritdoc} - */ public function toInt() : int { return $this->toBigInteger()->toInt(); } - /** - * {@inheritdoc} - */ public function toFloat() : float { return (float) (string) $this; } - /** - * {@inheritdoc} - */ public function __toString() : string { if ($this->scale === 0) { @@ -772,8 +681,6 @@ final class BigDecimal extends BigNumber * * @param array{value: string, scale: int} $data * - * @return void - * * @throws \LogicException */ public function __unserialize(array $data): void @@ -790,8 +697,6 @@ final class BigDecimal extends BigNumber * This method is required by interface Serializable and SHOULD NOT be accessed directly. * * @internal - * - * @return string */ public function serialize() : string { @@ -804,10 +709,6 @@ final class BigDecimal extends BigNumber * @internal * @psalm-suppress RedundantPropertyInitializationCheck * - * @param string $value - * - * @return void - * * @throws \LogicException */ public function unserialize($value) : void @@ -825,9 +726,6 @@ final class BigDecimal extends BigNumber /** * Puts the internal values of the given decimal numbers on the same scale. * - * @param BigDecimal $x The first decimal number. - * @param BigDecimal $y The second decimal number. - * * @return array{string, string} The scaled integer values of $x and $y. */ private function scaleValues(BigDecimal $x, BigDecimal $y) : array @@ -844,11 +742,6 @@ final class BigDecimal extends BigNumber return [$a, $b]; } - /** - * @param int $scale - * - * @return string - */ private function valueWithMinScale(int $scale) : string { $value = $this->value; @@ -862,8 +755,6 @@ final class BigDecimal extends BigNumber /** * Adds leading zeros if necessary to the unscaled value to represent the full decimal number. - * - * @return string */ private function getUnscaledValueWithLeadingZeros() : string { diff --git a/vendor/brick/math/src/BigInteger.php b/vendor/brick/math/src/BigInteger.php index f213fbed..43567933 100644 --- a/vendor/brick/math/src/BigInteger.php +++ b/vendor/brick/math/src/BigInteger.php @@ -26,10 +26,8 @@ final class BigInteger extends BigNumber * * No leading zeros must be present. * No leading minus sign must be present if the number is zero. - * - * @var string */ - private $value; + private string $value; /** * Protected constructor. Use a factory method to obtain an instance. @@ -44,15 +42,11 @@ final class BigInteger extends BigNumber /** * Creates a BigInteger of the given value. * - * @param BigNumber|int|float|string $value - * - * @return BigInteger - * * @throws MathException If the value cannot be converted to a BigInteger. * * @psalm-pure */ - public static function of($value) : BigNumber + public static function of(BigNumber|int|float|string $value) : BigInteger { return parent::of($value)->toBigInteger(); } @@ -71,8 +65,6 @@ final class BigInteger extends BigNumber * @param string $number The number to convert, in the given base. * @param int $base The base of the number, between 2 and 36. * - * @return BigInteger - * * @throws NumberFormatException If the number is empty, or contains invalid chars for the given base. * @throws \InvalidArgumentException If the base is out of range. * @@ -138,8 +130,6 @@ final class BigInteger extends BigNumber * @param string $number The number to parse. * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. * - * @return BigInteger - * * @throws NumberFormatException If the given number is empty or contains invalid chars for the given alphabet. * @throws \InvalidArgumentException If the alphabet does not contain at least 2 chars. * @@ -183,8 +173,6 @@ final class BigInteger extends BigNumber * @param bool $signed Whether to interpret as a signed number in two's-complement representation with a leading * sign bit. * - * @return BigInteger - * * @throws NumberFormatException If the string is empty. */ public static function fromBytes(string $value, bool $signed = true) : BigInteger @@ -217,15 +205,13 @@ final class BigInteger extends BigNumber * * Using the default random bytes generator, this method is suitable for cryptographic use. * - * @psalm-param callable(int): string $randomBytesGenerator + * @psalm-param (callable(int): string)|null $randomBytesGenerator * * @param int $numBits The number of bits. * @param callable|null $randomBytesGenerator A function that accepts a number of bytes as an integer, and returns a * string of random bytes of the given length. Defaults to the * `random_bytes()` function. * - * @return BigInteger - * * @throws \InvalidArgumentException If $numBits is negative. */ public static function randomBits(int $numBits, ?callable $randomBytesGenerator = null) : BigInteger @@ -266,13 +252,14 @@ final class BigInteger extends BigNumber * and returns a string of random bytes of the given length. * Defaults to the `random_bytes()` function. * - * @return BigInteger - * * @throws MathException If one of the parameters cannot be converted to a BigInteger, * or `$min` is greater than `$max`. */ - public static function randomRange($min, $max, ?callable $randomBytesGenerator = null) : BigInteger - { + public static function randomRange( + BigNumber|int|float|string $min, + BigNumber|int|float|string $max, + ?callable $randomBytesGenerator = null + ) : BigInteger { $min = BigInteger::of($min); $max = BigInteger::of($max); @@ -298,8 +285,6 @@ final class BigInteger extends BigNumber /** * Returns a BigInteger representing zero. * - * @return BigInteger - * * @psalm-pure */ public static function zero() : BigInteger @@ -320,8 +305,6 @@ final class BigInteger extends BigNumber /** * Returns a BigInteger representing one. * - * @return BigInteger - * * @psalm-pure */ public static function one() : BigInteger @@ -342,8 +325,6 @@ final class BigInteger extends BigNumber /** * Returns a BigInteger representing ten. * - * @return BigInteger - * * @psalm-pure */ public static function ten() : BigInteger @@ -361,16 +342,29 @@ final class BigInteger extends BigNumber return $ten; } + public static function gcdMultiple(BigInteger $a, BigInteger ...$n): BigInteger + { + $result = $a; + + foreach ($n as $next) { + $result = $result->gcd($next); + + if ($result->isEqualTo(1)) { + return $result; + } + } + + return $result; + } + /** * Returns the sum of this number and the given one. * * @param BigNumber|int|float|string $that The number to add. Must be convertible to a BigInteger. * - * @return BigInteger The result. - * * @throws MathException If the number is not valid, or is not convertible to a BigInteger. */ - public function plus($that) : BigInteger + public function plus(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -392,11 +386,9 @@ final class BigInteger extends BigNumber * * @param BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigInteger. * - * @return BigInteger The result. - * * @throws MathException If the number is not valid, or is not convertible to a BigInteger. */ - public function minus($that) : BigInteger + public function minus(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -414,11 +406,9 @@ final class BigInteger extends BigNumber * * @param BigNumber|int|float|string $that The multiplier. Must be convertible to a BigInteger. * - * @return BigInteger The result. - * * @throws MathException If the multiplier is not a valid number, or is not convertible to a BigInteger. */ - public function multipliedBy($that) : BigInteger + public function multipliedBy(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -441,12 +431,10 @@ final class BigInteger extends BigNumber * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. * @param int $roundingMode An optional rounding mode. * - * @return BigInteger The result. - * * @throws MathException If the divisor is not a valid number, is not convertible to a BigInteger, is zero, * or RoundingMode::UNNECESSARY is used and the remainder is not zero. */ - public function dividedBy($that, int $roundingMode = RoundingMode::UNNECESSARY) : BigInteger + public function dividedBy(BigNumber|int|float|string $that, int $roundingMode = RoundingMode::UNNECESSARY) : BigInteger { $that = BigInteger::of($that); @@ -466,10 +454,6 @@ final class BigInteger extends BigNumber /** * Returns this number exponentiated to the given value. * - * @param int $exponent The exponent. - * - * @return BigInteger The result. - * * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. */ public function power(int $exponent) : BigInteger @@ -498,11 +482,9 @@ final class BigInteger extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. * - * @return BigInteger - * * @throws DivisionByZeroException If the divisor is zero. */ - public function quotient($that) : BigInteger + public function quotient(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -526,11 +508,9 @@ final class BigInteger extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. * - * @return BigInteger - * * @throws DivisionByZeroException If the divisor is zero. */ - public function remainder($that) : BigInteger + public function remainder(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -556,7 +536,7 @@ final class BigInteger extends BigNumber * * @throws DivisionByZeroException If the divisor is zero. */ - public function quotientAndRemainder($that) : array + public function quotientAndRemainder(BigNumber|int|float|string $that) : array { $that = BigInteger::of($that); @@ -582,11 +562,9 @@ final class BigInteger extends BigNumber * * @param BigNumber|int|float|string $that The divisor. Must be convertible to a BigInteger. * - * @return BigInteger - * * @throws DivisionByZeroException If the divisor is zero. */ - public function mod($that) : BigInteger + public function mod(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -602,10 +580,6 @@ final class BigInteger extends BigNumber /** * Returns the modular multiplicative inverse of this BigInteger modulo $m. * - * @param BigInteger $m - * - * @return BigInteger - * * @throws DivisionByZeroException If $m is zero. * @throws NegativeNumberException If $m is negative. * @throws MathException If this BigInteger has no multiplicative inverse mod m (that is, this BigInteger @@ -642,12 +616,10 @@ final class BigInteger extends BigNumber * @param BigNumber|int|float|string $exp The exponent. Must be positive or zero. * @param BigNumber|int|float|string $mod The modulus. Must be strictly positive. * - * @return BigInteger - * * @throws NegativeNumberException If any of the operands is negative. * @throws DivisionByZeroException If the modulus is zero. */ - public function modPow($exp, $mod) : BigInteger + public function modPow(BigNumber|int|float|string $exp, BigNumber|int|float|string $mod) : BigInteger { $exp = BigInteger::of($exp); $mod = BigInteger::of($mod); @@ -671,10 +643,8 @@ final class BigInteger extends BigNumber * The GCD is always positive, unless both operands are zero, in which case it is zero. * * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @return BigInteger */ - public function gcd($that) : BigInteger + public function gcd(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -696,8 +666,6 @@ final class BigInteger extends BigNumber * * The result is the largest x such that x² ≤ n. * - * @return BigInteger - * * @throws NegativeNumberException If this number is negative. */ public function sqrt() : BigInteger @@ -713,8 +681,6 @@ final class BigInteger extends BigNumber /** * Returns the absolute value of this number. - * - * @return BigInteger */ public function abs() : BigInteger { @@ -723,8 +689,6 @@ final class BigInteger extends BigNumber /** * Returns the inverse of this number. - * - * @return BigInteger */ public function negated() : BigInteger { @@ -737,10 +701,8 @@ final class BigInteger extends BigNumber * This method returns a negative BigInteger if and only if both operands are negative. * * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @return BigInteger */ - public function and($that) : BigInteger + public function and(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -753,10 +715,8 @@ final class BigInteger extends BigNumber * This method returns a negative BigInteger if and only if either of the operands is negative. * * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @return BigInteger */ - public function or($that) : BigInteger + public function or(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -769,10 +729,8 @@ final class BigInteger extends BigNumber * This method returns a negative BigInteger if and only if exactly one of the operands is negative. * * @param BigNumber|int|float|string $that The operand. Must be convertible to an integer number. - * - * @return BigInteger */ - public function xor($that) : BigInteger + public function xor(BigNumber|int|float|string $that) : BigInteger { $that = BigInteger::of($that); @@ -781,8 +739,6 @@ final class BigInteger extends BigNumber /** * Returns the bitwise-not of this BigInteger. - * - * @return BigInteger */ public function not() : BigInteger { @@ -791,10 +747,6 @@ final class BigInteger extends BigNumber /** * Returns the integer left shifted by a given number of bits. - * - * @param int $distance The distance to shift. - * - * @return BigInteger */ public function shiftedLeft(int $distance) : BigInteger { @@ -811,10 +763,6 @@ final class BigInteger extends BigNumber /** * Returns the integer right shifted by a given number of bits. - * - * @param int $distance The distance to shift. - * - * @return BigInteger */ public function shiftedRight(int $distance) : BigInteger { @@ -840,8 +788,6 @@ final class BigInteger extends BigNumber * * For positive BigIntegers, this is equivalent to the number of bits in the ordinary binary representation. * Computes (ceil(log2(this < 0 ? -this : this+1))). - * - * @return int */ public function getBitLength() : int { @@ -860,8 +806,6 @@ final class BigInteger extends BigNumber * Returns the index of the rightmost (lowest-order) one bit in this BigInteger. * * Returns -1 if this BigInteger contains no one bits. - * - * @return int */ public function getLowestSetBit() : int { @@ -881,8 +825,6 @@ final class BigInteger extends BigNumber /** * Returns whether this number is even. - * - * @return bool */ public function isEven() : bool { @@ -891,8 +833,6 @@ final class BigInteger extends BigNumber /** * Returns whether this number is odd. - * - * @return bool */ public function isOdd() : bool { @@ -906,8 +846,6 @@ final class BigInteger extends BigNumber * * @param int $n The bit to test, 0-based. * - * @return bool - * * @throws \InvalidArgumentException If the bit to test is negative. */ public function testBit(int $n) : bool @@ -919,10 +857,7 @@ final class BigInteger extends BigNumber return $this->shiftedRight($n)->isOdd(); } - /** - * {@inheritdoc} - */ - public function compareTo($that) : int + public function compareTo(BigNumber|int|float|string $that) : int { $that = BigNumber::of($that); @@ -933,49 +868,31 @@ final class BigInteger extends BigNumber return - $that->compareTo($this); } - /** - * {@inheritdoc} - */ public function getSign() : int { return ($this->value === '0') ? 0 : (($this->value[0] === '-') ? -1 : 1); } - /** - * {@inheritdoc} - */ public function toBigInteger() : BigInteger { return $this; } - /** - * {@inheritdoc} - */ public function toBigDecimal() : BigDecimal { - return BigDecimal::create($this->value); + return self::newBigDecimal($this->value); } - /** - * {@inheritdoc} - */ public function toBigRational() : BigRational { - return BigRational::create($this, BigInteger::one(), false); + return self::newBigRational($this, BigInteger::one(), false); } - /** - * {@inheritdoc} - */ public function toScale(int $scale, int $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal { return $this->toBigDecimal()->toScale($scale, $roundingMode); } - /** - * {@inheritdoc} - */ public function toInt() : int { $intValue = (int) $this->value; @@ -987,9 +904,6 @@ final class BigInteger extends BigNumber return $intValue; } - /** - * {@inheritdoc} - */ public function toFloat() : float { return (float) $this->value; @@ -1000,10 +914,6 @@ final class BigInteger extends BigNumber * * The output will always be lowercase for bases greater than 10. * - * @param int $base - * - * @return string - * * @throws \InvalidArgumentException If the base is out of range. */ public function toBase(int $base) : string @@ -1027,8 +937,6 @@ final class BigInteger extends BigNumber * * @param string $alphabet The alphabet, for example '01' for base 2, or '01234567' for base 8. * - * @return string - * * @throws NegativeNumberException If this number is negative. * @throws \InvalidArgumentException If the given alphabet does not contain at least 2 chars. */ @@ -1063,8 +971,6 @@ final class BigInteger extends BigNumber * * @param bool $signed Whether to output a signed number in two's-complement representation with a leading sign bit. * - * @return string - * * @throws NegativeNumberException If $signed is false, and the number is negative. */ public function toBytes(bool $signed = true) : string @@ -1108,9 +1014,6 @@ final class BigInteger extends BigNumber return \hex2bin($hex); } - /** - * {@inheritdoc} - */ public function __toString() : string { return $this->value; @@ -1136,8 +1039,6 @@ final class BigInteger extends BigNumber * * @param array{value: string} $data * - * @return void - * * @throws \LogicException */ public function __unserialize(array $data): void @@ -1153,8 +1054,6 @@ final class BigInteger extends BigNumber * This method is required by interface Serializable and SHOULD NOT be accessed directly. * * @internal - * - * @return string */ public function serialize() : string { @@ -1167,10 +1066,6 @@ final class BigInteger extends BigNumber * @internal * @psalm-suppress RedundantPropertyInitializationCheck * - * @param string $value - * - * @return void - * * @throws \LogicException */ public function unserialize($value) : void diff --git a/vendor/brick/math/src/BigNumber.php b/vendor/brick/math/src/BigNumber.php index 38c8c554..80146d20 100644 --- a/vendor/brick/math/src/BigNumber.php +++ b/vendor/brick/math/src/BigNumber.php @@ -48,16 +48,12 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * - strings containing a `.` character or using an exponential notation are returned as BigDecimal * - strings containing only digits with an optional leading `+` or `-` sign are returned as BigInteger * - * @param BigNumber|int|float|string $value - * - * @return BigNumber - * * @throws NumberFormatException If the format of the number is not valid. * @throws DivisionByZeroException If the value represents a rational number with a denominator of zero. * * @psalm-pure */ - public static function of($value) : BigNumber + public static function of(BigNumber|int|float|string $value) : BigNumber { if ($value instanceof BigNumber) { return $value; @@ -67,8 +63,7 @@ abstract class BigNumber implements \Serializable, \JsonSerializable return new BigInteger((string) $value); } - /** @psalm-suppress RedundantCastGivenDocblockType We cannot trust the untyped $value here! */ - $value = \is_float($value) ? self::floatToString($value) : (string) $value; + $value = \is_float($value) ? self::floatToString($value) : $value; $throw = static function() use ($value) : void { throw new NumberFormatException(\sprintf( @@ -81,9 +76,7 @@ abstract class BigNumber implements \Serializable, \JsonSerializable $throw(); } - $getMatch = static function(string $value) use ($matches) : ?string { - return isset($matches[$value]) && $matches[$value] !== '' ? $matches[$value] : null; - }; + $getMatch = static fn(string $value): ?string => (($matches[$value] ?? '') !== '') ? $matches[$value] : null; $sign = $getMatch('sign'); $numerator = $getMatch('numerator'); @@ -155,10 +148,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * * @see https://github.com/brick/math/pull/20 * - * @param float $float - * - * @return string - * * @psalm-pure * @psalm-suppress ImpureFunctionCall */ @@ -175,21 +164,36 @@ abstract class BigNumber implements \Serializable, \JsonSerializable } /** - * Proxy method to access protected constructors from sibling classes. + * Proxy method to access BigInteger's protected constructor from sibling classes. * * @internal - * - * @param mixed ...$args The arguments to the constructor. - * - * @return static - * * @psalm-pure - * @psalm-suppress TooManyArguments - * @psalm-suppress UnsafeInstantiation */ - protected static function create(... $args) : BigNumber + protected function newBigInteger(string $value) : BigInteger { - return new static(... $args); + return new BigInteger($value); + } + + /** + * Proxy method to access BigDecimal's protected constructor from sibling classes. + * + * @internal + * @psalm-pure + */ + protected function newBigDecimal(string $value, int $scale = 0) : BigDecimal + { + return new BigDecimal($value, $scale); + } + + /** + * Proxy method to access BigRational's protected constructor from sibling classes. + * + * @internal + * @psalm-pure + */ + protected function newBigRational(BigInteger $numerator, BigInteger $denominator, bool $checkDenominator) : BigRational + { + return new BigRational($numerator, $denominator, $checkDenominator); } /** @@ -198,8 +202,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible * to an instance of the class this method is called on. * - * @return static The minimum value. - * * @throws \InvalidArgumentException If no values are given. * @throws MathException If an argument is not valid. * @@ -207,7 +209,7 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @psalm-suppress MoreSpecificReturnType * @psalm-pure */ - public static function min(...$values) : BigNumber + public static function min(BigNumber|int|float|string ...$values) : static { $min = null; @@ -232,8 +234,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @param BigNumber|int|float|string ...$values The numbers to compare. All the numbers need to be convertible * to an instance of the class this method is called on. * - * @return static The maximum value. - * * @throws \InvalidArgumentException If no values are given. * @throws MathException If an argument is not valid. * @@ -241,7 +241,7 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @psalm-suppress MoreSpecificReturnType * @psalm-pure */ - public static function max(...$values) : BigNumber + public static function max(BigNumber|int|float|string ...$values) : static { $max = null; @@ -266,18 +266,14 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @param BigNumber|int|float|string ...$values The numbers to add. All the numbers need to be convertible * to an instance of the class this method is called on. * - * @return static The sum. - * * @throws \InvalidArgumentException If no values are given. * @throws MathException If an argument is not valid. * - * @psalm-suppress LessSpecificReturnStatement - * @psalm-suppress MoreSpecificReturnType * @psalm-pure */ - public static function sum(...$values) : BigNumber + public static function sum(BigNumber|int|float|string ...$values) : static { - /** @var BigNumber|null $sum */ + /** @var static|null $sum */ $sum = null; foreach ($values as $value) { @@ -301,11 +297,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * depending on their ability to perform the operation. This will also require a version bump because we're * potentially breaking custom BigNumber implementations (if any...) * - * @param BigNumber $a - * @param BigNumber $b - * - * @return BigNumber - * * @psalm-pure */ private static function add(BigNumber $a, BigNumber $b) : BigNumber @@ -336,8 +327,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * * @param string $number The number, validated as a non-empty string of digits with optional leading sign. * - * @return string - * * @psalm-pure */ private static function cleanUp(string $number) : string @@ -363,68 +352,46 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Checks if this number is equal to the given one. - * - * @param BigNumber|int|float|string $that - * - * @return bool */ - public function isEqualTo($that) : bool + public function isEqualTo(BigNumber|int|float|string $that) : bool { return $this->compareTo($that) === 0; } /** * Checks if this number is strictly lower than the given one. - * - * @param BigNumber|int|float|string $that - * - * @return bool */ - public function isLessThan($that) : bool + public function isLessThan(BigNumber|int|float|string $that) : bool { return $this->compareTo($that) < 0; } /** * Checks if this number is lower than or equal to the given one. - * - * @param BigNumber|int|float|string $that - * - * @return bool */ - public function isLessThanOrEqualTo($that) : bool + public function isLessThanOrEqualTo(BigNumber|int|float|string $that) : bool { return $this->compareTo($that) <= 0; } /** * Checks if this number is strictly greater than the given one. - * - * @param BigNumber|int|float|string $that - * - * @return bool */ - public function isGreaterThan($that) : bool + public function isGreaterThan(BigNumber|int|float|string $that) : bool { return $this->compareTo($that) > 0; } /** * Checks if this number is greater than or equal to the given one. - * - * @param BigNumber|int|float|string $that - * - * @return bool */ - public function isGreaterThanOrEqualTo($that) : bool + public function isGreaterThanOrEqualTo(BigNumber|int|float|string $that) : bool { return $this->compareTo($that) >= 0; } /** * Checks if this number equals zero. - * - * @return bool */ public function isZero() : bool { @@ -433,8 +400,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Checks if this number is strictly negative. - * - * @return bool */ public function isNegative() : bool { @@ -443,8 +408,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Checks if this number is negative or zero. - * - * @return bool */ public function isNegativeOrZero() : bool { @@ -453,8 +416,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Checks if this number is strictly positive. - * - * @return bool */ public function isPositive() : bool { @@ -463,8 +424,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Checks if this number is positive or zero. - * - * @return bool */ public function isPositiveOrZero() : bool { @@ -481,19 +440,15 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Compares this number to the given one. * - * @param BigNumber|int|float|string $that - * * @return int [-1,0,1] If `$this` is lower than, equal to, or greater than `$that`. * * @throws MathException If the number is not valid. */ - abstract public function compareTo($that) : int; + abstract public function compareTo(BigNumber|int|float|string $that) : int; /** * Converts this number to a BigInteger. * - * @return BigInteger The converted number. - * * @throws RoundingNecessaryException If this number cannot be converted to a BigInteger without rounding. */ abstract public function toBigInteger() : BigInteger; @@ -501,16 +456,12 @@ abstract class BigNumber implements \Serializable, \JsonSerializable /** * Converts this number to a BigDecimal. * - * @return BigDecimal The converted number. - * * @throws RoundingNecessaryException If this number cannot be converted to a BigDecimal without rounding. */ abstract public function toBigDecimal() : BigDecimal; /** * Converts this number to a BigRational. - * - * @return BigRational The converted number. */ abstract public function toBigRational() : BigRational; @@ -520,8 +471,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * @param int $scale The scale of the resulting `BigDecimal`. * @param int $roundingMode A `RoundingMode` constant. * - * @return BigDecimal - * * @throws RoundingNecessaryException If this number cannot be converted to the given scale without rounding. * This only applies when RoundingMode::UNNECESSARY is used. */ @@ -533,8 +482,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * If this number cannot be converted to a native integer without losing precision, an exception is thrown. * Note that the acceptable range for an integer depends on the platform and differs for 32-bit and 64-bit. * - * @return int The converted value. - * * @throws MathException If this number cannot be exactly converted to a native integer. */ abstract public function toInt() : int; @@ -547,8 +494,6 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * * If the number is greater than the largest representable floating point number, positive infinity is returned. * If the number is less than the smallest representable floating point number, negative infinity is returned. - * - * @return float The converted value. */ abstract public function toFloat() : float; @@ -557,14 +502,9 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * * The output of this method can be parsed by the `of()` factory method; * this will yield an object equal to this one, without any information loss. - * - * @return string */ abstract public function __toString() : string; - /** - * {@inheritdoc} - */ public function jsonSerialize() : string { return $this->__toString(); diff --git a/vendor/brick/math/src/BigRational.php b/vendor/brick/math/src/BigRational.php index bee094f7..31f2904f 100644 --- a/vendor/brick/math/src/BigRational.php +++ b/vendor/brick/math/src/BigRational.php @@ -20,17 +20,13 @@ final class BigRational extends BigNumber { /** * The numerator. - * - * @var BigInteger */ - private $numerator; + private BigInteger $numerator; /** * The denominator. Always strictly positive. - * - * @var BigInteger */ - private $denominator; + private BigInteger $denominator; /** * Protected constructor. Use a factory method to obtain an instance. @@ -61,15 +57,11 @@ final class BigRational extends BigNumber /** * Creates a BigRational of the given value. * - * @param BigNumber|int|float|string $value - * - * @return BigRational - * * @throws MathException If the value cannot be converted to a BigRational. * * @psalm-pure */ - public static function of($value) : BigNumber + public static function of(BigNumber|int|float|string $value) : BigRational { return parent::of($value)->toBigRational(); } @@ -83,16 +75,16 @@ final class BigRational extends BigNumber * @param BigNumber|int|float|string $numerator The numerator. Must be convertible to a BigInteger. * @param BigNumber|int|float|string $denominator The denominator. Must be convertible to a BigInteger. * - * @return BigRational - * * @throws NumberFormatException If an argument does not represent a valid number. * @throws RoundingNecessaryException If an argument represents a non-integer number. * @throws DivisionByZeroException If the denominator is zero. * * @psalm-pure */ - public static function nd($numerator, $denominator) : BigRational - { + public static function nd( + BigNumber|int|float|string $numerator, + BigNumber|int|float|string $denominator, + ) : BigRational { $numerator = BigInteger::of($numerator); $denominator = BigInteger::of($denominator); @@ -102,8 +94,6 @@ final class BigRational extends BigNumber /** * Returns a BigRational representing zero. * - * @return BigRational - * * @psalm-pure */ public static function zero() : BigRational @@ -124,8 +114,6 @@ final class BigRational extends BigNumber /** * Returns a BigRational representing one. * - * @return BigRational - * * @psalm-pure */ public static function one() : BigRational @@ -146,8 +134,6 @@ final class BigRational extends BigNumber /** * Returns a BigRational representing ten. * - * @return BigRational - * * @psalm-pure */ public static function ten() : BigRational @@ -165,17 +151,11 @@ final class BigRational extends BigNumber return $ten; } - /** - * @return BigInteger - */ public function getNumerator() : BigInteger { return $this->numerator; } - /** - * @return BigInteger - */ public function getDenominator() : BigInteger { return $this->denominator; @@ -183,8 +163,6 @@ final class BigRational extends BigNumber /** * Returns the quotient of the division of the numerator by the denominator. - * - * @return BigInteger */ public function quotient() : BigInteger { @@ -193,8 +171,6 @@ final class BigRational extends BigNumber /** * Returns the remainder of the division of the numerator by the denominator. - * - * @return BigInteger */ public function remainder() : BigInteger { @@ -216,11 +192,9 @@ final class BigRational extends BigNumber * * @param BigNumber|int|float|string $that The number to add. * - * @return BigRational The result. - * * @throws MathException If the number is not valid. */ - public function plus($that) : BigRational + public function plus(BigNumber|int|float|string $that) : BigRational { $that = BigRational::of($that); @@ -236,11 +210,9 @@ final class BigRational extends BigNumber * * @param BigNumber|int|float|string $that The number to subtract. * - * @return BigRational The result. - * * @throws MathException If the number is not valid. */ - public function minus($that) : BigRational + public function minus(BigNumber|int|float|string $that) : BigRational { $that = BigRational::of($that); @@ -256,11 +228,9 @@ final class BigRational extends BigNumber * * @param BigNumber|int|float|string $that The multiplier. * - * @return BigRational The result. - * * @throws MathException If the multiplier is not a valid number. */ - public function multipliedBy($that) : BigRational + public function multipliedBy(BigNumber|int|float|string $that) : BigRational { $that = BigRational::of($that); @@ -275,11 +245,9 @@ final class BigRational extends BigNumber * * @param BigNumber|int|float|string $that The divisor. * - * @return BigRational The result. - * * @throws MathException If the divisor is not a valid number, or is zero. */ - public function dividedBy($that) : BigRational + public function dividedBy(BigNumber|int|float|string $that) : BigRational { $that = BigRational::of($that); @@ -292,10 +260,6 @@ final class BigRational extends BigNumber /** * Returns this number exponentiated to the given value. * - * @param int $exponent The exponent. - * - * @return BigRational The result. - * * @throws \InvalidArgumentException If the exponent is not in the range 0 to 1,000,000. */ public function power(int $exponent) : BigRational @@ -322,8 +286,6 @@ final class BigRational extends BigNumber * * The reciprocal has the numerator and denominator swapped. * - * @return BigRational - * * @throws DivisionByZeroException If the numerator is zero. */ public function reciprocal() : BigRational @@ -333,8 +295,6 @@ final class BigRational extends BigNumber /** * Returns the absolute value of this BigRational. - * - * @return BigRational */ public function abs() : BigRational { @@ -343,8 +303,6 @@ final class BigRational extends BigNumber /** * Returns the negated value of this BigRational. - * - * @return BigRational */ public function negated() : BigRational { @@ -353,8 +311,6 @@ final class BigRational extends BigNumber /** * Returns the simplified value of this BigRational. - * - * @return BigRational */ public function simplified() : BigRational { @@ -366,25 +322,16 @@ final class BigRational extends BigNumber return new BigRational($numerator, $denominator, false); } - /** - * {@inheritdoc} - */ - public function compareTo($that) : int + public function compareTo(BigNumber|int|float|string $that) : int { return $this->minus($that)->getSign(); } - /** - * {@inheritdoc} - */ public function getSign() : int { return $this->numerator->getSign(); } - /** - * {@inheritdoc} - */ public function toBigInteger() : BigInteger { $simplified = $this->simplified(); @@ -396,49 +343,32 @@ final class BigRational extends BigNumber return $simplified->numerator; } - /** - * {@inheritdoc} - */ public function toBigDecimal() : BigDecimal { return $this->numerator->toBigDecimal()->exactlyDividedBy($this->denominator); } - /** - * {@inheritdoc} - */ public function toBigRational() : BigRational { return $this; } - /** - * {@inheritdoc} - */ public function toScale(int $scale, int $roundingMode = RoundingMode::UNNECESSARY) : BigDecimal { return $this->numerator->toBigDecimal()->dividedBy($this->denominator, $scale, $roundingMode); } - /** - * {@inheritdoc} - */ public function toInt() : int { return $this->toBigInteger()->toInt(); } - /** - * {@inheritdoc} - */ public function toFloat() : float { - return $this->numerator->toFloat() / $this->denominator->toFloat(); + $simplified = $this->simplified(); + return $simplified->numerator->toFloat() / $simplified->denominator->toFloat(); } - /** - * {@inheritdoc} - */ public function __toString() : string { $numerator = (string) $this->numerator; @@ -471,8 +401,6 @@ final class BigRational extends BigNumber * * @param array{numerator: BigInteger, denominator: BigInteger} $data * - * @return void - * * @throws \LogicException */ public function __unserialize(array $data): void @@ -489,8 +417,6 @@ final class BigRational extends BigNumber * This method is required by interface Serializable and SHOULD NOT be accessed directly. * * @internal - * - * @return string */ public function serialize() : string { @@ -503,10 +429,6 @@ final class BigRational extends BigNumber * @internal * @psalm-suppress RedundantPropertyInitializationCheck * - * @param string $value - * - * @return void - * * @throws \LogicException */ public function unserialize($value) : void diff --git a/vendor/brick/math/src/Exception/DivisionByZeroException.php b/vendor/brick/math/src/Exception/DivisionByZeroException.php index a4e44317..ce7769ac 100644 --- a/vendor/brick/math/src/Exception/DivisionByZeroException.php +++ b/vendor/brick/math/src/Exception/DivisionByZeroException.php @@ -10,8 +10,6 @@ namespace Brick\Math\Exception; class DivisionByZeroException extends MathException { /** - * @return DivisionByZeroException - * * @psalm-pure */ public static function divisionByZero() : DivisionByZeroException @@ -20,8 +18,6 @@ class DivisionByZeroException extends MathException } /** - * @return DivisionByZeroException - * * @psalm-pure */ public static function modulusMustNotBeZero() : DivisionByZeroException @@ -30,8 +26,6 @@ class DivisionByZeroException extends MathException } /** - * @return DivisionByZeroException - * * @psalm-pure */ public static function denominatorMustNotBeZero() : DivisionByZeroException diff --git a/vendor/brick/math/src/Exception/IntegerOverflowException.php b/vendor/brick/math/src/Exception/IntegerOverflowException.php index e0b07d3c..c73b4909 100644 --- a/vendor/brick/math/src/Exception/IntegerOverflowException.php +++ b/vendor/brick/math/src/Exception/IntegerOverflowException.php @@ -12,10 +12,6 @@ use Brick\Math\BigInteger; class IntegerOverflowException extends MathException { /** - * @param BigInteger $value - * - * @return IntegerOverflowException - * * @psalm-pure */ public static function toIntOverflow(BigInteger $value) : IntegerOverflowException diff --git a/vendor/brick/math/src/Exception/MathException.php b/vendor/brick/math/src/Exception/MathException.php index 21fda90e..46e9c3fe 100644 --- a/vendor/brick/math/src/Exception/MathException.php +++ b/vendor/brick/math/src/Exception/MathException.php @@ -6,9 +6,7 @@ namespace Brick\Math\Exception; /** * Base class for all math exceptions. - * - * This class is abstract to ensure that only fine-grained exceptions are thrown throughout the code. */ -class MathException extends \RuntimeException +class MathException extends \Exception { } diff --git a/vendor/brick/math/src/Exception/NumberFormatException.php b/vendor/brick/math/src/Exception/NumberFormatException.php index 2fd0be73..d9cf6ff5 100644 --- a/vendor/brick/math/src/Exception/NumberFormatException.php +++ b/vendor/brick/math/src/Exception/NumberFormatException.php @@ -12,8 +12,6 @@ class NumberFormatException extends MathException /** * @param string $char The failing character. * - * @return NumberFormatException - * * @psalm-pure */ public static function charNotInAlphabet(string $char) : self diff --git a/vendor/brick/math/src/Exception/RoundingNecessaryException.php b/vendor/brick/math/src/Exception/RoundingNecessaryException.php index 1c610056..57bfcd84 100644 --- a/vendor/brick/math/src/Exception/RoundingNecessaryException.php +++ b/vendor/brick/math/src/Exception/RoundingNecessaryException.php @@ -10,8 +10,6 @@ namespace Brick\Math\Exception; class RoundingNecessaryException extends MathException { /** - * @return RoundingNecessaryException - * * @psalm-pure */ public static function roundingNecessary() : RoundingNecessaryException diff --git a/vendor/brick/math/src/Internal/Calculator.php b/vendor/brick/math/src/Internal/Calculator.php index a6eac799..b8cecda9 100644 --- a/vendor/brick/math/src/Internal/Calculator.php +++ b/vendor/brick/math/src/Internal/Calculator.php @@ -34,10 +34,8 @@ abstract class Calculator /** * The Calculator instance in use. - * - * @var Calculator|null */ - private static $instance; + private static ?Calculator $instance = null; /** * Sets the Calculator instance to use. @@ -45,8 +43,6 @@ abstract class Calculator * An instance is typically set only in unit tests: the autodetect is usually the best option. * * @param Calculator|null $calculator The calculator instance, or NULL to revert to autodetect. - * - * @return void */ final public static function set(?Calculator $calculator) : void { @@ -58,8 +54,6 @@ abstract class Calculator * * If none has been explicitly set, the fastest available implementation will be returned. * - * @return Calculator - * * @psalm-pure * @psalm-suppress ImpureStaticProperty */ @@ -77,8 +71,6 @@ abstract class Calculator * Returns the fastest available Calculator implementation. * * @codeCoverageIgnore - * - * @return Calculator */ private static function detect() : Calculator { @@ -96,9 +88,6 @@ abstract class Calculator /** * Extracts the sign & digits of the operands. * - * @param string $a The first operand. - * @param string $b The second operand. - * * @return array{bool, bool, string, string} Whether $a and $b are negative, followed by their digits. */ final protected function init(string $a, string $b) : array @@ -114,10 +103,6 @@ abstract class Calculator /** * Returns the absolute value of a number. - * - * @param string $n The number. - * - * @return string The absolute value. */ final public function abs(string $n) : string { @@ -126,10 +111,6 @@ abstract class Calculator /** * Negates a number. - * - * @param string $n The number. - * - * @return string The negated value. */ final public function neg(string $n) : string { @@ -147,9 +128,6 @@ abstract class Calculator /** * Compares two numbers. * - * @param string $a The first number. - * @param string $b The second number. - * * @return int [-1, 0, 1] If the first number is less than, equal to, or greater than the second number. */ final public function cmp(string $a, string $b) : int @@ -180,31 +158,16 @@ abstract class Calculator /** * Adds two numbers. - * - * @param string $a The augend. - * @param string $b The addend. - * - * @return string The sum. */ abstract public function add(string $a, string $b) : string; /** * Subtracts two numbers. - * - * @param string $a The minuend. - * @param string $b The subtrahend. - * - * @return string The difference. */ abstract public function sub(string $a, string $b) : string; /** * Multiplies two numbers. - * - * @param string $a The multiplicand. - * @param string $b The multiplier. - * - * @return string The product. */ abstract public function mul(string $a, string $b) : string; @@ -234,7 +197,7 @@ abstract class Calculator * @param string $a The dividend. * @param string $b The divisor, must not be zero. * - * @return string[] An array containing the quotient and remainder. + * @return array{string, string} An array containing the quotient and remainder. */ abstract public function divQR(string $a, string $b) : array; @@ -249,10 +212,7 @@ abstract class Calculator abstract public function pow(string $a, int $e) : string; /** - * @param string $a * @param string $b The modulus; must not be zero. - * - * @return string */ public function mod(string $a, string $b) : string { @@ -266,10 +226,7 @@ abstract class Calculator * * This method can be overridden by the concrete implementation if the underlying library has built-in support. * - * @param string $x * @param string $m The modulus; must not be negative or zero. - * - * @return string|null */ public function modInverse(string $x, string $m) : ?string { @@ -283,9 +240,7 @@ abstract class Calculator $modVal = $this->mod($x, $m); } - $x = '0'; - $y = '0'; - $g = $this->gcdExtended($modVal, $m, $x, $y); + [$g, $x] = $this->gcdExtended($modVal, $m); if ($g !== '1') { return null; @@ -300,8 +255,6 @@ abstract class Calculator * @param string $base The base number; must be positive or zero. * @param string $exp The exponent; must be positive or zero. * @param string $mod The modulus; must be strictly positive. - * - * @return string The power. */ abstract public function modPow(string $base, string $exp, string $mod) : string; @@ -311,9 +264,6 @@ abstract class Calculator * This method can be overridden by the concrete implementation if the underlying library * has built-in support for GCD calculations. * - * @param string $a The first number. - * @param string $b The second number. - * * @return string The GCD, always positive, or zero if both arguments are zero. */ public function gcd(string $a, string $b) : string @@ -329,24 +279,21 @@ abstract class Calculator return $this->gcd($b, $this->divR($a, $b)); } - private function gcdExtended(string $a, string $b, string &$x, string &$y) : string + /** + * @return array{string, string, string} GCD, X, Y + */ + private function gcdExtended(string $a, string $b) : array { if ($a === '0') { - $x = '0'; - $y = '1'; - - return $b; + return [$b, '0', '1']; } - $x1 = '0'; - $y1 = '0'; - - $gcd = $this->gcdExtended($this->mod($b, $a), $a, $x1, $y1); + [$gcd, $x1, $y1] = $this->gcdExtended($this->mod($b, $a), $a); $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1)); $y = $x1; - return $gcd; + return [$gcd, $x, $y]; } /** @@ -354,10 +301,6 @@ abstract class Calculator * * The result is the largest x such that x² ≤ n. * The input MUST NOT be negative. - * - * @param string $n The number. - * - * @return string The square root. */ abstract public function sqrt(string $n) : string; @@ -489,10 +432,10 @@ abstract class Calculator * @param string $b The divisor, must not be zero. * @param int $roundingMode The rounding mode. * - * @return string - * * @throws \InvalidArgumentException If the rounding mode is invalid. * @throws RoundingNecessaryException If RoundingMode::UNNECESSARY is provided but rounding is necessary. + * + * @psalm-suppress ImpureFunctionCall */ final public function divRound(string $a, string $b, int $roundingMode) : string { @@ -570,11 +513,6 @@ abstract class Calculator * * This method can be overridden by the concrete implementation if the underlying library * has built-in support for bitwise operations. - * - * @param string $a - * @param string $b - * - * @return string */ public function and(string $a, string $b) : string { @@ -586,11 +524,6 @@ abstract class Calculator * * This method can be overridden by the concrete implementation if the underlying library * has built-in support for bitwise operations. - * - * @param string $a - * @param string $b - * - * @return string */ public function or(string $a, string $b) : string { @@ -602,11 +535,6 @@ abstract class Calculator * * This method can be overridden by the concrete implementation if the underlying library * has built-in support for bitwise operations. - * - * @param string $a - * @param string $b - * - * @return string */ public function xor(string $a, string $b) : string { @@ -616,11 +544,9 @@ abstract class Calculator /** * Performs a bitwise operation on a decimal number. * - * @param string $operator The operator to use, must be "and", "or" or "xor". - * @param string $a The left operand. - * @param string $b The right operand. - * - * @return string + * @param 'and'|'or'|'xor' $operator The operator to use. + * @param string $a The left operand. + * @param string $b The right operand. */ private function bitwise(string $operator, string $a, string $b) : string { @@ -678,8 +604,6 @@ abstract class Calculator /** * @param string $number A positive, binary number. - * - * @return string */ private function twosComplement(string $number) : string { @@ -709,8 +633,6 @@ abstract class Calculator * Converts a decimal number to a binary string. * * @param string $number The number to convert, positive or zero, only digits. - * - * @return string */ private function toBinary(string $number) : string { @@ -728,8 +650,6 @@ abstract class Calculator * Returns the positive decimal representation of a binary number. * * @param string $bytes The bytes representing the number. - * - * @return string */ private function toDecimal(string $bytes) : string { diff --git a/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php b/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php index 6632b378..5457a3c9 100644 --- a/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php +++ b/vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php @@ -15,99 +15,58 @@ use Brick\Math\Internal\Calculator; */ class BcMathCalculator extends Calculator { - /** - * {@inheritdoc} - */ public function add(string $a, string $b) : string { return \bcadd($a, $b, 0); } - /** - * {@inheritdoc} - */ public function sub(string $a, string $b) : string { return \bcsub($a, $b, 0); } - /** - * {@inheritdoc} - */ public function mul(string $a, string $b) : string { return \bcmul($a, $b, 0); } - /** - * {@inheritdoc} - * - * @psalm-suppress InvalidNullableReturnType - * @psalm-suppress NullableReturnStatement - */ public function divQ(string $a, string $b) : string { return \bcdiv($a, $b, 0); } /** - * {@inheritdoc} - * * @psalm-suppress InvalidNullableReturnType * @psalm-suppress NullableReturnStatement */ public function divR(string $a, string $b) : string { - if (version_compare(PHP_VERSION, '7.2') >= 0) { - return \bcmod($a, $b, 0); - } - - return \bcmod($a, $b); + return \bcmod($a, $b, 0); } - /** - * {@inheritdoc} - */ public function divQR(string $a, string $b) : array { $q = \bcdiv($a, $b, 0); + $r = \bcmod($a, $b, 0); - if (version_compare(PHP_VERSION, '7.2') >= 0) { - $r = \bcmod($a, $b, 0); - } else { - $r = \bcmod($a, $b); - } - - assert($q !== null); assert($r !== null); return [$q, $r]; } - /** - * {@inheritdoc} - */ public function pow(string $a, int $e) : string { return \bcpow($a, (string) $e, 0); } - /** - * {@inheritdoc} - * - * @psalm-suppress InvalidNullableReturnType - * @psalm-suppress NullableReturnStatement - */ public function modPow(string $base, string $exp, string $mod) : string { return \bcpowmod($base, $exp, $mod, 0); } /** - * {@inheritDoc} - * - * @psalm-suppress NullableReturnStatement * @psalm-suppress InvalidNullableReturnType + * @psalm-suppress NullableReturnStatement */ public function sqrt(string $n) : string { diff --git a/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php b/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php index 52d18800..42d4c692 100644 --- a/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php +++ b/vendor/brick/math/src/Internal/Calculator/GmpCalculator.php @@ -15,49 +15,31 @@ use Brick\Math\Internal\Calculator; */ class GmpCalculator extends Calculator { - /** - * {@inheritdoc} - */ public function add(string $a, string $b) : string { return \gmp_strval(\gmp_add($a, $b)); } - /** - * {@inheritdoc} - */ public function sub(string $a, string $b) : string { return \gmp_strval(\gmp_sub($a, $b)); } - /** - * {@inheritdoc} - */ public function mul(string $a, string $b) : string { return \gmp_strval(\gmp_mul($a, $b)); } - /** - * {@inheritdoc} - */ public function divQ(string $a, string $b) : string { return \gmp_strval(\gmp_div_q($a, $b)); } - /** - * {@inheritdoc} - */ public function divR(string $a, string $b) : string { return \gmp_strval(\gmp_div_r($a, $b)); } - /** - * {@inheritdoc} - */ public function divQR(string $a, string $b) : array { [$q, $r] = \gmp_div_qr($a, $b); @@ -68,17 +50,11 @@ class GmpCalculator extends Calculator ]; } - /** - * {@inheritdoc} - */ public function pow(string $a, int $e) : string { return \gmp_strval(\gmp_pow($a, $e)); } - /** - * {@inheritdoc} - */ public function modInverse(string $x, string $m) : ?string { $result = \gmp_invert($x, $m); @@ -90,65 +66,41 @@ class GmpCalculator extends Calculator return \gmp_strval($result); } - /** - * {@inheritdoc} - */ public function modPow(string $base, string $exp, string $mod) : string { return \gmp_strval(\gmp_powm($base, $exp, $mod)); } - /** - * {@inheritdoc} - */ public function gcd(string $a, string $b) : string { return \gmp_strval(\gmp_gcd($a, $b)); } - /** - * {@inheritdoc} - */ public function fromBase(string $number, int $base) : string { return \gmp_strval(\gmp_init($number, $base)); } - /** - * {@inheritdoc} - */ public function toBase(string $number, int $base) : string { return \gmp_strval($number, $base); } - /** - * {@inheritdoc} - */ public function and(string $a, string $b) : string { return \gmp_strval(\gmp_and($a, $b)); } - /** - * {@inheritdoc} - */ public function or(string $a, string $b) : string { return \gmp_strval(\gmp_or($a, $b)); } - /** - * {@inheritdoc} - */ public function xor(string $a, string $b) : string { return \gmp_strval(\gmp_xor($a, $b)); } - /** - * {@inheritDoc} - */ public function sqrt(string $n) : string { return \gmp_strval(\gmp_sqrt($n)); diff --git a/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php b/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php index 020a6338..7c679d24 100644 --- a/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php +++ b/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php @@ -19,17 +19,13 @@ class NativeCalculator extends Calculator * The max number of digits the platform can natively add, subtract, multiply or divide without overflow. * For multiplication, this represents the max sum of the lengths of both operands. * - * For addition, it is assumed that an extra digit can hold a carry (1) without overflowing. + * In addition, it is assumed that an extra digit can hold a carry (1) without overflowing. * Example: 32-bit: max number 1,999,999,999 (9 digits + carry) * 64-bit: max number 1,999,999,999,999,999,999 (18 digits + carry) - * - * @var int */ - private $maxDigits; + private int $maxDigits; /** - * Class constructor. - * * @codeCoverageIgnore */ public function __construct() @@ -48,9 +44,6 @@ class NativeCalculator extends Calculator } } - /** - * {@inheritdoc} - */ public function add(string $a, string $b) : string { /** @@ -82,17 +75,11 @@ class NativeCalculator extends Calculator return $result; } - /** - * {@inheritdoc} - */ public function sub(string $a, string $b) : string { return $this->add($a, $this->neg($b)); } - /** - * {@inheritdoc} - */ public function mul(string $a, string $b) : string { /** @@ -136,25 +123,16 @@ class NativeCalculator extends Calculator return $result; } - /** - * {@inheritdoc} - */ public function divQ(string $a, string $b) : string { return $this->divQR($a, $b)[0]; } - /** - * {@inheritdoc} - */ public function divR(string $a, string $b): string { return $this->divQR($a, $b)[1]; } - /** - * {@inheritdoc} - */ public function divQR(string $a, string $b) : array { if ($a === '0') { @@ -210,9 +188,6 @@ class NativeCalculator extends Calculator return [$q, $r]; } - /** - * {@inheritdoc} - */ public function pow(string $a, int $e) : string { if ($e === 0) { @@ -240,8 +215,6 @@ class NativeCalculator extends Calculator /** * Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-arithmetic/ - * - * {@inheritdoc} */ public function modPow(string $base, string $exp, string $mod) : string { @@ -276,8 +249,6 @@ class NativeCalculator extends Calculator /** * Adapted from https://cp-algorithms.com/num_methods/roots_newton.html - * - * {@inheritDoc} */ public function sqrt(string $n) : string { @@ -306,11 +277,6 @@ class NativeCalculator extends Calculator /** * Performs the addition of two non-signed large integers. - * - * @param string $a The first operand. - * @param string $b The second operand. - * - * @return string */ private function doAdd(string $a, string $b) : string { @@ -363,11 +329,6 @@ class NativeCalculator extends Calculator /** * Performs the subtraction of two non-signed large integers. - * - * @param string $a The first operand. - * @param string $b The second operand. - * - * @return string */ private function doSub(string $a, string $b) : string { @@ -445,11 +406,6 @@ class NativeCalculator extends Calculator /** * Performs the multiplication of two non-signed large integers. - * - * @param string $a The first operand. - * @param string $b The second operand. - * - * @return string */ private function doMul(string $a, string $b) : string { @@ -522,9 +478,6 @@ class NativeCalculator extends Calculator /** * Performs the division of two non-signed large integers. * - * @param string $a The first operand. - * @param string $b The second operand. - * * @return string[] The quotient and remainder. */ private function doDiv(string $a, string $b) : array @@ -583,9 +536,6 @@ class NativeCalculator extends Calculator /** * Compares two non-signed large numbers. * - * @param string $a The first operand. - * @param string $b The second operand. - * * @return int [-1, 0, 1] */ private function doCmp(string $a, string $b) : int @@ -607,9 +557,6 @@ class NativeCalculator extends Calculator * * The numbers must only consist of digits, without leading minus sign. * - * @param string $a The first operand. - * @param string $b The second operand. - * * @return array{string, string, int} */ private function pad(string $a, string $b) : array diff --git a/vendor/codexshaper/laravel-woocommerce/composer.json b/vendor/codexshaper/laravel-woocommerce/composer.json index ce946951..08a29d38 100644 --- a/vendor/codexshaper/laravel-woocommerce/composer.json +++ b/vendor/codexshaper/laravel-woocommerce/composer.json @@ -16,7 +16,7 @@ }, "require-dev": { "phpunit/phpunit": "^7.0|^8.0|^9.3", - "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0" + "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0" }, "license": "MIT", "authors": [ @@ -60,6 +60,7 @@ "Variation": "Codexshaper\\WooCommerce\\Models\\Variation", "Webhook": "Codexshaper\\WooCommerce\\Facades\\Webhook", "WooCommerce": "Codexshaper\\WooCommerce\\Facades\\WooCommerce", + "WooAnalytics": "Codexshaper\\WooCommerce\\Facades\\WooAnalytics", "Query": "Codexshaper\\WooCommerce\\Facades\\Query" } } diff --git a/vendor/codexshaper/laravel-woocommerce/src/Query.php b/vendor/codexshaper/laravel-woocommerce/src/Query.php index 3429ac34..0a8f9f9f 100644 --- a/vendor/codexshaper/laravel-woocommerce/src/Query.php +++ b/vendor/codexshaper/laravel-woocommerce/src/Query.php @@ -2,10 +2,10 @@ namespace Codexshaper\WooCommerce; -use Codexshaper\WooCommerce\Models\BaseMOdel; +use Codexshaper\WooCommerce\Models\BaseModel; use Codexshaper\WooCommerce\Traits\QueryBuilderTrait; -class Query extends BaseMOdel +class Query extends BaseModel { use QueryBuilderTrait; diff --git a/vendor/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php b/vendor/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php index dbd3c50b..5e5d4916 100644 --- a/vendor/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php +++ b/vendor/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php @@ -345,7 +345,7 @@ trait QueryBuilderTrait ]; $results = [ - 'meta' => $pagination, + 'meta' => $pagination, 'data' => $data, ]; diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 6f506443..a325e6ad 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -13,9 +13,17 @@ return array( 'App\\Category' => $baseDir . '/app/Category.php', 'App\\Clientegm' => $baseDir . '/app/Clientegm.php', 'App\\Clientegmdest' => $baseDir . '/app/Clientegmdest.php', + 'App\\Console\\Commands\\OrderUpdateGm' => $baseDir . '/app/Console/Commands/OrderUpdateGm.php', + 'App\\Console\\Commands\\ProductUpdateGm' => $baseDir . '/app/Console/Commands/ProductUpdateGm.php', + 'App\\Console\\Commands\\ProductUpdateQta' => $baseDir . '/app/Console/Commands/ProductUpdateQta.php', + 'App\\Console\\Commands\\ProductUpdateUsedGm' => $baseDir . '/app/Console/Commands/ProductUpdateUsedGm.php', + 'App\\Console\\Commands\\Test' => $baseDir . '/app/Console/Commands/Test.php', + 'App\\Console\\Commands\\TestPao' => $baseDir . '/app/Console/Commands/TestPao.php', 'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php', 'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php', + 'App\\Gm_product' => $baseDir . '/app/Gm_product.php', 'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Controllers\\TestPaoController' => $baseDir . '/app/Http/Controllers/TestPaoController.php', 'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php', 'App\\Http\\Middleware\\Authenticate' => $baseDir . '/app/Http/Middleware/Authenticate.php', 'App\\Http\\Middleware\\CheckForMaintenanceMode' => $baseDir . '/app/Http/Middleware/CheckForMaintenanceMode.php', @@ -25,6 +33,7 @@ return array( 'App\\Http\\Middleware\\TrustHosts' => $baseDir . '/app/Http/Middleware/TrustHosts.php', 'App\\Http\\Middleware\\TrustProxies' => $baseDir . '/app/Http/Middleware/TrustProxies.php', 'App\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/app/Http/Middleware/VerifyCsrfToken.php', + 'App\\Mylog' => $baseDir . '/app/Mylog.php', 'App\\Newproduct' => $baseDir . '/app/Newproduct.php', 'App\\Order' => $baseDir . '/app/Order.php', 'App\\Orderdetail' => $baseDir . '/app/Orderdetail.php', @@ -34,6 +43,7 @@ return array( 'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php', 'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php', 'App\\Publisher' => $baseDir . '/app/Publisher.php', + 'App\\Setting' => $baseDir . '/app/Setting.php', 'App\\Statusproduct' => $baseDir . '/app/Statusproduct.php', 'App\\Stock' => $baseDir . '/app/Stock.php', 'App\\User' => $baseDir . '/app/User.php', @@ -63,6 +73,7 @@ return array( 'Brick\\Math\\Internal\\Calculator\\GmpCalculator' => $vendorDir . '/brick/math/src/Internal/Calculator/GmpCalculator.php', 'Brick\\Math\\Internal\\Calculator\\NativeCalculator' => $vendorDir . '/brick/math/src/Internal/Calculator/NativeCalculator.php', 'Brick\\Math\\RoundingMode' => $vendorDir . '/brick/math/src/RoundingMode.php', + 'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php', 'Carbon\\AbstractTranslator' => $vendorDir . '/nesbot/carbon/src/Carbon/AbstractTranslator.php', 'Carbon\\Carbon' => $vendorDir . '/nesbot/carbon/src/Carbon/Carbon.php', 'Carbon\\CarbonConverterInterface' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonConverterInterface.php', @@ -70,19 +81,21 @@ return array( 'Carbon\\CarbonInterface' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterface.php', 'Carbon\\CarbonInterval' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonInterval.php', 'Carbon\\CarbonPeriod' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonPeriod.php', + 'Carbon\\CarbonPeriodImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php', 'Carbon\\CarbonTimeZone' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonTimeZone.php', 'Carbon\\Cli\\Invoker' => $vendorDir . '/nesbot/carbon/src/Carbon/Cli/Invoker.php', - 'Carbon\\Doctrine\\CarbonDoctrineType' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php', - 'Carbon\\Doctrine\\CarbonImmutableType' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php', - 'Carbon\\Doctrine\\CarbonType' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php', - 'Carbon\\Doctrine\\CarbonTypeConverter' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php', - 'Carbon\\Doctrine\\DateTimeDefaultPrecision' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php', - 'Carbon\\Doctrine\\DateTimeImmutableType' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php', - 'Carbon\\Doctrine\\DateTimeType' => $vendorDir . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php', + 'Carbon\\Doctrine\\CarbonDoctrineType' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php', + 'Carbon\\Doctrine\\CarbonImmutableType' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php', + 'Carbon\\Doctrine\\CarbonType' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonType.php', + 'Carbon\\Doctrine\\CarbonTypeConverter' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonTypeConverter.php', + 'Carbon\\Doctrine\\DateTimeDefaultPrecision' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php', + 'Carbon\\Doctrine\\DateTimeImmutableType' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php', + 'Carbon\\Doctrine\\DateTimeType' => $vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeType.php', 'Carbon\\Exceptions\\BadComparisonUnitException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php', 'Carbon\\Exceptions\\BadFluentConstructorException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php', 'Carbon\\Exceptions\\BadFluentSetterException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php', 'Carbon\\Exceptions\\BadMethodCallException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php', + 'Carbon\\Exceptions\\EndLessPeriodException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php', 'Carbon\\Exceptions\\Exception' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/Exception.php', 'Carbon\\Exceptions\\ImmutableException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php', 'Carbon\\Exceptions\\InvalidArgumentException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php', @@ -111,6 +124,7 @@ return array( 'Carbon\\FactoryImmutable' => $vendorDir . '/nesbot/carbon/src/Carbon/FactoryImmutable.php', 'Carbon\\Language' => $vendorDir . '/nesbot/carbon/src/Carbon/Language.php', 'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', + 'Carbon\\MessageFormatter\\MessageFormatterMapper' => $vendorDir . '/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php', 'Carbon\\PHPStan\\AbstractMacro' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 'Carbon\\PHPStan\\Macro' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', 'Carbon\\PHPStan\\MacroExtension' => $vendorDir . '/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php', @@ -127,6 +141,7 @@ return array( 'Carbon\\Traits\\IntervalStep' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/IntervalStep.php', 'Carbon\\Traits\\Localization' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Localization.php', 'Carbon\\Traits\\Macro' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Macro.php', + 'Carbon\\Traits\\MagicParameter' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/MagicParameter.php', 'Carbon\\Traits\\Mixin' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Mixin.php', 'Carbon\\Traits\\Modifiers' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Modifiers.php', 'Carbon\\Traits\\Mutability' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Mutability.php', @@ -136,6 +151,7 @@ return array( 'Carbon\\Traits\\Serialization' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Serialization.php', 'Carbon\\Traits\\Test' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Test.php', 'Carbon\\Traits\\Timestamp' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Timestamp.php', + 'Carbon\\Traits\\ToStringFormat' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/ToStringFormat.php', 'Carbon\\Traits\\Units' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Units.php', 'Carbon\\Traits\\Week' => $vendorDir . '/nesbot/carbon/src/Carbon/Traits/Week.php', 'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php', @@ -157,6 +173,7 @@ return array( 'Codexshaper\\WooCommerce\\Facades\\ShippingMethod' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/ShippingMethod.php', 'Codexshaper\\WooCommerce\\Facades\\ShippingZone' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/ShippingZone.php', 'Codexshaper\\WooCommerce\\Facades\\ShippingZoneMethod' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/ShippingZoneMethod.php', + 'Codexshaper\\WooCommerce\\Facades\\Subscription' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Subscription.php', 'Codexshaper\\WooCommerce\\Facades\\System' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/System.php', 'Codexshaper\\WooCommerce\\Facades\\Tag' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Tag.php', 'Codexshaper\\WooCommerce\\Facades\\Tax' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Tax.php', @@ -164,6 +181,7 @@ return array( 'Codexshaper\\WooCommerce\\Facades\\Term' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Term.php', 'Codexshaper\\WooCommerce\\Facades\\Variation' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Variation.php', 'Codexshaper\\WooCommerce\\Facades\\Webhook' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/Webhook.php', + 'Codexshaper\\WooCommerce\\Facades\\WooAnalytics' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/WooAnalytics.php', 'Codexshaper\\WooCommerce\\Facades\\WooCommerce' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Facades/WooCommerce.php', 'Codexshaper\\WooCommerce\\Models\\Attribute' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/Attribute.php', 'Codexshaper\\WooCommerce\\Models\\BaseModel' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/BaseModel.php', @@ -180,6 +198,7 @@ return array( 'Codexshaper\\WooCommerce\\Models\\Setting' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/Setting.php', 'Codexshaper\\WooCommerce\\Models\\ShippingMethod' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/ShippingMethod.php', 'Codexshaper\\WooCommerce\\Models\\ShippingZone' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/ShippingZone.php', + 'Codexshaper\\WooCommerce\\Models\\Subscription' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/Subscription.php', 'Codexshaper\\WooCommerce\\Models\\System' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/System.php', 'Codexshaper\\WooCommerce\\Models\\Tag' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/Tag.php', 'Codexshaper\\WooCommerce\\Models\\Tax' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Models/Tax.php', @@ -190,6 +209,7 @@ return array( 'Codexshaper\\WooCommerce\\Query' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Query.php', 'Codexshaper\\WooCommerce\\Traits\\QueryBuilderTrait' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php', 'Codexshaper\\WooCommerce\\Traits\\WooCommerceTrait' => $vendorDir . '/codexshaper/laravel-woocommerce/src/Traits/WooCommerceTrait.php', + 'Codexshaper\\WooCommerce\\WooCommerceAnalyticsApi' => $vendorDir . '/codexshaper/laravel-woocommerce/src/WooCommerceAnalyticsApi.php', 'Codexshaper\\WooCommerce\\WooCommerceApi' => $vendorDir . '/codexshaper/laravel-woocommerce/src/WooCommerceApi.php', 'Codexshaper\\WooCommerce\\WooCommerceServiceProvider' => $vendorDir . '/codexshaper/laravel-woocommerce/src/WooCommerceServiceProvider.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', @@ -206,6 +226,7 @@ return array( 'DeepCopy\\DeepCopy' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', 'DeepCopy\\Exception\\CloneException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', 'DeepCopy\\Exception\\PropertyException' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', + 'DeepCopy\\Filter\\ChainableFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', @@ -521,10 +542,16 @@ return array( 'Faker\\Calculator\\Luhn' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/Luhn.php', 'Faker\\Calculator\\TCNo' => $vendorDir . '/fakerphp/faker/src/Faker/Calculator/TCNo.php', 'Faker\\ChanceGenerator' => $vendorDir . '/fakerphp/faker/src/Faker/ChanceGenerator.php', + 'Faker\\Container\\Container' => $vendorDir . '/fakerphp/faker/src/Faker/Container/Container.php', + 'Faker\\Container\\ContainerBuilder' => $vendorDir . '/fakerphp/faker/src/Faker/Container/ContainerBuilder.php', + 'Faker\\Container\\ContainerException' => $vendorDir . '/fakerphp/faker/src/Faker/Container/ContainerException.php', + 'Faker\\Container\\ContainerInterface' => $vendorDir . '/fakerphp/faker/src/Faker/Container/ContainerInterface.php', + 'Faker\\Container\\NotInContainerException' => $vendorDir . '/fakerphp/faker/src/Faker/Container/NotInContainerException.php', 'Faker\\Core\\Barcode' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Barcode.php', 'Faker\\Core\\Blood' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Blood.php', 'Faker\\Core\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Color.php', 'Faker\\Core\\Coordinates' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Coordinates.php', + 'Faker\\Core\\DateTime' => $vendorDir . '/fakerphp/faker/src/Faker/Core/DateTime.php', 'Faker\\Core\\File' => $vendorDir . '/fakerphp/faker/src/Faker/Core/File.php', 'Faker\\Core\\Number' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Number.php', 'Faker\\Core\\Uuid' => $vendorDir . '/fakerphp/faker/src/Faker/Core/Uuid.php', @@ -536,17 +563,14 @@ return array( 'Faker\\Extension\\BloodExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/BloodExtension.php', 'Faker\\Extension\\ColorExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/ColorExtension.php', 'Faker\\Extension\\CompanyExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/CompanyExtension.php', - 'Faker\\Extension\\Container' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/Container.php', - 'Faker\\Extension\\ContainerBuilder' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/ContainerBuilder.php', - 'Faker\\Extension\\ContainerException' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/ContainerException.php', 'Faker\\Extension\\CountryExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/CountryExtension.php', + 'Faker\\Extension\\DateTimeExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/DateTimeExtension.php', 'Faker\\Extension\\Extension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/Extension.php', 'Faker\\Extension\\ExtensionNotFound' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/ExtensionNotFound.php', 'Faker\\Extension\\FileExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/FileExtension.php', 'Faker\\Extension\\GeneratorAwareExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/GeneratorAwareExtension.php', 'Faker\\Extension\\GeneratorAwareExtensionTrait' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/GeneratorAwareExtensionTrait.php', 'Faker\\Extension\\Helper' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/Helper.php', - 'Faker\\Extension\\NotInContainerException' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/NotInContainerException.php', 'Faker\\Extension\\NumberExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/NumberExtension.php', 'Faker\\Extension\\PersonExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/PersonExtension.php', 'Faker\\Extension\\PhoneNumberExtension' => $vendorDir . '/fakerphp/faker/src/Faker/Extension/PhoneNumberExtension.php', @@ -749,16 +773,19 @@ return array( 'Faker\\Provider\\fi_FI\\Person' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php', 'Faker\\Provider\\fi_FI\\PhoneNumber' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fi_FI/PhoneNumber.php', 'Faker\\Provider\\fr_BE\\Address' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Address.php', + 'Faker\\Provider\\fr_BE\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Color.php', 'Faker\\Provider\\fr_BE\\Company' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Company.php', 'Faker\\Provider\\fr_BE\\Internet' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Internet.php', 'Faker\\Provider\\fr_BE\\Payment' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Payment.php', 'Faker\\Provider\\fr_BE\\Person' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/Person.php', 'Faker\\Provider\\fr_BE\\PhoneNumber' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_BE/PhoneNumber.php', 'Faker\\Provider\\fr_CA\\Address' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CA/Address.php', + 'Faker\\Provider\\fr_CA\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CA/Color.php', 'Faker\\Provider\\fr_CA\\Company' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CA/Company.php', 'Faker\\Provider\\fr_CA\\Person' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CA/Person.php', 'Faker\\Provider\\fr_CA\\Text' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CA/Text.php', 'Faker\\Provider\\fr_CH\\Address' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Address.php', + 'Faker\\Provider\\fr_CH\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Color.php', 'Faker\\Provider\\fr_CH\\Company' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Company.php', 'Faker\\Provider\\fr_CH\\Internet' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Internet.php', 'Faker\\Provider\\fr_CH\\Payment' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Payment.php', @@ -766,6 +793,7 @@ return array( 'Faker\\Provider\\fr_CH\\PhoneNumber' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/PhoneNumber.php', 'Faker\\Provider\\fr_CH\\Text' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_CH/Text.php', 'Faker\\Provider\\fr_FR\\Address' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php', + 'Faker\\Provider\\fr_FR\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_FR/Color.php', 'Faker\\Provider\\fr_FR\\Company' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php', 'Faker\\Provider\\fr_FR\\Internet' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_FR/Internet.php', 'Faker\\Provider\\fr_FR\\Payment' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/fr_FR/Payment.php', @@ -900,6 +928,7 @@ return array( 'Faker\\Provider\\nl_NL\\PhoneNumber' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/nl_NL/PhoneNumber.php', 'Faker\\Provider\\nl_NL\\Text' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/nl_NL/Text.php', 'Faker\\Provider\\pl_PL\\Address' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php', + 'Faker\\Provider\\pl_PL\\Color' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/pl_PL/Color.php', 'Faker\\Provider\\pl_PL\\Company' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/pl_PL/Company.php', 'Faker\\Provider\\pl_PL\\Internet' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php', 'Faker\\Provider\\pl_PL\\LicensePlate' => $vendorDir . '/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php', @@ -1093,6 +1122,7 @@ return array( 'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php', 'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php', 'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => $vendorDir . '/guzzlehttp/psr7/src/UriComparator.php', 'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php', 'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php', 'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php', @@ -2307,13 +2337,13 @@ return array( 'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php', 'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php', 'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php', + 'League\\MimeTypeDetection\\ExtensionLookup' => $vendorDir . '/league/mime-type-detection/src/ExtensionLookup.php', 'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php', 'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php', 'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php', 'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php', 'League\\MimeTypeDetection\\MimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/MimeTypeDetector.php', 'League\\MimeTypeDetection\\OverridingExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/OverridingExtensionToMimeTypeMap.php', - 'Mockery' => $vendorDir . '/mockery/mockery/library/Mockery.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditions' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php', 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', @@ -2327,6 +2357,7 @@ return array( 'Mockery\\CountValidator\\AtLeast' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', 'Mockery\\CountValidator\\AtMost' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', 'Mockery\\CountValidator\\CountValidatorAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\CountValidatorInterface' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php', 'Mockery\\CountValidator\\Exact' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', 'Mockery\\CountValidator\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', 'Mockery\\Exception' => $vendorDir . '/mockery/mockery/library/Mockery/Exception.php', @@ -2334,6 +2365,7 @@ return array( 'Mockery\\Exception\\InvalidArgumentException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php', 'Mockery\\Exception\\InvalidCountException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', 'Mockery\\Exception\\InvalidOrderException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\MockeryExceptionInterface' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php', 'Mockery\\Exception\\NoMatchingExpectationException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', 'Mockery\\Exception\\RuntimeException' => $vendorDir . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', 'Mockery\\Expectation' => $vendorDir . '/mockery/mockery/library/Mockery/Expectation.php', @@ -2352,6 +2384,7 @@ return array( 'Mockery\\Generator\\StringManipulationGenerator' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', 'Mockery\\Generator\\StringManipulation\\Pass\\AvoidMethodClashPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassAttributesPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ConstantsPass' => $vendorDir . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php', @@ -2382,7 +2415,10 @@ return array( 'Mockery\\Matcher\\Ducktype' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', 'Mockery\\Matcher\\HasKey' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', 'Mockery\\Matcher\\HasValue' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\IsEqual' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/IsEqual.php', + 'Mockery\\Matcher\\IsSame' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/IsSame.php', 'Mockery\\Matcher\\MatcherAbstract' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MatcherInterface' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php', 'Mockery\\Matcher\\MultiArgumentClosure' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php', 'Mockery\\Matcher\\MustBe' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', 'Mockery\\Matcher\\NoArgs' => $vendorDir . '/mockery/mockery/library/Mockery/Matcher/NoArgs.php', @@ -2410,6 +2446,7 @@ return array( 'Monolog\\Formatter\\FluentdFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php', 'Monolog\\Formatter\\FormatterInterface' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php', 'Monolog\\Formatter\\GelfMessageFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php', + 'Monolog\\Formatter\\GoogleCloudLoggingFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php', 'Monolog\\Formatter\\HtmlFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php', 'Monolog\\Formatter\\JsonFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php', 'Monolog\\Formatter\\LineFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', @@ -2485,6 +2522,7 @@ return array( 'Monolog\\Handler\\SqsHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SqsHandler.php', 'Monolog\\Handler\\StreamHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', 'Monolog\\Handler\\SwiftMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', + 'Monolog\\Handler\\SymfonyMailerHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php', 'Monolog\\Handler\\SyslogHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogHandler.php', 'Monolog\\Handler\\SyslogUdpHandler' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php', 'Monolog\\Handler\\SyslogUdp\\UdpSocket' => $vendorDir . '/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php', @@ -2603,6 +2641,7 @@ return array( 'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', 'PHPUnit\\Framework\\Constraint\\Operator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', 'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', 'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', @@ -2647,6 +2686,7 @@ return array( 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', 'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php', 'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php', 'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php', @@ -2832,8 +2872,8 @@ return array( 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistDirectoriesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistDirectoriesToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php', 'PHPUnit\\TextUI\\XmlConfiguration\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php', 'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php', @@ -2856,6 +2896,7 @@ return array( 'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php', 'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php', 'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit\\Util\\Cloner' => $vendorDir . '/phpunit/phpunit/src/Util/Cloner.php', 'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', 'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php', @@ -2872,6 +2913,7 @@ return array( 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', 'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => $vendorDir . '/phpunit/phpunit/src/Util/Reflection.php', 'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php', 'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', @@ -2938,6 +2980,7 @@ return array( 'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php', 'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', 'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php', + 'PharIo\\Manifest\\NoEmailAddressException' => $vendorDir . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', 'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php', 'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', 'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php', @@ -3002,23 +3045,22 @@ return array( 'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', 'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', 'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', 'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Modifiers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Modifiers.php', 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -3029,19 +3071,22 @@ return array( 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', 'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', 'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', @@ -3102,7 +3147,6 @@ return array( 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', @@ -3137,6 +3181,7 @@ return array( 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', @@ -3144,11 +3189,11 @@ return array( 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\Float_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', @@ -3159,7 +3204,9 @@ return array( 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', @@ -3169,7 +3216,6 @@ return array( 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', @@ -3193,12 +3239,9 @@ return array( 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', @@ -3206,116 +3249,24 @@ return array( 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\Parser\\Php8' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Token.php', 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'Prophecy\\Argument' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument.php', - 'Prophecy\\Argument\\ArgumentsWildcard' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php', - 'Prophecy\\Argument\\Token\\AnyValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php', - 'Prophecy\\Argument\\Token\\AnyValuesToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php', - 'Prophecy\\Argument\\Token\\ApproximateValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php', - 'Prophecy\\Argument\\Token\\ArrayCountToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php', - 'Prophecy\\Argument\\Token\\ArrayEntryToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php', - 'Prophecy\\Argument\\Token\\ArrayEveryEntryToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php', - 'Prophecy\\Argument\\Token\\CallbackToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php', - 'Prophecy\\Argument\\Token\\ExactValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php', - 'Prophecy\\Argument\\Token\\IdenticalValueToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php', - 'Prophecy\\Argument\\Token\\InArrayToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php', - 'Prophecy\\Argument\\Token\\LogicalAndToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php', - 'Prophecy\\Argument\\Token\\LogicalNotToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php', - 'Prophecy\\Argument\\Token\\NotInArrayToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php', - 'Prophecy\\Argument\\Token\\ObjectStateToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php', - 'Prophecy\\Argument\\Token\\StringContainsToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php', - 'Prophecy\\Argument\\Token\\TokenInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php', - 'Prophecy\\Argument\\Token\\TypeToken' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php', - 'Prophecy\\Call\\Call' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Call/Call.php', - 'Prophecy\\Call\\CallCenter' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Call/CallCenter.php', - 'Prophecy\\Comparator\\ClosureComparator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php', - 'Prophecy\\Comparator\\Factory' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/Factory.php', - 'Prophecy\\Comparator\\ProphecyComparator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php', - 'Prophecy\\Doubler\\CachedDoubler' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php', - 'Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php', - 'Prophecy\\Doubler\\ClassPatch\\DisableConstructorPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\HhvmExceptionPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\KeywordPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\MagicCallPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', - 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ThrowablePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php', - 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', - 'Prophecy\\Doubler\\DoubleInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', - 'Prophecy\\Doubler\\Doubler' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', - 'Prophecy\\Doubler\\Generator\\ClassCodeGenerator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php', - 'Prophecy\\Doubler\\Generator\\ClassCreator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php', - 'Prophecy\\Doubler\\Generator\\ClassMirror' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php', - 'Prophecy\\Doubler\\Generator\\Node\\ArgumentNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ArgumentTypeNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ClassNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\MethodNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ReturnTypeNode' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\TypeNodeAbstract' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php', - 'Prophecy\\Doubler\\Generator\\ReflectionInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php', - 'Prophecy\\Doubler\\Generator\\TypeHintReference' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php', - 'Prophecy\\Doubler\\LazyDouble' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php', - 'Prophecy\\Doubler\\NameGenerator' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php', - 'Prophecy\\Exception\\Call\\UnexpectedCallException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php', - 'Prophecy\\Exception\\Doubler\\ClassCreatorException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php', - 'Prophecy\\Exception\\Doubler\\ClassMirrorException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php', - 'Prophecy\\Exception\\Doubler\\ClassNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\DoubleException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php', - 'Prophecy\\Exception\\Doubler\\DoublerException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php', - 'Prophecy\\Exception\\Doubler\\InterfaceNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\MethodNotExtendableException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php', - 'Prophecy\\Exception\\Doubler\\MethodNotFoundException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\ReturnByReferenceException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php', - 'Prophecy\\Exception\\Exception' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Exception.php', - 'Prophecy\\Exception\\InvalidArgumentException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php', - 'Prophecy\\Exception\\Prediction\\AggregateException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php', - 'Prophecy\\Exception\\Prediction\\FailedPredictionException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php', - 'Prophecy\\Exception\\Prediction\\NoCallsException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php', - 'Prophecy\\Exception\\Prediction\\PredictionException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php', - 'Prophecy\\Exception\\Prediction\\UnexpectedCallsCountException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php', - 'Prophecy\\Exception\\Prediction\\UnexpectedCallsException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php', - 'Prophecy\\Exception\\Prophecy\\MethodProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php', - 'Prophecy\\Exception\\Prophecy\\ObjectProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php', - 'Prophecy\\Exception\\Prophecy\\ProphecyException' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php', - 'Prophecy\\PhpDocumentor\\ClassAndInterfaceTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php', - 'Prophecy\\PhpDocumentor\\ClassTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php', - 'Prophecy\\PhpDocumentor\\LegacyClassTagRetriever' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php', - 'Prophecy\\PhpDocumentor\\MethodTagRetrieverInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php', - 'Prophecy\\Prediction\\CallPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php', - 'Prophecy\\Prediction\\CallTimesPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php', - 'Prophecy\\Prediction\\CallbackPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php', - 'Prophecy\\Prediction\\NoCallsPrediction' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php', - 'Prophecy\\Prediction\\PredictionInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php', - 'Prophecy\\Promise\\CallbackPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php', - 'Prophecy\\Promise\\PromiseInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php', - 'Prophecy\\Promise\\ReturnArgumentPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php', - 'Prophecy\\Promise\\ReturnPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php', - 'Prophecy\\Promise\\ThrowPromise' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php', - 'Prophecy\\Prophecy\\MethodProphecy' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php', - 'Prophecy\\Prophecy\\ObjectProphecy' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php', - 'Prophecy\\Prophecy\\ProphecyInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php', - 'Prophecy\\Prophecy\\ProphecySubjectInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php', - 'Prophecy\\Prophecy\\Revealer' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php', - 'Prophecy\\Prophecy\\RevealerInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php', - 'Prophecy\\Prophet' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Prophet.php', - 'Prophecy\\Util\\ExportUtil' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php', - 'Prophecy\\Util\\StringUtil' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Util/StringUtil.php', + 'Psr\\Clock\\ClockInterface' => $vendorDir . '/psr/clock/src/ClockInterface.php', 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', @@ -3362,7 +3313,6 @@ return array( 'Psy\\CodeCleaner\\FunctionContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/FunctionContextPass.php', 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php', 'Psy\\CodeCleaner\\ImplicitReturnPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php', - 'Psy\\CodeCleaner\\InstanceOfPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/InstanceOfPass.php', 'Psy\\CodeCleaner\\IssetPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/IssetPass.php', 'Psy\\CodeCleaner\\LabelContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/LabelContextPass.php', 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => $vendorDir . '/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php', @@ -3382,6 +3332,7 @@ return array( 'Psy\\CodeCleaner\\ValidFunctionNamePass' => $vendorDir . '/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php', 'Psy\\Command\\BufferCommand' => $vendorDir . '/psy/psysh/src/Command/BufferCommand.php', 'Psy\\Command\\ClearCommand' => $vendorDir . '/psy/psysh/src/Command/ClearCommand.php', + 'Psy\\Command\\CodeArgumentParser' => $vendorDir . '/psy/psysh/src/Command/CodeArgumentParser.php', 'Psy\\Command\\Command' => $vendorDir . '/psy/psysh/src/Command/Command.php', 'Psy\\Command\\DocCommand' => $vendorDir . '/psy/psysh/src/Command/DocCommand.php', 'Psy\\Command\\DumpCommand' => $vendorDir . '/psy/psysh/src/Command/DumpCommand.php', @@ -3412,7 +3363,6 @@ return array( 'Psy\\Command\\WtfCommand' => $vendorDir . '/psy/psysh/src/Command/WtfCommand.php', 'Psy\\ConfigPaths' => $vendorDir . '/psy/psysh/src/ConfigPaths.php', 'Psy\\Configuration' => $vendorDir . '/psy/psysh/src/Configuration.php', - 'Psy\\ConsoleColorFactory' => $vendorDir . '/psy/psysh/src/ConsoleColorFactory.php', 'Psy\\Context' => $vendorDir . '/psy/psysh/src/Context.php', 'Psy\\ContextAware' => $vendorDir . '/psy/psysh/src/ContextAware.php', 'Psy\\EnvInterface' => $vendorDir . '/psy/psysh/src/EnvInterface.php', @@ -3424,7 +3374,6 @@ return array( 'Psy\\Exception\\ParseErrorException' => $vendorDir . '/psy/psysh/src/Exception/ParseErrorException.php', 'Psy\\Exception\\RuntimeException' => $vendorDir . '/psy/psysh/src/Exception/RuntimeException.php', 'Psy\\Exception\\ThrowUpException' => $vendorDir . '/psy/psysh/src/Exception/ThrowUpException.php', - 'Psy\\Exception\\TypeErrorException' => $vendorDir . '/psy/psysh/src/Exception/TypeErrorException.php', 'Psy\\Exception\\UnexpectedTargetException' => $vendorDir . '/psy/psysh/src/Exception/UnexpectedTargetException.php', 'Psy\\ExecutionClosure' => $vendorDir . '/psy/psysh/src/ExecutionClosure.php', 'Psy\\ExecutionLoopClosure' => $vendorDir . '/psy/psysh/src/ExecutionLoopClosure.php', @@ -3434,7 +3383,6 @@ return array( 'Psy\\ExecutionLoop\\RunkitReloader' => $vendorDir . '/psy/psysh/src/ExecutionLoop/RunkitReloader.php', 'Psy\\Formatter\\CodeFormatter' => $vendorDir . '/psy/psysh/src/Formatter/CodeFormatter.php', 'Psy\\Formatter\\DocblockFormatter' => $vendorDir . '/psy/psysh/src/Formatter/DocblockFormatter.php', - 'Psy\\Formatter\\Formatter' => $vendorDir . '/psy/psysh/src/Formatter/Formatter.php', 'Psy\\Formatter\\ReflectorFormatter' => $vendorDir . '/psy/psysh/src/Formatter/ReflectorFormatter.php', 'Psy\\Formatter\\SignatureFormatter' => $vendorDir . '/psy/psysh/src/Formatter/SignatureFormatter.php', 'Psy\\Formatter\\TraceFormatter' => $vendorDir . '/psy/psysh/src/Formatter/TraceFormatter.php', @@ -3446,15 +3394,69 @@ return array( 'Psy\\Output\\PassthruPager' => $vendorDir . '/psy/psysh/src/Output/PassthruPager.php', 'Psy\\Output\\ProcOutputPager' => $vendorDir . '/psy/psysh/src/Output/ProcOutputPager.php', 'Psy\\Output\\ShellOutput' => $vendorDir . '/psy/psysh/src/Output/ShellOutput.php', + 'Psy\\Output\\Theme' => $vendorDir . '/psy/psysh/src/Output/Theme.php', 'Psy\\ParserFactory' => $vendorDir . '/psy/psysh/src/ParserFactory.php', 'Psy\\Readline\\GNUReadline' => $vendorDir . '/psy/psysh/src/Readline/GNUReadline.php', - 'Psy\\Readline\\HoaConsole' => $vendorDir . '/psy/psysh/src/Readline/HoaConsole.php', + 'Psy\\Readline\\Hoa\\Autocompleter' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Autocompleter.php', + 'Psy\\Readline\\Hoa\\AutocompleterAggregate' => $vendorDir . '/psy/psysh/src/Readline/Hoa/AutocompleterAggregate.php', + 'Psy\\Readline\\Hoa\\AutocompleterPath' => $vendorDir . '/psy/psysh/src/Readline/Hoa/AutocompleterPath.php', + 'Psy\\Readline\\Hoa\\AutocompleterWord' => $vendorDir . '/psy/psysh/src/Readline/Hoa/AutocompleterWord.php', + 'Psy\\Readline\\Hoa\\Console' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Console.php', + 'Psy\\Readline\\Hoa\\ConsoleCursor' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleCursor.php', + 'Psy\\Readline\\Hoa\\ConsoleException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleException.php', + 'Psy\\Readline\\Hoa\\ConsoleInput' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleInput.php', + 'Psy\\Readline\\Hoa\\ConsoleOutput' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleOutput.php', + 'Psy\\Readline\\Hoa\\ConsoleProcessus' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleProcessus.php', + 'Psy\\Readline\\Hoa\\ConsoleTput' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleTput.php', + 'Psy\\Readline\\Hoa\\ConsoleWindow' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ConsoleWindow.php', + 'Psy\\Readline\\Hoa\\Event' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Event.php', + 'Psy\\Readline\\Hoa\\EventBucket' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventBucket.php', + 'Psy\\Readline\\Hoa\\EventException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventException.php', + 'Psy\\Readline\\Hoa\\EventListenable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventListenable.php', + 'Psy\\Readline\\Hoa\\EventListener' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventListener.php', + 'Psy\\Readline\\Hoa\\EventListens' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventListens.php', + 'Psy\\Readline\\Hoa\\EventSource' => $vendorDir . '/psy/psysh/src/Readline/Hoa/EventSource.php', + 'Psy\\Readline\\Hoa\\Exception' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Exception.php', + 'Psy\\Readline\\Hoa\\ExceptionIdle' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ExceptionIdle.php', + 'Psy\\Readline\\Hoa\\File' => $vendorDir . '/psy/psysh/src/Readline/Hoa/File.php', + 'Psy\\Readline\\Hoa\\FileDirectory' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileDirectory.php', + 'Psy\\Readline\\Hoa\\FileDoesNotExistException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileDoesNotExistException.php', + 'Psy\\Readline\\Hoa\\FileException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileException.php', + 'Psy\\Readline\\Hoa\\FileFinder' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileFinder.php', + 'Psy\\Readline\\Hoa\\FileGeneric' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileGeneric.php', + 'Psy\\Readline\\Hoa\\FileLink' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileLink.php', + 'Psy\\Readline\\Hoa\\FileLinkRead' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileLinkRead.php', + 'Psy\\Readline\\Hoa\\FileLinkReadWrite' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileLinkReadWrite.php', + 'Psy\\Readline\\Hoa\\FileRead' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileRead.php', + 'Psy\\Readline\\Hoa\\FileReadWrite' => $vendorDir . '/psy/psysh/src/Readline/Hoa/FileReadWrite.php', + 'Psy\\Readline\\Hoa\\IStream' => $vendorDir . '/psy/psysh/src/Readline/Hoa/IStream.php', + 'Psy\\Readline\\Hoa\\IteratorFileSystem' => $vendorDir . '/psy/psysh/src/Readline/Hoa/IteratorFileSystem.php', + 'Psy\\Readline\\Hoa\\IteratorRecursiveDirectory' => $vendorDir . '/psy/psysh/src/Readline/Hoa/IteratorRecursiveDirectory.php', + 'Psy\\Readline\\Hoa\\IteratorSplFileInfo' => $vendorDir . '/psy/psysh/src/Readline/Hoa/IteratorSplFileInfo.php', + 'Psy\\Readline\\Hoa\\Protocol' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Protocol.php', + 'Psy\\Readline\\Hoa\\ProtocolException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ProtocolException.php', + 'Psy\\Readline\\Hoa\\ProtocolNode' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ProtocolNode.php', + 'Psy\\Readline\\Hoa\\ProtocolNodeLibrary' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ProtocolNodeLibrary.php', + 'Psy\\Readline\\Hoa\\ProtocolWrapper' => $vendorDir . '/psy/psysh/src/Readline/Hoa/ProtocolWrapper.php', + 'Psy\\Readline\\Hoa\\Readline' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Readline.php', + 'Psy\\Readline\\Hoa\\Stream' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Stream.php', + 'Psy\\Readline\\Hoa\\StreamBufferable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamBufferable.php', + 'Psy\\Readline\\Hoa\\StreamContext' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamContext.php', + 'Psy\\Readline\\Hoa\\StreamException' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamException.php', + 'Psy\\Readline\\Hoa\\StreamIn' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamIn.php', + 'Psy\\Readline\\Hoa\\StreamLockable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamLockable.php', + 'Psy\\Readline\\Hoa\\StreamOut' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamOut.php', + 'Psy\\Readline\\Hoa\\StreamPathable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamPathable.php', + 'Psy\\Readline\\Hoa\\StreamPointable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamPointable.php', + 'Psy\\Readline\\Hoa\\StreamStatable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamStatable.php', + 'Psy\\Readline\\Hoa\\StreamTouchable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/StreamTouchable.php', + 'Psy\\Readline\\Hoa\\Ustring' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Ustring.php', + 'Psy\\Readline\\Hoa\\Xcallable' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Xcallable.php', 'Psy\\Readline\\Libedit' => $vendorDir . '/psy/psysh/src/Readline/Libedit.php', 'Psy\\Readline\\Readline' => $vendorDir . '/psy/psysh/src/Readline/Readline.php', 'Psy\\Readline\\Transient' => $vendorDir . '/psy/psysh/src/Readline/Transient.php', - 'Psy\\Reflection\\ReflectionClassConstant' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionClassConstant.php', + 'Psy\\Readline\\Userland' => $vendorDir . '/psy/psysh/src/Readline/Userland.php', 'Psy\\Reflection\\ReflectionConstant' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionConstant.php', - 'Psy\\Reflection\\ReflectionConstant_' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionConstant_.php', 'Psy\\Reflection\\ReflectionLanguageConstruct' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php', 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php', 'Psy\\Reflection\\ReflectionNamespace' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionNamespace.php', @@ -3462,6 +3464,7 @@ return array( 'Psy\\Sudo' => $vendorDir . '/psy/psysh/src/Sudo.php', 'Psy\\Sudo\\SudoVisitor' => $vendorDir . '/psy/psysh/src/Sudo/SudoVisitor.php', 'Psy\\SuperglobalsEnv' => $vendorDir . '/psy/psysh/src/SuperglobalsEnv.php', + 'Psy\\SystemEnv' => $vendorDir . '/psy/psysh/src/SystemEnv.php', 'Psy\\TabCompletion\\AutoCompleter' => $vendorDir . '/psy/psysh/src/TabCompletion/AutoCompleter.php', 'Psy\\TabCompletion\\Matcher\\AbstractContextAwareMatcher' => $vendorDir . '/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php', 'Psy\\TabCompletion\\Matcher\\AbstractDefaultParametersMatcher' => $vendorDir . '/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php', @@ -3490,9 +3493,15 @@ return array( 'Psy\\VarDumper\\Presenter' => $vendorDir . '/psy/psysh/src/VarDumper/Presenter.php', 'Psy\\VarDumper\\PresenterAware' => $vendorDir . '/psy/psysh/src/VarDumper/PresenterAware.php', 'Psy\\VersionUpdater\\Checker' => $vendorDir . '/psy/psysh/src/VersionUpdater/Checker.php', + 'Psy\\VersionUpdater\\Downloader' => $vendorDir . '/psy/psysh/src/VersionUpdater/Downloader.php', + 'Psy\\VersionUpdater\\Downloader\\CurlDownloader' => $vendorDir . '/psy/psysh/src/VersionUpdater/Downloader/CurlDownloader.php', + 'Psy\\VersionUpdater\\Downloader\\Factory' => $vendorDir . '/psy/psysh/src/VersionUpdater/Downloader/Factory.php', + 'Psy\\VersionUpdater\\Downloader\\FileDownloader' => $vendorDir . '/psy/psysh/src/VersionUpdater/Downloader/FileDownloader.php', 'Psy\\VersionUpdater\\GitHubChecker' => $vendorDir . '/psy/psysh/src/VersionUpdater/GitHubChecker.php', + 'Psy\\VersionUpdater\\Installer' => $vendorDir . '/psy/psysh/src/VersionUpdater/Installer.php', 'Psy\\VersionUpdater\\IntervalChecker' => $vendorDir . '/psy/psysh/src/VersionUpdater/IntervalChecker.php', 'Psy\\VersionUpdater\\NoopChecker' => $vendorDir . '/psy/psysh/src/VersionUpdater/NoopChecker.php', + 'Psy\\VersionUpdater\\SelfUpdate' => $vendorDir . '/psy/psysh/src/VersionUpdater/SelfUpdate.php', 'Ramsey\\Collection\\AbstractArray' => $vendorDir . '/ramsey/collection/src/AbstractArray.php', 'Ramsey\\Collection\\AbstractCollection' => $vendorDir . '/ramsey/collection/src/AbstractCollection.php', 'Ramsey\\Collection\\AbstractSet' => $vendorDir . '/ramsey/collection/src/AbstractSet.php', @@ -3543,6 +3552,7 @@ return array( 'Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', 'Ramsey\\Uuid\\Converter\\Time\\GenericTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php', 'Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\UnixTimeConverter' => $vendorDir . '/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php', 'Ramsey\\Uuid\\DegradedUuid' => $vendorDir . '/ramsey/uuid/src/DegradedUuid.php', 'Ramsey\\Uuid\\DeprecatedUuidInterface' => $vendorDir . '/ramsey/uuid/src/DeprecatedUuidInterface.php', 'Ramsey\\Uuid\\DeprecatedUuidMethodsTrait' => $vendorDir . '/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php', @@ -3578,6 +3588,7 @@ return array( 'Ramsey\\Uuid\\Generator\\RandomLibAdapter' => $vendorDir . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', 'Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', 'Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => $vendorDir . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'Ramsey\\Uuid\\Generator\\UnixTimeGenerator' => $vendorDir . '/ramsey/uuid/src/Generator/UnixTimeGenerator.php', 'Ramsey\\Uuid\\Guid\\Fields' => $vendorDir . '/ramsey/uuid/src/Guid/Fields.php', 'Ramsey\\Uuid\\Guid\\Guid' => $vendorDir . '/ramsey/uuid/src/Guid/Guid.php', 'Ramsey\\Uuid\\Guid\\GuidBuilder' => $vendorDir . '/ramsey/uuid/src/Guid/GuidBuilder.php', @@ -3602,8 +3613,11 @@ return array( 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', 'Ramsey\\Uuid\\Rfc4122\\Fields' => $vendorDir . '/ramsey/uuid/src/Rfc4122/Fields.php', 'Ramsey\\Uuid\\Rfc4122\\FieldsInterface' => $vendorDir . '/ramsey/uuid/src/Rfc4122/FieldsInterface.php', + 'Ramsey\\Uuid\\Rfc4122\\MaxTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/MaxTrait.php', + 'Ramsey\\Uuid\\Rfc4122\\MaxUuid' => $vendorDir . '/ramsey/uuid/src/Rfc4122/MaxUuid.php', 'Ramsey\\Uuid\\Rfc4122\\NilTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/NilTrait.php', 'Ramsey\\Uuid\\Rfc4122\\NilUuid' => $vendorDir . '/ramsey/uuid/src/Rfc4122/NilUuid.php', + 'Ramsey\\Uuid\\Rfc4122\\TimeTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/TimeTrait.php', 'Ramsey\\Uuid\\Rfc4122\\UuidBuilder' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidBuilder.php', 'Ramsey\\Uuid\\Rfc4122\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidInterface.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV1' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV1.php', @@ -3611,6 +3625,9 @@ return array( 'Ramsey\\Uuid\\Rfc4122\\UuidV3' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV3.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV4' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV4.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV5' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV5.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV6' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV6.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV7' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV7.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV8' => $vendorDir . '/ramsey/uuid/src/Rfc4122/UuidV8.php', 'Ramsey\\Uuid\\Rfc4122\\Validator' => $vendorDir . '/ramsey/uuid/src/Rfc4122/Validator.php', 'Ramsey\\Uuid\\Rfc4122\\VariantTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/VariantTrait.php', 'Ramsey\\Uuid\\Rfc4122\\VersionTrait' => $vendorDir . '/ramsey/uuid/src/Rfc4122/VersionTrait.php', @@ -3815,10 +3832,12 @@ return array( 'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php', 'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php', 'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php', + 'SebastianBergmann\\Type\\Parameter' => $vendorDir . '/sebastian/type/src/Parameter.php', 'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php', 'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php', 'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php', 'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => $vendorDir . '/sebastian/type/src/type/TrueType.php', 'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php', 'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php', 'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php', @@ -4657,6 +4676,7 @@ return array( 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTestCase' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTestCase.php', 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php', 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/translation-contracts/Test/TranslatorTest.php', 'Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/translation-contracts/TranslatableInterface.php', @@ -4696,9 +4716,6 @@ return array( 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', - 'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php', - 'Webmozart\\Assert\\InvalidArgumentException' => $vendorDir . '/webmozart/assert/src/InvalidArgumentException.php', - 'Webmozart\\Assert\\Mixin' => $vendorDir . '/webmozart/assert/src/Mixin.php', 'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php', 'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php', 'Whoops\\Exception\\Frame' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Frame.php', @@ -4711,107 +4728,14 @@ return array( 'Whoops\\Handler\\PlainTextHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php', 'Whoops\\Handler\\PrettyPageHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', 'Whoops\\Handler\\XmlResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php', + 'Whoops\\Inspector\\InspectorFactory' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorFactory.php', + 'Whoops\\Inspector\\InspectorFactoryInterface' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorFactoryInterface.php', + 'Whoops\\Inspector\\InspectorInterface' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorInterface.php', 'Whoops\\Run' => $vendorDir . '/filp/whoops/src/Whoops/Run.php', 'Whoops\\RunInterface' => $vendorDir . '/filp/whoops/src/Whoops/RunInterface.php', 'Whoops\\Util\\HtmlDumperOutput' => $vendorDir . '/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php', 'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.php', 'Whoops\\Util\\SystemFacade' => $vendorDir . '/filp/whoops/src/Whoops/Util/SystemFacade.php', 'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', - 'phpDocumentor\\Reflection\\DocBlock' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock.php', - 'phpDocumentor\\Reflection\\DocBlockFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', - 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', - 'phpDocumentor\\Reflection\\DocBlock\\Description' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Description.php', - 'phpDocumentor\\Reflection\\DocBlock\\DescriptionFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\ExampleFinder' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php', - 'phpDocumentor\\Reflection\\DocBlock\\Serializer' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php', - 'phpDocumentor\\Reflection\\DocBlock\\StandardTagFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tag' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php', - 'phpDocumentor\\Reflection\\DocBlock\\TagFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Author' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\BaseTag' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Covers' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Deprecated' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Example' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\StaticMethod' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\AlignFormatter' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\PassthroughFormatter' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Generic' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\InvalidTag' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Link' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Method' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Param' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Property' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyRead' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyWrite' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Fqsen' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Reference' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Url' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\See' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Since' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Source' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\TagWithType' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Throws' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Uses' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Version' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php', - 'phpDocumentor\\Reflection\\Element' => $vendorDir . '/phpdocumentor/reflection-common/src/Element.php', - 'phpDocumentor\\Reflection\\Exception\\PcreException' => $vendorDir . '/phpdocumentor/reflection-docblock/src/Exception/PcreException.php', - 'phpDocumentor\\Reflection\\File' => $vendorDir . '/phpdocumentor/reflection-common/src/File.php', - 'phpDocumentor\\Reflection\\Fqsen' => $vendorDir . '/phpdocumentor/reflection-common/src/Fqsen.php', - 'phpDocumentor\\Reflection\\FqsenResolver' => $vendorDir . '/phpdocumentor/type-resolver/src/FqsenResolver.php', - 'phpDocumentor\\Reflection\\Location' => $vendorDir . '/phpdocumentor/reflection-common/src/Location.php', - 'phpDocumentor\\Reflection\\Project' => $vendorDir . '/phpdocumentor/reflection-common/src/Project.php', - 'phpDocumentor\\Reflection\\ProjectFactory' => $vendorDir . '/phpdocumentor/reflection-common/src/ProjectFactory.php', - 'phpDocumentor\\Reflection\\PseudoType' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoType.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\CallableString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/CallableString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\False_' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/False_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\HtmlEscapedString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/HtmlEscapedString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\IntegerRange' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/IntegerRange.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\List_' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/List_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\LiteralString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\LowercaseString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/LowercaseString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NegativeInteger' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/NegativeInteger.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NonEmptyLowercaseString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyLowercaseString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NonEmptyString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NumericString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/NumericString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\Numeric_' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/Numeric_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\PositiveInteger' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/PositiveInteger.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\TraitString' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/TraitString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\True_' => $vendorDir . '/phpdocumentor/type-resolver/src/PseudoTypes/True_.php', - 'phpDocumentor\\Reflection\\Type' => $vendorDir . '/phpdocumentor/type-resolver/src/Type.php', - 'phpDocumentor\\Reflection\\TypeResolver' => $vendorDir . '/phpdocumentor/type-resolver/src/TypeResolver.php', - 'phpDocumentor\\Reflection\\Types\\AbstractList' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/AbstractList.php', - 'phpDocumentor\\Reflection\\Types\\AggregatedType' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/AggregatedType.php', - 'phpDocumentor\\Reflection\\Types\\ArrayKey' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/ArrayKey.php', - 'phpDocumentor\\Reflection\\Types\\Array_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Array_.php', - 'phpDocumentor\\Reflection\\Types\\Boolean' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Boolean.php', - 'phpDocumentor\\Reflection\\Types\\Callable_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Callable_.php', - 'phpDocumentor\\Reflection\\Types\\ClassString' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/ClassString.php', - 'phpDocumentor\\Reflection\\Types\\Collection' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Collection.php', - 'phpDocumentor\\Reflection\\Types\\Compound' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Compound.php', - 'phpDocumentor\\Reflection\\Types\\Context' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Context.php', - 'phpDocumentor\\Reflection\\Types\\ContextFactory' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/ContextFactory.php', - 'phpDocumentor\\Reflection\\Types\\Expression' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Expression.php', - 'phpDocumentor\\Reflection\\Types\\Float_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Float_.php', - 'phpDocumentor\\Reflection\\Types\\Integer' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Integer.php', - 'phpDocumentor\\Reflection\\Types\\InterfaceString' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/InterfaceString.php', - 'phpDocumentor\\Reflection\\Types\\Intersection' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Intersection.php', - 'phpDocumentor\\Reflection\\Types\\Iterable_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Iterable_.php', - 'phpDocumentor\\Reflection\\Types\\Mixed_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Mixed_.php', - 'phpDocumentor\\Reflection\\Types\\Never_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Never_.php', - 'phpDocumentor\\Reflection\\Types\\Null_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Null_.php', - 'phpDocumentor\\Reflection\\Types\\Nullable' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Nullable.php', - 'phpDocumentor\\Reflection\\Types\\Object_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Object_.php', - 'phpDocumentor\\Reflection\\Types\\Parent_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Parent_.php', - 'phpDocumentor\\Reflection\\Types\\Resource_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Resource_.php', - 'phpDocumentor\\Reflection\\Types\\Scalar' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Scalar.php', - 'phpDocumentor\\Reflection\\Types\\Self_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Self_.php', - 'phpDocumentor\\Reflection\\Types\\Static_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Static_.php', - 'phpDocumentor\\Reflection\\Types\\String_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/String_.php', - 'phpDocumentor\\Reflection\\Types\\This' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/This.php', - 'phpDocumentor\\Reflection\\Types\\Void_' => $vendorDir . '/phpdocumentor/type-resolver/src/Types/Void_.php', - 'phpDocumentor\\Reflection\\Utils' => $vendorDir . '/phpdocumentor/reflection-docblock/src/Utils.php', 'voku\\helper\\ASCII' => $vendorDir . '/voku/portable-ascii/src/voku/helper/ASCII.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 9269094e..d51f1eb2 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -22,7 +22,6 @@ return array( 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', '9cdd7b9056abc3081735233ba9dd9c7f' => $vendorDir . '/facade/flare-client-php/src/helpers.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', '801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php', @@ -32,6 +31,8 @@ return array( '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', + 'c72349b1fe8d0deeedd3a52e8aa814d8' => $vendorDir . '/mockery/mockery/library/helpers.php', + 'ce9671a430e4846b44e1c68c7611f9f5' => $vendorDir . '/mockery/mockery/library/Mockery.php', 'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php', '0c3c22e27afa83be19b4c938f4c6e9ea' => $vendorDir . '/spatie/laravel-backup/src/Helpers/functions.php', ); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 89a7be07..15a2ff3a 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,5 +6,4 @@ $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - 'Mockery' => array($vendorDir . '/mockery/mockery/library'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 23ba2569..479be4ba 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,9 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku'), - 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'), 'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'), - 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), 'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'), 'Tests\\' => array($baseDir . '/tests'), 'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'), @@ -50,12 +48,13 @@ return array( 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Psr\\EventDispatcher\\' => array($vendorDir . '/psr/event-dispatcher/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'), + 'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), 'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'), 'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'), 'NunoMaduro\\Collision\\' => array($vendorDir . '/nunomaduro/collision/src'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), + 'Mockery\\' => array($vendorDir . '/mockery/mockery/library/Mockery'), 'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'), 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), 'League\\CommonMark\\' => array($vendorDir . '/league/commonmark/src'), @@ -78,6 +77,7 @@ return array( 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), 'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'), 'Codexshaper\\WooCommerce\\' => array($vendorDir . '/codexshaper/laravel-woocommerce/src'), + 'Carbon\\Doctrine\\' => array($vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine'), 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'Brick\\Math\\' => array($vendorDir . '/brick/math/src'), 'Automattic\\WooCommerce\\' => array($vendorDir . '/automattic/woocommerce/src/WooCommerce'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 8fc6e844..932587ab 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d +class ComposerAutoloaderInit5369a4d76f17a89933afbb2f1c9dc92c { private static $loader; @@ -24,18 +24,18 @@ class ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit5369a4d76f17a89933afbb2f1c9dc92c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit5369a4d76f17a89933afbb2f1c9dc92c', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit67b256f53a0993f7a39d76612331a21d::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c::getInitializer($loader)); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit67b256f53a0993f7a39d76612331a21d::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire67b256f53a0993f7a39d76612331a21d($fileIdentifier, $file); + composerRequire5369a4d76f17a89933afbb2f1c9dc92c($fileIdentifier, $file); } return $loader; @@ -47,7 +47,7 @@ class ComposerAutoloaderInit67b256f53a0993f7a39d76612331a21d * @param string $file * @return void */ -function composerRequire67b256f53a0993f7a39d76612331a21d($fileIdentifier, $file) +function composerRequire5369a4d76f17a89933afbb2f1c9dc92c($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 334a5555..18e49cbc 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit67b256f53a0993f7a39d76612331a21d +class ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -23,7 +23,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', '9cdd7b9056abc3081735233ba9dd9c7f' => __DIR__ . '/..' . '/facade/flare-client-php/src/helpers.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', '801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php', @@ -33,6 +32,8 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php', + 'c72349b1fe8d0deeedd3a52e8aa814d8' => __DIR__ . '/..' . '/mockery/mockery/library/helpers.php', + 'ce9671a430e4846b44e1c68c7611f9f5' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery.php', 'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php', '0c3c22e27afa83be19b4c938f4c6e9ea' => __DIR__ . '/..' . '/spatie/laravel-backup/src/Helpers/functions.php', ); @@ -42,14 +43,9 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 'voku\\' => 5, ), - 'p' => - array ( - 'phpDocumentor\\Reflection\\' => 25, - ), 'W' => array ( 'Whoops\\' => 7, - 'Webmozart\\Assert\\' => 17, ), 'T' => array ( @@ -102,7 +98,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psr\\Http\\Client\\' => 16, 'Psr\\EventDispatcher\\' => 20, 'Psr\\Container\\' => 14, - 'Prophecy\\' => 9, + 'Psr\\Clock\\' => 10, 'PhpParser\\' => 10, 'PhpOption\\' => 10, ), @@ -117,6 +113,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'M' => array ( 'Monolog\\' => 8, + 'Mockery\\' => 8, ), 'L' => array ( @@ -160,6 +157,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 'Cron\\' => 5, 'Codexshaper\\WooCommerce\\' => 24, + 'Carbon\\Doctrine\\' => 16, 'Carbon\\' => 7, ), 'B' => @@ -179,20 +177,10 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 0 => __DIR__ . '/..' . '/voku/portable-ascii/src/voku', ), - 'phpDocumentor\\Reflection\\' => - array ( - 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src', - 1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', - 2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src', - ), 'Whoops\\' => array ( 0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops', ), - 'Webmozart\\Assert\\' => - array ( - 0 => __DIR__ . '/..' . '/webmozart/assert/src', - ), 'TijsVerkoyen\\CssToInlineStyles\\' => array ( 0 => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src', @@ -354,9 +342,9 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 0 => __DIR__ . '/..' . '/psr/container/src', ), - 'Prophecy\\' => + 'Psr\\Clock\\' => array ( - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy', + 0 => __DIR__ . '/..' . '/psr/clock/src', ), 'PhpParser\\' => array ( @@ -378,6 +366,10 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', ), + 'Mockery\\' => + array ( + 0 => __DIR__ . '/..' . '/mockery/mockery/library/Mockery', + ), 'League\\MimeTypeDetection\\' => array ( 0 => __DIR__ . '/..' . '/league/mime-type-detection/src', @@ -466,6 +458,10 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d array ( 0 => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src', ), + 'Carbon\\Doctrine\\' => + array ( + 0 => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine', + ), 'Carbon\\' => array ( 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', @@ -488,16 +484,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d ), ); - public static $prefixesPsr0 = array ( - 'M' => - array ( - 'Mockery' => - array ( - 0 => __DIR__ . '/..' . '/mockery/mockery/library', - ), - ), - ); - public static $classMap = array ( 'App\\Article' => __DIR__ . '/../..' . '/app/Article.php', 'App\\Artnim' => __DIR__ . '/../..' . '/app/Artnim.php', @@ -506,9 +492,17 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'App\\Category' => __DIR__ . '/../..' . '/app/Category.php', 'App\\Clientegm' => __DIR__ . '/../..' . '/app/Clientegm.php', 'App\\Clientegmdest' => __DIR__ . '/../..' . '/app/Clientegmdest.php', + 'App\\Console\\Commands\\OrderUpdateGm' => __DIR__ . '/../..' . '/app/Console/Commands/OrderUpdateGm.php', + 'App\\Console\\Commands\\ProductUpdateGm' => __DIR__ . '/../..' . '/app/Console/Commands/ProductUpdateGm.php', + 'App\\Console\\Commands\\ProductUpdateQta' => __DIR__ . '/../..' . '/app/Console/Commands/ProductUpdateQta.php', + 'App\\Console\\Commands\\ProductUpdateUsedGm' => __DIR__ . '/../..' . '/app/Console/Commands/ProductUpdateUsedGm.php', + 'App\\Console\\Commands\\Test' => __DIR__ . '/../..' . '/app/Console/Commands/Test.php', + 'App\\Console\\Commands\\TestPao' => __DIR__ . '/../..' . '/app/Console/Commands/TestPao.php', 'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php', 'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php', + 'App\\Gm_product' => __DIR__ . '/../..' . '/app/Gm_product.php', 'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Controllers\\TestPaoController' => __DIR__ . '/../..' . '/app/Http/Controllers/TestPaoController.php', 'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php', 'App\\Http\\Middleware\\Authenticate' => __DIR__ . '/../..' . '/app/Http/Middleware/Authenticate.php', 'App\\Http\\Middleware\\CheckForMaintenanceMode' => __DIR__ . '/../..' . '/app/Http/Middleware/CheckForMaintenanceMode.php', @@ -518,6 +512,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'App\\Http\\Middleware\\TrustHosts' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustHosts.php', 'App\\Http\\Middleware\\TrustProxies' => __DIR__ . '/../..' . '/app/Http/Middleware/TrustProxies.php', 'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php', + 'App\\Mylog' => __DIR__ . '/../..' . '/app/Mylog.php', 'App\\Newproduct' => __DIR__ . '/../..' . '/app/Newproduct.php', 'App\\Order' => __DIR__ . '/../..' . '/app/Order.php', 'App\\Orderdetail' => __DIR__ . '/../..' . '/app/Orderdetail.php', @@ -527,6 +522,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php', 'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php', 'App\\Publisher' => __DIR__ . '/../..' . '/app/Publisher.php', + 'App\\Setting' => __DIR__ . '/../..' . '/app/Setting.php', 'App\\Statusproduct' => __DIR__ . '/../..' . '/app/Statusproduct.php', 'App\\Stock' => __DIR__ . '/../..' . '/app/Stock.php', 'App\\User' => __DIR__ . '/../..' . '/app/User.php', @@ -556,6 +552,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Brick\\Math\\Internal\\Calculator\\GmpCalculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator/GmpCalculator.php', 'Brick\\Math\\Internal\\Calculator\\NativeCalculator' => __DIR__ . '/..' . '/brick/math/src/Internal/Calculator/NativeCalculator.php', 'Brick\\Math\\RoundingMode' => __DIR__ . '/..' . '/brick/math/src/RoundingMode.php', + 'CURLStringFile' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php', 'Carbon\\AbstractTranslator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/AbstractTranslator.php', 'Carbon\\Carbon' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Carbon.php', 'Carbon\\CarbonConverterInterface' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonConverterInterface.php', @@ -563,19 +560,21 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Carbon\\CarbonInterface' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterface.php', 'Carbon\\CarbonInterval' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonInterval.php', 'Carbon\\CarbonPeriod' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonPeriod.php', + 'Carbon\\CarbonPeriodImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php', 'Carbon\\CarbonTimeZone' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonTimeZone.php', 'Carbon\\Cli\\Invoker' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Cli/Invoker.php', - 'Carbon\\Doctrine\\CarbonDoctrineType' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php', - 'Carbon\\Doctrine\\CarbonImmutableType' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php', - 'Carbon\\Doctrine\\CarbonType' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php', - 'Carbon\\Doctrine\\CarbonTypeConverter' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php', - 'Carbon\\Doctrine\\DateTimeDefaultPrecision' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php', - 'Carbon\\Doctrine\\DateTimeImmutableType' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php', - 'Carbon\\Doctrine\\DateTimeType' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php', + 'Carbon\\Doctrine\\CarbonDoctrineType' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonDoctrineType.php', + 'Carbon\\Doctrine\\CarbonImmutableType' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonImmutableType.php', + 'Carbon\\Doctrine\\CarbonType' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonType.php', + 'Carbon\\Doctrine\\CarbonTypeConverter' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/CarbonTypeConverter.php', + 'Carbon\\Doctrine\\DateTimeDefaultPrecision' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeDefaultPrecision.php', + 'Carbon\\Doctrine\\DateTimeImmutableType' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeImmutableType.php', + 'Carbon\\Doctrine\\DateTimeType' => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine/DateTimeType.php', 'Carbon\\Exceptions\\BadComparisonUnitException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php', 'Carbon\\Exceptions\\BadFluentConstructorException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php', 'Carbon\\Exceptions\\BadFluentSetterException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php', 'Carbon\\Exceptions\\BadMethodCallException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php', + 'Carbon\\Exceptions\\EndLessPeriodException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php', 'Carbon\\Exceptions\\Exception' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/Exception.php', 'Carbon\\Exceptions\\ImmutableException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php', 'Carbon\\Exceptions\\InvalidArgumentException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php', @@ -604,6 +603,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Carbon\\FactoryImmutable' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/FactoryImmutable.php', 'Carbon\\Language' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Language.php', 'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', + 'Carbon\\MessageFormatter\\MessageFormatterMapper' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php', 'Carbon\\PHPStan\\AbstractMacro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 'Carbon\\PHPStan\\Macro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', 'Carbon\\PHPStan\\MacroExtension' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php', @@ -620,6 +620,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Carbon\\Traits\\IntervalStep' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/IntervalStep.php', 'Carbon\\Traits\\Localization' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Localization.php', 'Carbon\\Traits\\Macro' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Macro.php', + 'Carbon\\Traits\\MagicParameter' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/MagicParameter.php', 'Carbon\\Traits\\Mixin' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Mixin.php', 'Carbon\\Traits\\Modifiers' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Modifiers.php', 'Carbon\\Traits\\Mutability' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Mutability.php', @@ -629,6 +630,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Carbon\\Traits\\Serialization' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Serialization.php', 'Carbon\\Traits\\Test' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Test.php', 'Carbon\\Traits\\Timestamp' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Timestamp.php', + 'Carbon\\Traits\\ToStringFormat' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/ToStringFormat.php', 'Carbon\\Traits\\Units' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Units.php', 'Carbon\\Traits\\Week' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Traits/Week.php', 'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php', @@ -650,6 +652,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Codexshaper\\WooCommerce\\Facades\\ShippingMethod' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/ShippingMethod.php', 'Codexshaper\\WooCommerce\\Facades\\ShippingZone' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/ShippingZone.php', 'Codexshaper\\WooCommerce\\Facades\\ShippingZoneMethod' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/ShippingZoneMethod.php', + 'Codexshaper\\WooCommerce\\Facades\\Subscription' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Subscription.php', 'Codexshaper\\WooCommerce\\Facades\\System' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/System.php', 'Codexshaper\\WooCommerce\\Facades\\Tag' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Tag.php', 'Codexshaper\\WooCommerce\\Facades\\Tax' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Tax.php', @@ -657,6 +660,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Codexshaper\\WooCommerce\\Facades\\Term' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Term.php', 'Codexshaper\\WooCommerce\\Facades\\Variation' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Variation.php', 'Codexshaper\\WooCommerce\\Facades\\Webhook' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/Webhook.php', + 'Codexshaper\\WooCommerce\\Facades\\WooAnalytics' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/WooAnalytics.php', 'Codexshaper\\WooCommerce\\Facades\\WooCommerce' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Facades/WooCommerce.php', 'Codexshaper\\WooCommerce\\Models\\Attribute' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/Attribute.php', 'Codexshaper\\WooCommerce\\Models\\BaseModel' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/BaseModel.php', @@ -673,6 +677,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Codexshaper\\WooCommerce\\Models\\Setting' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/Setting.php', 'Codexshaper\\WooCommerce\\Models\\ShippingMethod' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/ShippingMethod.php', 'Codexshaper\\WooCommerce\\Models\\ShippingZone' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/ShippingZone.php', + 'Codexshaper\\WooCommerce\\Models\\Subscription' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/Subscription.php', 'Codexshaper\\WooCommerce\\Models\\System' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/System.php', 'Codexshaper\\WooCommerce\\Models\\Tag' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/Tag.php', 'Codexshaper\\WooCommerce\\Models\\Tax' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Models/Tax.php', @@ -683,6 +688,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Codexshaper\\WooCommerce\\Query' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Query.php', 'Codexshaper\\WooCommerce\\Traits\\QueryBuilderTrait' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Traits/QueryBuilderTrait.php', 'Codexshaper\\WooCommerce\\Traits\\WooCommerceTrait' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/Traits/WooCommerceTrait.php', + 'Codexshaper\\WooCommerce\\WooCommerceAnalyticsApi' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/WooCommerceAnalyticsApi.php', 'Codexshaper\\WooCommerce\\WooCommerceApi' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/WooCommerceApi.php', 'Codexshaper\\WooCommerce\\WooCommerceServiceProvider' => __DIR__ . '/..' . '/codexshaper/laravel-woocommerce/src/WooCommerceServiceProvider.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', @@ -699,6 +705,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'DeepCopy\\DeepCopy' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/DeepCopy.php', 'DeepCopy\\Exception\\CloneException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php', 'DeepCopy\\Exception\\PropertyException' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php', + 'DeepCopy\\Filter\\ChainableFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineEmptyCollectionFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php', 'DeepCopy\\Filter\\Doctrine\\DoctrineProxyFilter' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php', @@ -1014,10 +1021,16 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Faker\\Calculator\\Luhn' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/Luhn.php', 'Faker\\Calculator\\TCNo' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Calculator/TCNo.php', 'Faker\\ChanceGenerator' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/ChanceGenerator.php', + 'Faker\\Container\\Container' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Container/Container.php', + 'Faker\\Container\\ContainerBuilder' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Container/ContainerBuilder.php', + 'Faker\\Container\\ContainerException' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Container/ContainerException.php', + 'Faker\\Container\\ContainerInterface' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Container/ContainerInterface.php', + 'Faker\\Container\\NotInContainerException' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Container/NotInContainerException.php', 'Faker\\Core\\Barcode' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Barcode.php', 'Faker\\Core\\Blood' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Blood.php', 'Faker\\Core\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Color.php', 'Faker\\Core\\Coordinates' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Coordinates.php', + 'Faker\\Core\\DateTime' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/DateTime.php', 'Faker\\Core\\File' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/File.php', 'Faker\\Core\\Number' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Number.php', 'Faker\\Core\\Uuid' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Core/Uuid.php', @@ -1029,17 +1042,14 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Faker\\Extension\\BloodExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/BloodExtension.php', 'Faker\\Extension\\ColorExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/ColorExtension.php', 'Faker\\Extension\\CompanyExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/CompanyExtension.php', - 'Faker\\Extension\\Container' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/Container.php', - 'Faker\\Extension\\ContainerBuilder' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/ContainerBuilder.php', - 'Faker\\Extension\\ContainerException' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/ContainerException.php', 'Faker\\Extension\\CountryExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/CountryExtension.php', + 'Faker\\Extension\\DateTimeExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/DateTimeExtension.php', 'Faker\\Extension\\Extension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/Extension.php', 'Faker\\Extension\\ExtensionNotFound' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/ExtensionNotFound.php', 'Faker\\Extension\\FileExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/FileExtension.php', 'Faker\\Extension\\GeneratorAwareExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/GeneratorAwareExtension.php', 'Faker\\Extension\\GeneratorAwareExtensionTrait' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/GeneratorAwareExtensionTrait.php', 'Faker\\Extension\\Helper' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/Helper.php', - 'Faker\\Extension\\NotInContainerException' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/NotInContainerException.php', 'Faker\\Extension\\NumberExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/NumberExtension.php', 'Faker\\Extension\\PersonExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/PersonExtension.php', 'Faker\\Extension\\PhoneNumberExtension' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Extension/PhoneNumberExtension.php', @@ -1242,16 +1252,19 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Faker\\Provider\\fi_FI\\Person' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php', 'Faker\\Provider\\fi_FI\\PhoneNumber' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fi_FI/PhoneNumber.php', 'Faker\\Provider\\fr_BE\\Address' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Address.php', + 'Faker\\Provider\\fr_BE\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Color.php', 'Faker\\Provider\\fr_BE\\Company' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Company.php', 'Faker\\Provider\\fr_BE\\Internet' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Internet.php', 'Faker\\Provider\\fr_BE\\Payment' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Payment.php', 'Faker\\Provider\\fr_BE\\Person' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/Person.php', 'Faker\\Provider\\fr_BE\\PhoneNumber' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_BE/PhoneNumber.php', 'Faker\\Provider\\fr_CA\\Address' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CA/Address.php', + 'Faker\\Provider\\fr_CA\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CA/Color.php', 'Faker\\Provider\\fr_CA\\Company' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CA/Company.php', 'Faker\\Provider\\fr_CA\\Person' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CA/Person.php', 'Faker\\Provider\\fr_CA\\Text' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CA/Text.php', 'Faker\\Provider\\fr_CH\\Address' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Address.php', + 'Faker\\Provider\\fr_CH\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Color.php', 'Faker\\Provider\\fr_CH\\Company' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Company.php', 'Faker\\Provider\\fr_CH\\Internet' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Internet.php', 'Faker\\Provider\\fr_CH\\Payment' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Payment.php', @@ -1259,6 +1272,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Faker\\Provider\\fr_CH\\PhoneNumber' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/PhoneNumber.php', 'Faker\\Provider\\fr_CH\\Text' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_CH/Text.php', 'Faker\\Provider\\fr_FR\\Address' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php', + 'Faker\\Provider\\fr_FR\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_FR/Color.php', 'Faker\\Provider\\fr_FR\\Company' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php', 'Faker\\Provider\\fr_FR\\Internet' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_FR/Internet.php', 'Faker\\Provider\\fr_FR\\Payment' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/fr_FR/Payment.php', @@ -1393,6 +1407,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Faker\\Provider\\nl_NL\\PhoneNumber' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/nl_NL/PhoneNumber.php', 'Faker\\Provider\\nl_NL\\Text' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/nl_NL/Text.php', 'Faker\\Provider\\pl_PL\\Address' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php', + 'Faker\\Provider\\pl_PL\\Color' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/pl_PL/Color.php', 'Faker\\Provider\\pl_PL\\Company' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/pl_PL/Company.php', 'Faker\\Provider\\pl_PL\\Internet' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php', 'Faker\\Provider\\pl_PL\\LicensePlate' => __DIR__ . '/..' . '/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php', @@ -1586,6 +1601,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php', 'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php', 'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php', + 'GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriComparator.php', 'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php', 'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php', 'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php', @@ -2800,13 +2816,13 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php', 'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php', 'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php', + 'League\\MimeTypeDetection\\ExtensionLookup' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionLookup.php', 'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php', 'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php', 'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php', 'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php', 'League\\MimeTypeDetection\\MimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/MimeTypeDetector.php', 'League\\MimeTypeDetection\\OverridingExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/OverridingExtensionToMimeTypeMap.php', - 'Mockery' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditions' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php', 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', @@ -2820,6 +2836,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Mockery\\CountValidator\\AtLeast' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtLeast.php', 'Mockery\\CountValidator\\AtMost' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/AtMost.php', 'Mockery\\CountValidator\\CountValidatorAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php', + 'Mockery\\CountValidator\\CountValidatorInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/CountValidatorInterface.php', 'Mockery\\CountValidator\\Exact' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exact.php', 'Mockery\\CountValidator\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CountValidator/Exception.php', 'Mockery\\Exception' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception.php', @@ -2827,6 +2844,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Mockery\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php', 'Mockery\\Exception\\InvalidCountException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidCountException.php', 'Mockery\\Exception\\InvalidOrderException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php', + 'Mockery\\Exception\\MockeryExceptionInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/MockeryExceptionInterface.php', 'Mockery\\Exception\\NoMatchingExpectationException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php', 'Mockery\\Exception\\RuntimeException' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Exception/RuntimeException.php', 'Mockery\\Expectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Expectation.php', @@ -2845,6 +2863,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Mockery\\Generator\\StringManipulationGenerator' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php', 'Mockery\\Generator\\StringManipulation\\Pass\\AvoidMethodClashPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\CallTypeHintPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php', + 'Mockery\\Generator\\StringManipulation\\Pass\\ClassAttributesPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassAttributesPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ClassNamePass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ClassPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php', 'Mockery\\Generator\\StringManipulation\\Pass\\ConstantsPass' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php', @@ -2875,7 +2894,10 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Mockery\\Matcher\\Ducktype' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/Ducktype.php', 'Mockery\\Matcher\\HasKey' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasKey.php', 'Mockery\\Matcher\\HasValue' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/HasValue.php', + 'Mockery\\Matcher\\IsEqual' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/IsEqual.php', + 'Mockery\\Matcher\\IsSame' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/IsSame.php', 'Mockery\\Matcher\\MatcherAbstract' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php', + 'Mockery\\Matcher\\MatcherInterface' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MatcherInterface.php', 'Mockery\\Matcher\\MultiArgumentClosure' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php', 'Mockery\\Matcher\\MustBe' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/MustBe.php', 'Mockery\\Matcher\\NoArgs' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Matcher/NoArgs.php', @@ -2903,6 +2925,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Monolog\\Formatter\\FluentdFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php', 'Monolog\\Formatter\\FormatterInterface' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php', 'Monolog\\Formatter\\GelfMessageFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php', + 'Monolog\\Formatter\\GoogleCloudLoggingFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php', 'Monolog\\Formatter\\HtmlFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php', 'Monolog\\Formatter\\JsonFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php', 'Monolog\\Formatter\\LineFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/LineFormatter.php', @@ -2978,6 +3001,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Monolog\\Handler\\SqsHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SqsHandler.php', 'Monolog\\Handler\\StreamHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/StreamHandler.php', 'Monolog\\Handler\\SwiftMailerHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php', + 'Monolog\\Handler\\SymfonyMailerHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php', 'Monolog\\Handler\\SyslogHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogHandler.php', 'Monolog\\Handler\\SyslogUdpHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php', 'Monolog\\Handler\\SyslogUdp\\UdpSocket' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php', @@ -3096,6 +3120,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php', 'PHPUnit\\Framework\\Constraint\\ObjectEquals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php', 'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php', + 'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php', 'PHPUnit\\Framework\\Constraint\\Operator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php', 'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php', 'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php', @@ -3140,6 +3165,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php', 'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php', 'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php', + 'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php', 'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php', @@ -3325,8 +3351,8 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php', - 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistDirectoriesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistDirectoriesToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php', + 'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php', 'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php', 'PHPUnit\\TextUI\\XmlConfiguration\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php', 'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php', @@ -3349,6 +3375,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php', 'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php', 'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', + 'PHPUnit\\Util\\Cloner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Cloner.php', 'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', 'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php', @@ -3365,6 +3392,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php', 'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php', 'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', + 'PHPUnit\\Util\\Reflection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Reflection.php', 'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php', 'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', 'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php', @@ -3431,6 +3459,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php', 'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', 'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php', + 'PharIo\\Manifest\\NoEmailAddressException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php', 'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php', 'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', 'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php', @@ -3495,23 +3524,22 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', 'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', 'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', 'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Modifiers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Modifiers.php', 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -3522,19 +3550,22 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', 'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', 'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', @@ -3595,7 +3626,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', @@ -3630,6 +3660,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', @@ -3637,11 +3668,11 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\Float_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', @@ -3652,7 +3683,9 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', @@ -3662,7 +3695,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', @@ -3686,12 +3718,9 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', @@ -3699,116 +3728,24 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\Parser\\Php8' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Token.php', 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', - 'Prophecy\\Argument' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument.php', - 'Prophecy\\Argument\\ArgumentsWildcard' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php', - 'Prophecy\\Argument\\Token\\AnyValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php', - 'Prophecy\\Argument\\Token\\AnyValuesToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php', - 'Prophecy\\Argument\\Token\\ApproximateValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php', - 'Prophecy\\Argument\\Token\\ArrayCountToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php', - 'Prophecy\\Argument\\Token\\ArrayEntryToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php', - 'Prophecy\\Argument\\Token\\ArrayEveryEntryToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php', - 'Prophecy\\Argument\\Token\\CallbackToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php', - 'Prophecy\\Argument\\Token\\ExactValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php', - 'Prophecy\\Argument\\Token\\IdenticalValueToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php', - 'Prophecy\\Argument\\Token\\InArrayToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php', - 'Prophecy\\Argument\\Token\\LogicalAndToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php', - 'Prophecy\\Argument\\Token\\LogicalNotToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php', - 'Prophecy\\Argument\\Token\\NotInArrayToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php', - 'Prophecy\\Argument\\Token\\ObjectStateToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php', - 'Prophecy\\Argument\\Token\\StringContainsToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php', - 'Prophecy\\Argument\\Token\\TokenInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php', - 'Prophecy\\Argument\\Token\\TypeToken' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php', - 'Prophecy\\Call\\Call' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Call/Call.php', - 'Prophecy\\Call\\CallCenter' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Call/CallCenter.php', - 'Prophecy\\Comparator\\ClosureComparator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php', - 'Prophecy\\Comparator\\Factory' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/Factory.php', - 'Prophecy\\Comparator\\ProphecyComparator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php', - 'Prophecy\\Doubler\\CachedDoubler' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php', - 'Prophecy\\Doubler\\ClassPatch\\ClassPatchInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php', - 'Prophecy\\Doubler\\ClassPatch\\DisableConstructorPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\HhvmExceptionPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\KeywordPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\MagicCallPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', - 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', - 'Prophecy\\Doubler\\ClassPatch\\ThrowablePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php', - 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', - 'Prophecy\\Doubler\\DoubleInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', - 'Prophecy\\Doubler\\Doubler' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', - 'Prophecy\\Doubler\\Generator\\ClassCodeGenerator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php', - 'Prophecy\\Doubler\\Generator\\ClassCreator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php', - 'Prophecy\\Doubler\\Generator\\ClassMirror' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php', - 'Prophecy\\Doubler\\Generator\\Node\\ArgumentNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ArgumentTypeNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ClassNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\MethodNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\ReturnTypeNode' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php', - 'Prophecy\\Doubler\\Generator\\Node\\TypeNodeAbstract' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php', - 'Prophecy\\Doubler\\Generator\\ReflectionInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php', - 'Prophecy\\Doubler\\Generator\\TypeHintReference' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php', - 'Prophecy\\Doubler\\LazyDouble' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php', - 'Prophecy\\Doubler\\NameGenerator' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php', - 'Prophecy\\Exception\\Call\\UnexpectedCallException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php', - 'Prophecy\\Exception\\Doubler\\ClassCreatorException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php', - 'Prophecy\\Exception\\Doubler\\ClassMirrorException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php', - 'Prophecy\\Exception\\Doubler\\ClassNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\DoubleException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php', - 'Prophecy\\Exception\\Doubler\\DoublerException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php', - 'Prophecy\\Exception\\Doubler\\InterfaceNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\MethodNotExtendableException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php', - 'Prophecy\\Exception\\Doubler\\MethodNotFoundException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php', - 'Prophecy\\Exception\\Doubler\\ReturnByReferenceException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php', - 'Prophecy\\Exception\\Exception' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Exception.php', - 'Prophecy\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php', - 'Prophecy\\Exception\\Prediction\\AggregateException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php', - 'Prophecy\\Exception\\Prediction\\FailedPredictionException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php', - 'Prophecy\\Exception\\Prediction\\NoCallsException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php', - 'Prophecy\\Exception\\Prediction\\PredictionException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php', - 'Prophecy\\Exception\\Prediction\\UnexpectedCallsCountException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php', - 'Prophecy\\Exception\\Prediction\\UnexpectedCallsException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php', - 'Prophecy\\Exception\\Prophecy\\MethodProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php', - 'Prophecy\\Exception\\Prophecy\\ObjectProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php', - 'Prophecy\\Exception\\Prophecy\\ProphecyException' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php', - 'Prophecy\\PhpDocumentor\\ClassAndInterfaceTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php', - 'Prophecy\\PhpDocumentor\\ClassTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php', - 'Prophecy\\PhpDocumentor\\LegacyClassTagRetriever' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php', - 'Prophecy\\PhpDocumentor\\MethodTagRetrieverInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php', - 'Prophecy\\Prediction\\CallPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php', - 'Prophecy\\Prediction\\CallTimesPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php', - 'Prophecy\\Prediction\\CallbackPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php', - 'Prophecy\\Prediction\\NoCallsPrediction' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php', - 'Prophecy\\Prediction\\PredictionInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php', - 'Prophecy\\Promise\\CallbackPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php', - 'Prophecy\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php', - 'Prophecy\\Promise\\ReturnArgumentPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php', - 'Prophecy\\Promise\\ReturnPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php', - 'Prophecy\\Promise\\ThrowPromise' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php', - 'Prophecy\\Prophecy\\MethodProphecy' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php', - 'Prophecy\\Prophecy\\ObjectProphecy' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php', - 'Prophecy\\Prophecy\\ProphecyInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php', - 'Prophecy\\Prophecy\\ProphecySubjectInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php', - 'Prophecy\\Prophecy\\Revealer' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php', - 'Prophecy\\Prophecy\\RevealerInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php', - 'Prophecy\\Prophet' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Prophet.php', - 'Prophecy\\Util\\ExportUtil' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php', - 'Prophecy\\Util\\StringUtil' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Util/StringUtil.php', + 'Psr\\Clock\\ClockInterface' => __DIR__ . '/..' . '/psr/clock/src/ClockInterface.php', 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', @@ -3855,7 +3792,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\CodeCleaner\\FunctionContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/FunctionContextPass.php', 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php', 'Psy\\CodeCleaner\\ImplicitReturnPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php', - 'Psy\\CodeCleaner\\InstanceOfPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/InstanceOfPass.php', 'Psy\\CodeCleaner\\IssetPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/IssetPass.php', 'Psy\\CodeCleaner\\LabelContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/LabelContextPass.php', 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php', @@ -3875,6 +3811,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\CodeCleaner\\ValidFunctionNamePass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php', 'Psy\\Command\\BufferCommand' => __DIR__ . '/..' . '/psy/psysh/src/Command/BufferCommand.php', 'Psy\\Command\\ClearCommand' => __DIR__ . '/..' . '/psy/psysh/src/Command/ClearCommand.php', + 'Psy\\Command\\CodeArgumentParser' => __DIR__ . '/..' . '/psy/psysh/src/Command/CodeArgumentParser.php', 'Psy\\Command\\Command' => __DIR__ . '/..' . '/psy/psysh/src/Command/Command.php', 'Psy\\Command\\DocCommand' => __DIR__ . '/..' . '/psy/psysh/src/Command/DocCommand.php', 'Psy\\Command\\DumpCommand' => __DIR__ . '/..' . '/psy/psysh/src/Command/DumpCommand.php', @@ -3905,7 +3842,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\Command\\WtfCommand' => __DIR__ . '/..' . '/psy/psysh/src/Command/WtfCommand.php', 'Psy\\ConfigPaths' => __DIR__ . '/..' . '/psy/psysh/src/ConfigPaths.php', 'Psy\\Configuration' => __DIR__ . '/..' . '/psy/psysh/src/Configuration.php', - 'Psy\\ConsoleColorFactory' => __DIR__ . '/..' . '/psy/psysh/src/ConsoleColorFactory.php', 'Psy\\Context' => __DIR__ . '/..' . '/psy/psysh/src/Context.php', 'Psy\\ContextAware' => __DIR__ . '/..' . '/psy/psysh/src/ContextAware.php', 'Psy\\EnvInterface' => __DIR__ . '/..' . '/psy/psysh/src/EnvInterface.php', @@ -3917,7 +3853,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\Exception\\ParseErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/ParseErrorException.php', 'Psy\\Exception\\RuntimeException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/RuntimeException.php', 'Psy\\Exception\\ThrowUpException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/ThrowUpException.php', - 'Psy\\Exception\\TypeErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/TypeErrorException.php', 'Psy\\Exception\\UnexpectedTargetException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/UnexpectedTargetException.php', 'Psy\\ExecutionClosure' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionClosure.php', 'Psy\\ExecutionLoopClosure' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionLoopClosure.php', @@ -3927,7 +3862,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\ExecutionLoop\\RunkitReloader' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionLoop/RunkitReloader.php', 'Psy\\Formatter\\CodeFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/CodeFormatter.php', 'Psy\\Formatter\\DocblockFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/DocblockFormatter.php', - 'Psy\\Formatter\\Formatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/Formatter.php', 'Psy\\Formatter\\ReflectorFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/ReflectorFormatter.php', 'Psy\\Formatter\\SignatureFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/SignatureFormatter.php', 'Psy\\Formatter\\TraceFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/TraceFormatter.php', @@ -3939,15 +3873,69 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\Output\\PassthruPager' => __DIR__ . '/..' . '/psy/psysh/src/Output/PassthruPager.php', 'Psy\\Output\\ProcOutputPager' => __DIR__ . '/..' . '/psy/psysh/src/Output/ProcOutputPager.php', 'Psy\\Output\\ShellOutput' => __DIR__ . '/..' . '/psy/psysh/src/Output/ShellOutput.php', + 'Psy\\Output\\Theme' => __DIR__ . '/..' . '/psy/psysh/src/Output/Theme.php', 'Psy\\ParserFactory' => __DIR__ . '/..' . '/psy/psysh/src/ParserFactory.php', 'Psy\\Readline\\GNUReadline' => __DIR__ . '/..' . '/psy/psysh/src/Readline/GNUReadline.php', - 'Psy\\Readline\\HoaConsole' => __DIR__ . '/..' . '/psy/psysh/src/Readline/HoaConsole.php', + 'Psy\\Readline\\Hoa\\Autocompleter' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Autocompleter.php', + 'Psy\\Readline\\Hoa\\AutocompleterAggregate' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/AutocompleterAggregate.php', + 'Psy\\Readline\\Hoa\\AutocompleterPath' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/AutocompleterPath.php', + 'Psy\\Readline\\Hoa\\AutocompleterWord' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/AutocompleterWord.php', + 'Psy\\Readline\\Hoa\\Console' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Console.php', + 'Psy\\Readline\\Hoa\\ConsoleCursor' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleCursor.php', + 'Psy\\Readline\\Hoa\\ConsoleException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleException.php', + 'Psy\\Readline\\Hoa\\ConsoleInput' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleInput.php', + 'Psy\\Readline\\Hoa\\ConsoleOutput' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleOutput.php', + 'Psy\\Readline\\Hoa\\ConsoleProcessus' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleProcessus.php', + 'Psy\\Readline\\Hoa\\ConsoleTput' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleTput.php', + 'Psy\\Readline\\Hoa\\ConsoleWindow' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ConsoleWindow.php', + 'Psy\\Readline\\Hoa\\Event' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Event.php', + 'Psy\\Readline\\Hoa\\EventBucket' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventBucket.php', + 'Psy\\Readline\\Hoa\\EventException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventException.php', + 'Psy\\Readline\\Hoa\\EventListenable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventListenable.php', + 'Psy\\Readline\\Hoa\\EventListener' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventListener.php', + 'Psy\\Readline\\Hoa\\EventListens' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventListens.php', + 'Psy\\Readline\\Hoa\\EventSource' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/EventSource.php', + 'Psy\\Readline\\Hoa\\Exception' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Exception.php', + 'Psy\\Readline\\Hoa\\ExceptionIdle' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ExceptionIdle.php', + 'Psy\\Readline\\Hoa\\File' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/File.php', + 'Psy\\Readline\\Hoa\\FileDirectory' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileDirectory.php', + 'Psy\\Readline\\Hoa\\FileDoesNotExistException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileDoesNotExistException.php', + 'Psy\\Readline\\Hoa\\FileException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileException.php', + 'Psy\\Readline\\Hoa\\FileFinder' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileFinder.php', + 'Psy\\Readline\\Hoa\\FileGeneric' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileGeneric.php', + 'Psy\\Readline\\Hoa\\FileLink' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileLink.php', + 'Psy\\Readline\\Hoa\\FileLinkRead' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileLinkRead.php', + 'Psy\\Readline\\Hoa\\FileLinkReadWrite' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileLinkReadWrite.php', + 'Psy\\Readline\\Hoa\\FileRead' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileRead.php', + 'Psy\\Readline\\Hoa\\FileReadWrite' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/FileReadWrite.php', + 'Psy\\Readline\\Hoa\\IStream' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/IStream.php', + 'Psy\\Readline\\Hoa\\IteratorFileSystem' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/IteratorFileSystem.php', + 'Psy\\Readline\\Hoa\\IteratorRecursiveDirectory' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/IteratorRecursiveDirectory.php', + 'Psy\\Readline\\Hoa\\IteratorSplFileInfo' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/IteratorSplFileInfo.php', + 'Psy\\Readline\\Hoa\\Protocol' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Protocol.php', + 'Psy\\Readline\\Hoa\\ProtocolException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ProtocolException.php', + 'Psy\\Readline\\Hoa\\ProtocolNode' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ProtocolNode.php', + 'Psy\\Readline\\Hoa\\ProtocolNodeLibrary' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ProtocolNodeLibrary.php', + 'Psy\\Readline\\Hoa\\ProtocolWrapper' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/ProtocolWrapper.php', + 'Psy\\Readline\\Hoa\\Readline' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Readline.php', + 'Psy\\Readline\\Hoa\\Stream' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Stream.php', + 'Psy\\Readline\\Hoa\\StreamBufferable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamBufferable.php', + 'Psy\\Readline\\Hoa\\StreamContext' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamContext.php', + 'Psy\\Readline\\Hoa\\StreamException' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamException.php', + 'Psy\\Readline\\Hoa\\StreamIn' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamIn.php', + 'Psy\\Readline\\Hoa\\StreamLockable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamLockable.php', + 'Psy\\Readline\\Hoa\\StreamOut' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamOut.php', + 'Psy\\Readline\\Hoa\\StreamPathable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamPathable.php', + 'Psy\\Readline\\Hoa\\StreamPointable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamPointable.php', + 'Psy\\Readline\\Hoa\\StreamStatable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamStatable.php', + 'Psy\\Readline\\Hoa\\StreamTouchable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/StreamTouchable.php', + 'Psy\\Readline\\Hoa\\Ustring' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Ustring.php', + 'Psy\\Readline\\Hoa\\Xcallable' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Xcallable.php', 'Psy\\Readline\\Libedit' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Libedit.php', 'Psy\\Readline\\Readline' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Readline.php', 'Psy\\Readline\\Transient' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Transient.php', - 'Psy\\Reflection\\ReflectionClassConstant' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionClassConstant.php', + 'Psy\\Readline\\Userland' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Userland.php', 'Psy\\Reflection\\ReflectionConstant' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionConstant.php', - 'Psy\\Reflection\\ReflectionConstant_' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionConstant_.php', 'Psy\\Reflection\\ReflectionLanguageConstruct' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php', 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php', 'Psy\\Reflection\\ReflectionNamespace' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionNamespace.php', @@ -3955,6 +3943,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\Sudo' => __DIR__ . '/..' . '/psy/psysh/src/Sudo.php', 'Psy\\Sudo\\SudoVisitor' => __DIR__ . '/..' . '/psy/psysh/src/Sudo/SudoVisitor.php', 'Psy\\SuperglobalsEnv' => __DIR__ . '/..' . '/psy/psysh/src/SuperglobalsEnv.php', + 'Psy\\SystemEnv' => __DIR__ . '/..' . '/psy/psysh/src/SystemEnv.php', 'Psy\\TabCompletion\\AutoCompleter' => __DIR__ . '/..' . '/psy/psysh/src/TabCompletion/AutoCompleter.php', 'Psy\\TabCompletion\\Matcher\\AbstractContextAwareMatcher' => __DIR__ . '/..' . '/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php', 'Psy\\TabCompletion\\Matcher\\AbstractDefaultParametersMatcher' => __DIR__ . '/..' . '/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php', @@ -3983,9 +3972,15 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Psy\\VarDumper\\Presenter' => __DIR__ . '/..' . '/psy/psysh/src/VarDumper/Presenter.php', 'Psy\\VarDumper\\PresenterAware' => __DIR__ . '/..' . '/psy/psysh/src/VarDumper/PresenterAware.php', 'Psy\\VersionUpdater\\Checker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Checker.php', + 'Psy\\VersionUpdater\\Downloader' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Downloader.php', + 'Psy\\VersionUpdater\\Downloader\\CurlDownloader' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Downloader/CurlDownloader.php', + 'Psy\\VersionUpdater\\Downloader\\Factory' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Downloader/Factory.php', + 'Psy\\VersionUpdater\\Downloader\\FileDownloader' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Downloader/FileDownloader.php', 'Psy\\VersionUpdater\\GitHubChecker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/GitHubChecker.php', + 'Psy\\VersionUpdater\\Installer' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/Installer.php', 'Psy\\VersionUpdater\\IntervalChecker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/IntervalChecker.php', 'Psy\\VersionUpdater\\NoopChecker' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/NoopChecker.php', + 'Psy\\VersionUpdater\\SelfUpdate' => __DIR__ . '/..' . '/psy/psysh/src/VersionUpdater/SelfUpdate.php', 'Ramsey\\Collection\\AbstractArray' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractArray.php', 'Ramsey\\Collection\\AbstractCollection' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractCollection.php', 'Ramsey\\Collection\\AbstractSet' => __DIR__ . '/..' . '/ramsey/collection/src/AbstractSet.php', @@ -4036,6 +4031,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Ramsey\\Uuid\\Converter\\Time\\DegradedTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php', 'Ramsey\\Uuid\\Converter\\Time\\GenericTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php', 'Ramsey\\Uuid\\Converter\\Time\\PhpTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php', + 'Ramsey\\Uuid\\Converter\\Time\\UnixTimeConverter' => __DIR__ . '/..' . '/ramsey/uuid/src/Converter/Time/UnixTimeConverter.php', 'Ramsey\\Uuid\\DegradedUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/DegradedUuid.php', 'Ramsey\\Uuid\\DeprecatedUuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/DeprecatedUuidInterface.php', 'Ramsey\\Uuid\\DeprecatedUuidMethodsTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php', @@ -4071,6 +4067,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Ramsey\\Uuid\\Generator\\RandomLibAdapter' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/RandomLibAdapter.php', 'Ramsey\\Uuid\\Generator\\TimeGeneratorFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorFactory.php', 'Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/TimeGeneratorInterface.php', + 'Ramsey\\Uuid\\Generator\\UnixTimeGenerator' => __DIR__ . '/..' . '/ramsey/uuid/src/Generator/UnixTimeGenerator.php', 'Ramsey\\Uuid\\Guid\\Fields' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/Fields.php', 'Ramsey\\Uuid\\Guid\\Guid' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/Guid.php', 'Ramsey\\Uuid\\Guid\\GuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Guid/GuidBuilder.php', @@ -4095,8 +4092,11 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', 'Ramsey\\Uuid\\Rfc4122\\Fields' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/Fields.php', 'Ramsey\\Uuid\\Rfc4122\\FieldsInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/FieldsInterface.php', + 'Ramsey\\Uuid\\Rfc4122\\MaxTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/MaxTrait.php', + 'Ramsey\\Uuid\\Rfc4122\\MaxUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/MaxUuid.php', 'Ramsey\\Uuid\\Rfc4122\\NilTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/NilTrait.php', 'Ramsey\\Uuid\\Rfc4122\\NilUuid' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/NilUuid.php', + 'Ramsey\\Uuid\\Rfc4122\\TimeTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/TimeTrait.php', 'Ramsey\\Uuid\\Rfc4122\\UuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidBuilder.php', 'Ramsey\\Uuid\\Rfc4122\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidInterface.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV1' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV1.php', @@ -4104,6 +4104,9 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Ramsey\\Uuid\\Rfc4122\\UuidV3' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV3.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV4' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV4.php', 'Ramsey\\Uuid\\Rfc4122\\UuidV5' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV5.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV6' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV6.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV7' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV7.php', + 'Ramsey\\Uuid\\Rfc4122\\UuidV8' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/UuidV8.php', 'Ramsey\\Uuid\\Rfc4122\\Validator' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/Validator.php', 'Ramsey\\Uuid\\Rfc4122\\VariantTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/VariantTrait.php', 'Ramsey\\Uuid\\Rfc4122\\VersionTrait' => __DIR__ . '/..' . '/ramsey/uuid/src/Rfc4122/VersionTrait.php', @@ -4308,10 +4311,12 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php', 'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php', 'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php', + 'SebastianBergmann\\Type\\Parameter' => __DIR__ . '/..' . '/sebastian/type/src/Parameter.php', 'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php', 'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php', 'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php', 'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php', + 'SebastianBergmann\\Type\\TrueType' => __DIR__ . '/..' . '/sebastian/type/src/type/TrueType.php', 'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php', 'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php', 'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php', @@ -5150,6 +5155,7 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTestCase' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTestCase.php', 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php', 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/translation-contracts/Test/TranslatorTest.php', 'Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatableInterface.php', @@ -5189,9 +5195,6 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', - 'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php', - 'Webmozart\\Assert\\InvalidArgumentException' => __DIR__ . '/..' . '/webmozart/assert/src/InvalidArgumentException.php', - 'Webmozart\\Assert\\Mixin' => __DIR__ . '/..' . '/webmozart/assert/src/Mixin.php', 'Whoops\\Exception\\ErrorException' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/ErrorException.php', 'Whoops\\Exception\\Formatter' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Formatter.php', 'Whoops\\Exception\\Frame' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Frame.php', @@ -5204,118 +5207,24 @@ class ComposerStaticInit67b256f53a0993f7a39d76612331a21d 'Whoops\\Handler\\PlainTextHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php', 'Whoops\\Handler\\PrettyPageHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', 'Whoops\\Handler\\XmlResponseHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php', + 'Whoops\\Inspector\\InspectorFactory' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorFactory.php', + 'Whoops\\Inspector\\InspectorFactoryInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorFactoryInterface.php', + 'Whoops\\Inspector\\InspectorInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorInterface.php', 'Whoops\\Run' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Run.php', 'Whoops\\RunInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/RunInterface.php', 'Whoops\\Util\\HtmlDumperOutput' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php', 'Whoops\\Util\\Misc' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/Misc.php', 'Whoops\\Util\\SystemFacade' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/SystemFacade.php', 'Whoops\\Util\\TemplateHelper' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', - 'phpDocumentor\\Reflection\\DocBlock' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock.php', - 'phpDocumentor\\Reflection\\DocBlockFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', - 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', - 'phpDocumentor\\Reflection\\DocBlock\\Description' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Description.php', - 'phpDocumentor\\Reflection\\DocBlock\\DescriptionFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\ExampleFinder' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php', - 'phpDocumentor\\Reflection\\DocBlock\\Serializer' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php', - 'phpDocumentor\\Reflection\\DocBlock\\StandardTagFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tag' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php', - 'phpDocumentor\\Reflection\\DocBlock\\TagFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Author' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\BaseTag' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Covers' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Deprecated' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Example' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Factory\\StaticMethod' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\AlignFormatter' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Formatter\\PassthroughFormatter' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Generic' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\InvalidTag' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Link' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Method' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Param' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Property' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyRead' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\PropertyWrite' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Fqsen' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Reference' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Url' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Return_' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\See' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Since' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Source' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\TagWithType' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Throws' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Uses' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Var_' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php', - 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Version' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php', - 'phpDocumentor\\Reflection\\Element' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Element.php', - 'phpDocumentor\\Reflection\\Exception\\PcreException' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/Exception/PcreException.php', - 'phpDocumentor\\Reflection\\File' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/File.php', - 'phpDocumentor\\Reflection\\Fqsen' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Fqsen.php', - 'phpDocumentor\\Reflection\\FqsenResolver' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/FqsenResolver.php', - 'phpDocumentor\\Reflection\\Location' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Location.php', - 'phpDocumentor\\Reflection\\Project' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/Project.php', - 'phpDocumentor\\Reflection\\ProjectFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src/ProjectFactory.php', - 'phpDocumentor\\Reflection\\PseudoType' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoType.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\CallableString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/CallableString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\False_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/False_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\HtmlEscapedString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/HtmlEscapedString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\IntegerRange' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/IntegerRange.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\List_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/List_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\LiteralString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\LowercaseString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/LowercaseString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NegativeInteger' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/NegativeInteger.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NonEmptyLowercaseString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyLowercaseString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NonEmptyString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/NonEmptyString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\NumericString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/NumericString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\Numeric_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/Numeric_.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\PositiveInteger' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/PositiveInteger.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\TraitString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/TraitString.php', - 'phpDocumentor\\Reflection\\PseudoTypes\\True_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/PseudoTypes/True_.php', - 'phpDocumentor\\Reflection\\Type' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Type.php', - 'phpDocumentor\\Reflection\\TypeResolver' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/TypeResolver.php', - 'phpDocumentor\\Reflection\\Types\\AbstractList' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/AbstractList.php', - 'phpDocumentor\\Reflection\\Types\\AggregatedType' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/AggregatedType.php', - 'phpDocumentor\\Reflection\\Types\\ArrayKey' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/ArrayKey.php', - 'phpDocumentor\\Reflection\\Types\\Array_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Array_.php', - 'phpDocumentor\\Reflection\\Types\\Boolean' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Boolean.php', - 'phpDocumentor\\Reflection\\Types\\Callable_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Callable_.php', - 'phpDocumentor\\Reflection\\Types\\ClassString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/ClassString.php', - 'phpDocumentor\\Reflection\\Types\\Collection' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Collection.php', - 'phpDocumentor\\Reflection\\Types\\Compound' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Compound.php', - 'phpDocumentor\\Reflection\\Types\\Context' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Context.php', - 'phpDocumentor\\Reflection\\Types\\ContextFactory' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/ContextFactory.php', - 'phpDocumentor\\Reflection\\Types\\Expression' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Expression.php', - 'phpDocumentor\\Reflection\\Types\\Float_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Float_.php', - 'phpDocumentor\\Reflection\\Types\\Integer' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Integer.php', - 'phpDocumentor\\Reflection\\Types\\InterfaceString' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/InterfaceString.php', - 'phpDocumentor\\Reflection\\Types\\Intersection' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Intersection.php', - 'phpDocumentor\\Reflection\\Types\\Iterable_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Iterable_.php', - 'phpDocumentor\\Reflection\\Types\\Mixed_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Mixed_.php', - 'phpDocumentor\\Reflection\\Types\\Never_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Never_.php', - 'phpDocumentor\\Reflection\\Types\\Null_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Null_.php', - 'phpDocumentor\\Reflection\\Types\\Nullable' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Nullable.php', - 'phpDocumentor\\Reflection\\Types\\Object_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Object_.php', - 'phpDocumentor\\Reflection\\Types\\Parent_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Parent_.php', - 'phpDocumentor\\Reflection\\Types\\Resource_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Resource_.php', - 'phpDocumentor\\Reflection\\Types\\Scalar' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Scalar.php', - 'phpDocumentor\\Reflection\\Types\\Self_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Self_.php', - 'phpDocumentor\\Reflection\\Types\\Static_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Static_.php', - 'phpDocumentor\\Reflection\\Types\\String_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/String_.php', - 'phpDocumentor\\Reflection\\Types\\This' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/This.php', - 'phpDocumentor\\Reflection\\Types\\Void_' => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src/Types/Void_.php', - 'phpDocumentor\\Reflection\\Utils' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/Utils.php', 'voku\\helper\\ASCII' => __DIR__ . '/..' . '/voku/portable-ascii/src/voku/helper/ASCII.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit67b256f53a0993f7a39d76612331a21d::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit67b256f53a0993f7a39d76612331a21d::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit67b256f53a0993f7a39d76612331a21d::$prefixesPsr0; - $loader->classMap = ComposerStaticInit67b256f53a0993f7a39d76612331a21d::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit5369a4d76f17a89933afbb2f1c9dc92c::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index b311fc93..46f3b0d4 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,33 +2,33 @@ "packages": [ { "name": "asm89/stack-cors", - "version": "v2.1.1", - "version_normalized": "2.1.1.0", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/50f57105bad3d97a43ec4a485eb57daf347eafea", + "reference": "50f57105bad3d97a43ec4a485eb57daf347eafea", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" + "php": "^7.3|^8.0", + "symfony/http-foundation": "^5.3|^6|^7", + "symfony/http-kernel": "^5.3|^6|^7" }, "require-dev": { - "phpunit/phpunit": "^7|^9", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, - "time": "2022-01-18T09:12:03+00:00", + "time": "2023-11-14T13:51:46+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "installation-source": "dist", @@ -55,7 +55,7 @@ ], "support": { "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" + "source": "https://github.com/asm89/stack-cors/tree/v2.2.0" }, "install-path": "../asm89/stack-cors" }, @@ -117,29 +117,28 @@ }, { "name": "brick/math", - "version": "0.9.3", - "version_normalized": "0.9.3.0", + "version": "0.11.0", + "version_normalized": "0.11.0.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", - "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.1 || ^8.0" + "php": "^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", - "vimeo/psalm": "4.9.2" + "phpunit/phpunit": "^9.0", + "vimeo/psalm": "5.0.0" }, - "time": "2021-08-15T20:50:18+00:00", + "time": "2023-01-15T23:15:59+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -164,43 +163,111 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.9.3" + "source": "https://github.com/brick/math/tree/0.11.0" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/brick/math", - "type": "tidelift" } ], "install-path": "../brick/math" }, { - "name": "codexshaper/laravel-woocommerce", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "name": "carbonphp/carbon-doctrine-types", + "version": "2.1.0", + "version_normalized": "2.1.0.0", "source": { "type": "git", - "url": "https://github.com/Codexshaper/laravel-woocommerce.git", - "reference": "029741518cbe23ddd5dd780dc209300029538196" + "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codexshaper/laravel-woocommerce/zipball/029741518cbe23ddd5dd780dc209300029538196", - "reference": "029741518cbe23ddd5dd780dc209300029538196", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "doctrine/dbal": "<3.7.0 || >=4.0.0" + }, + "require-dev": { + "doctrine/dbal": "^3.7.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" + }, + "time": "2023-12-11T17:09:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Types to use Carbon in Doctrine", + "keywords": [ + "carbon", + "date", + "datetime", + "doctrine", + "time" + ], + "support": { + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" + }, + "funding": [ + { + "url": "https://github.com/kylekatarnls", + "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "install-path": "../carbonphp/carbon-doctrine-types" + }, + { + "name": "codexshaper/laravel-woocommerce", + "version": "v3.0.4", + "version_normalized": "3.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/Codexshaper/laravel-woocommerce.git", + "reference": "4b8865d937699ed386818f2188e23ee9926c8100" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codexshaper/laravel-woocommerce/zipball/4b8865d937699ed386818f2188e23ee9926c8100", + "reference": "4b8865d937699ed386818f2188e23ee9926c8100", "shasum": "" }, "require": { "automattic/woocommerce": "^3.0" }, "require-dev": { - "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0", + "illuminate/support": "~5.5.40|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0", "phpunit/phpunit": "^7.0|^8.0|^9.3" }, - "time": "2020-11-12T10:19:30+00:00", + "time": "2024-03-05T11:43:18+00:00", "type": "library", "extra": { "laravel": { @@ -231,6 +298,7 @@ "Variation": "Codexshaper\\WooCommerce\\Models\\Variation", "Webhook": "Codexshaper\\WooCommerce\\Facades\\Webhook", "WooCommerce": "Codexshaper\\WooCommerce\\Facades\\WooCommerce", + "WooAnalytics": "Codexshaper\\WooCommerce\\Facades\\WooAnalytics", "Query": "Codexshaper\\WooCommerce\\Facades\\Query" } } @@ -263,37 +331,37 @@ ], "support": { "issues": "https://github.com/Codexshaper/laravel-woocommerce/issues", - "source": "https://github.com/Codexshaper/laravel-woocommerce/tree/v3.0.1" + "source": "https://github.com/Codexshaper/laravel-woocommerce/tree/v3.0.4" }, "install-path": "../codexshaper/laravel-woocommerce" }, { "name": "doctrine/inflector", - "version": "2.0.4", - "version_normalized": "2.0.4.0", + "version": "2.0.10", + "version_normalized": "2.0.10.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" }, - "time": "2021-10-22T20:16:43+00:00", + "time": "2024-02-18T20:23:39+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -343,7 +411,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -363,33 +431,33 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.1", - "version_normalized": "1.4.1.0", + "version": "1.5.0", + "version_normalized": "1.5.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, - "time": "2022-03-03T08:28:38+00:00", + "time": "2022-12-30T00:15:36+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -416,7 +484,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -653,17 +721,17 @@ }, { "name": "facade/flare-client-php", - "version": "1.9.1", - "version_normalized": "1.9.1.0", + "version": "1.10.0", + "version_normalized": "1.10.0.0", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", + "reference": "213fa2c69e120bca4c51ba3e82ed1834ef3f41b8", "shasum": "" }, "require": { @@ -676,10 +744,10 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", + "phpunit/phpunit": "^7.5", "spatie/phpunit-snapshot-assertions": "^2.0" }, - "time": "2021-09-13T12:16:46+00:00", + "time": "2022-08-09T11:23:57+00:00", "type": "library", "extra": { "branch-alias": { @@ -688,12 +756,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Facade\\FlareClient\\": "src" - }, "files": [ "src/helpers.php" - ] + ], + "psr-4": { + "Facade\\FlareClient\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -709,7 +777,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" + "source": "https://github.com/facade/flare-client-php/tree/1.10.0" }, "funding": [ { @@ -721,17 +789,17 @@ }, { "name": "facade/ignition", - "version": "2.17.5", - "version_normalized": "2.17.5.0", + "version": "2.17.7", + "version_normalized": "2.17.7.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c" + "reference": "b4f5955825bb4b74cba0f94001761c46335c33e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d71996f83c9a5a7807331b8986ac890352b7a0c", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c", + "url": "https://api.github.com/repos/facade/ignition/zipball/b4f5955825bb4b74cba0f94001761c46335c33e9", + "reference": "b4f5955825bb4b74cba0f94001761c46335c33e9", "shasum": "" }, "require": { @@ -756,7 +824,7 @@ "suggest": { "laravel/telescope": "^3.1" }, - "time": "2022-02-23T18:31:24+00:00", + "time": "2023-01-26T12:34:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -858,21 +926,21 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", - "version_normalized": "1.19.0.0", + "version": "v1.23.1", + "version_normalized": "1.23.1.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -883,7 +951,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -892,13 +961,8 @@ "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", "ext-mbstring": "Required for multibyte Unicode string functionality." }, - "time": "2022-02-02T17:38:57+00:00", + "time": "2024-01-02T13:46:09+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.19-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -922,23 +986,23 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, "install-path": "../fakerphp/faker" }, { "name": "fideloper/proxy", - "version": "4.4.1", - "version_normalized": "4.4.1.0", + "version": "4.4.2", + "version_normalized": "4.4.2.0", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", - "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", + "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", "shasum": "" }, "require": { @@ -948,9 +1012,9 @@ "require-dev": { "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5.8|^9.3.3" }, - "time": "2020-10-22T13:48:01+00:00", + "time": "2022-02-09T13:33:34+00:00", "type": "library", "extra": { "laravel": { @@ -983,23 +1047,23 @@ ], "support": { "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" + "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" }, "install-path": "../fideloper/proxy" }, { "name": "filp/whoops", - "version": "2.14.5", - "version_normalized": "2.14.5.0", + "version": "2.15.4", + "version_normalized": "2.15.4.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -1015,7 +1079,7 @@ "symfony/var-dumper": "Pretty print complex values better with var-dumper available", "whoops/soap": "Formats errors as SOAP responses" }, - "time": "2022-01-07T12:00:00+00:00", + "time": "2023-11-03T12:00:00+00:00", "type": "library", "extra": { "branch-alias": { @@ -1051,7 +1115,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.5" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -1141,27 +1205,28 @@ "type": "github" } ], + "abandoned": true, "install-path": "../fruitcake/laravel-cors" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", - "version_normalized": "7.4.2.0", + "version": "7.8.1", + "version_normalized": "7.8.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1170,10 +1235,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1181,11 +1247,12 @@ "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, - "time": "2022-03-20T14:16:28+00:00", + "time": "2023-12-03T20:35:24+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "7.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "installation-source": "dist", @@ -1252,7 +1319,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -1272,37 +1339,36 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.1", - "version_normalized": "1.5.1.0", + "version": "2.0.2", + "version_normalized": "2.0.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, - "time": "2021-10-22T20:56:57+00:00", + "time": "2023-12-03T20:19:20+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "installation-source": "dist", "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1339,7 +1405,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -1359,23 +1425,23 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", - "version_normalized": "2.2.1.0", + "version": "2.6.2", + "version_normalized": "2.6.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -1383,18 +1449,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2022-03-20T21:55:58+00:00", + "time": "2023-12-03T20:05:35+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.2-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "installation-source": "dist", @@ -1457,7 +1524,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -1696,40 +1763,38 @@ }, { "name": "laravel/tinker", - "version": "v2.7.2", - "version_normalized": "2.7.2.0", + "version": "v2.9.0", + "version_normalized": "2.9.0.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "dff39b661e827dae6e092412f976658df82dbac5" + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", - "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, - "time": "2022-03-23T12:38:24+00:00", + "time": "2024-01-04T16:10:04+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -1761,7 +1826,7 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.2" + "source": "https://github.com/laravel/tinker/tree/v2.9.0" }, "install-path": "../laravel/tinker" }, @@ -1863,17 +1928,17 @@ }, { "name": "league/flysystem", - "version": "1.1.9", - "version_normalized": "1.1.9.0", + "version": "1.1.10", + "version_normalized": "1.1.10.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", "shasum": "" }, "require": { @@ -1903,7 +1968,7 @@ "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" }, - "time": "2021-12-09T09:40:50+00:00", + "time": "2022-10-04T09:16:37+00:00", "type": "library", "extra": { "branch-alias": { @@ -1948,7 +2013,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" }, "funding": [ { @@ -1960,29 +2025,29 @@ }, { "name": "league/mime-type-detection", - "version": "1.11.0", - "version_normalized": "1.11.0.0", + "version": "1.15.0", + "version_normalized": "1.15.0.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", - "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" }, - "time": "2022-04-17T13:12:02+00:00", + "time": "2024-01-28T23:22:08+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2003,7 +2068,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -2019,41 +2084,41 @@ }, { "name": "mockery/mockery", - "version": "1.5.0", - "version_normalized": "1.5.0.0", + "version": "1.6.12", + "version_normalized": "1.6.12.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, - "time": "2022-01-20T13:18:17+00:00", + "time": "2024-05-16T03:13:13+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "installation-source": "dist", "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -2064,12 +2129,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -2087,24 +2160,27 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, "install-path": "../mockery/mockery" }, { "name": "monolog/monolog", - "version": "2.5.0", - "version_normalized": "2.5.0.0", + "version": "2.9.3", + "version_normalized": "2.9.3.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4192345e260f1d51b365536199744b987e160edc" + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", - "reference": "4192345e260f1d51b365536199744b987e160edc", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", "shasum": "" }, "require": { @@ -2117,18 +2193,22 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", - "graylog2/gelf-php": "^1.4.2", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -2143,11 +2223,10 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, - "time": "2022-04-08T15:43:54+00:00", + "time": "2024-04-12T20:52:51+00:00", "type": "library", "extra": { "branch-alias": { @@ -2180,7 +2259,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.5.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.3" }, "funding": [ { @@ -2196,17 +2275,17 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.0", - "version_normalized": "1.11.0.0", + "version": "1.11.1", + "version_normalized": "1.11.1.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -2221,7 +2300,7 @@ "doctrine/common": "^2.13.3 || ^3.2.2", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, - "time": "2022-03-03T13:19:32+00:00", + "time": "2023-03-08T13:26:56+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2246,7 +2325,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -2258,38 +2337,45 @@ }, { "name": "nesbot/carbon", - "version": "2.57.0", - "version_normalized": "2.57.0.0", + "version": "2.72.3", + "version_normalized": "2.72.3.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { + "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", "php": "^7.1.8 || ^8.0", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, + "provide": { + "psr/clock-implementation": "1.0" + }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "time": "2022-02-13T18:13:33+00:00", + "time": "2024-01-25T10:35:09+00:00", "bin": [ "bin/carbon" ], @@ -2345,11 +2431,15 @@ }, "funding": [ { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", "type": "tidelift" } ], @@ -2357,35 +2447,37 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", - "version_normalized": "4.13.2.0", + "version": "v5.0.2", + "version_normalized": "5.0.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13", + "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, - "time": "2021-11-30T19:35:32+00:00", + "time": "2024-03-05T20:51:40+00:00", "bin": [ "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "installation-source": "dist", @@ -2410,7 +2502,7 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2" }, "install-path": "../nikic/php-parser" }, @@ -2575,27 +2667,28 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", - "version_normalized": "2.0.3.0", + "version": "2.0.4", + "version_normalized": "2.0.4.0", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, - "time": "2021-07-20T11:28:43+00:00", + "time": "2024-03-03T12:33:53+00:00", "type": "library", "extra": { "branch-alias": { @@ -2632,8 +2725,14 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], "install-path": "../phar-io/manifest" }, { @@ -2690,202 +2789,37 @@ }, "install-path": "../phar-io/version" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "version_normalized": "2.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "time": "2020-06-27T09:03:43+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "install-path": "../phpdocumentor/reflection-common" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "version_normalized": "5.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "time": "2021-10-19T17:43:47+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "install-path": "../phpdocumentor/reflection-docblock" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "version_normalized": "1.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "time": "2022-03-15T21:29:03+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "install-path": "../phpdocumentor/type-resolver" - }, { "name": "phpoption/phpoption", - "version": "1.8.1", - "version_normalized": "1.8.1.0", + "version": "1.9.2", + "version_normalized": "1.9.2.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, - "time": "2021-12-04T23:24:31+00:00", + "time": "2023-11-12T21:59:55+00:00", "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", @@ -2919,7 +2853,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -2933,96 +2867,26 @@ ], "install-path": "../phpoption/phpoption" }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "version_normalized": "1.15.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "time": "2021-12-08T12:19:24+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "install-path": "../phpspec/prophecy" - }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", - "version_normalized": "9.2.15.0", + "version": "9.2.31", + "version_normalized": "9.2.31.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -3037,10 +2901,10 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "time": "2022-03-07T09:28:20+00:00", + "time": "2024-03-02T06:37:42+00:00", "type": "library", "extra": { "branch-alias": { @@ -3073,7 +2937,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -3338,21 +3203,21 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.20", - "version_normalized": "9.5.20.0", + "version": "9.6.19", + "version_normalized": "9.6.19.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -3363,40 +3228,35 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "time": "2022-04-01T12:37:26+00:00", + "time": "2024-04-05T04:35:58+00:00", "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "installation-source": "dist", @@ -3428,7 +3288,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -3438,10 +3299,65 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], "install-path": "../phpunit/phpunit" }, + { + "name": "psr/clock", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "time": "2022-11-25T14:36:26+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "install-path": "../psr/clock" + }, { "name": "psr/container", "version": "1.1.2", @@ -3548,24 +3464,24 @@ }, { "name": "psr/http-client", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.0.3", + "version_normalized": "1.0.3.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, - "time": "2020-06-29T06:28:15+00:00", + "time": "2023-09-23T14:17:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -3585,7 +3501,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -3597,30 +3513,30 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, "install-path": "../psr/http-client" }, { "name": "psr/http-factory", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, - "time": "2019-04-30T12:38:16+00:00", + "time": "2024-04-15T12:06:14+00:00", "type": "library", "extra": { "branch-alias": { @@ -3640,10 +3556,10 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3655,33 +3571,33 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory" }, "install-path": "../psr/http-factory" }, { "name": "psr/http-message", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "2.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, - "time": "2016-08-06T14:39:51+00:00", + "time": "2023-04-04T09:54:51+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "installation-source": "dist", @@ -3697,7 +3613,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -3711,7 +3627,7 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, "install-path": "../psr/http-message" }, @@ -3824,49 +3740,50 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", - "version_normalized": "0.11.2.0", + "version": "v0.12.3", + "version_normalized": "0.12.3.0", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", + "reference": "b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, - "time": "2022-02-28T15:28:54+00:00", + "time": "2024-04-02T15:57:53+00:00", "bin": [ "bin/psysh" ], "type": "library", "extra": { "branch-alias": { - "dev-main": "0.11.x-dev" + "dev-main": "0.12.x-dev" + }, + "bamarni-bin": { + "bin-links": false, + "forward-command": false } }, "installation-source": "dist", @@ -3899,7 +3816,7 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.3" }, "install-path": "../psy/psysh" }, @@ -3952,44 +3869,55 @@ }, { "name": "ramsey/collection", - "version": "1.2.2", - "version_normalized": "1.2.2.0", + "version": "1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", "shasum": "" }, "require": { - "php": "^7.3 || ^8", + "php": "^7.4 || ^8.0", "symfony/polyfill-php81": "^1.23" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, - "time": "2021-10-10T03:01:02+00:00", + "time": "2022-12-27T19:12:24+00:00", "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -4018,7 +3946,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/1.3.0" }, "funding": [ { @@ -4034,25 +3962,24 @@ }, { "name": "ramsey/uuid", - "version": "4.3.1", - "version_normalized": "4.3.1.0", + "version": "4.7.6", + "version_normalized": "4.7.6.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", - "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9", - "ext-ctype": "*", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", - "ramsey/collection": "^1.0" + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4064,30 +3991,29 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, - "time": "2022-03-27T21:42:02+00:00", + "time": "2024-04-27T21:32:50+00:00", "type": "library", "extra": { "captainhook": { @@ -4115,7 +4041,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.3.1" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -4131,17 +4057,17 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -4150,7 +4076,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, - "time": "2020-09-28T06:08:49+00:00", + "time": "2024-03-02T06:27:43+00:00", "type": "library", "extra": { "branch-alias": { @@ -4178,7 +4104,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -4307,17 +4233,17 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", - "version_normalized": "4.0.6.0", + "version": "4.0.8", + "version_normalized": "4.0.8.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -4328,7 +4254,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, - "time": "2020-10-26T15:49:45+00:00", + "time": "2022-09-14T12:41:17+00:00", "type": "library", "extra": { "branch-alias": { @@ -4372,7 +4298,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -4384,27 +4310,27 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", - "version_normalized": "2.0.2.0", + "version": "2.0.3", + "version_normalized": "2.0.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { "phpunit/phpunit": "^9.3" }, - "time": "2020-10-26T15:52:27+00:00", + "time": "2023-12-22T06:19:30+00:00", "type": "library", "extra": { "branch-alias": { @@ -4432,7 +4358,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -4444,17 +4370,17 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", - "version_normalized": "4.0.4.0", + "version": "4.0.6", + "version_normalized": "4.0.6.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -4464,7 +4390,7 @@ "phpunit/phpunit": "^9.3", "symfony/process": "^4.2 || ^5" }, - "time": "2020-10-26T13:10:38+00:00", + "time": "2024-03-02T06:30:58+00:00", "type": "library", "extra": { "branch-alias": { @@ -4501,7 +4427,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -4513,17 +4439,17 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", - "version_normalized": "5.1.4.0", + "version": "5.1.5", + "version_normalized": "5.1.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -4535,7 +4461,7 @@ "suggest": { "ext-posix": "*" }, - "time": "2022-04-03T09:37:03+00:00", + "time": "2023-02-03T06:03:51+00:00", "type": "library", "extra": { "branch-alias": { @@ -4567,7 +4493,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -4579,17 +4505,17 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", - "version_normalized": "4.0.4.0", + "version": "4.0.6", + "version_normalized": "4.0.6.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -4600,7 +4526,7 @@ "ext-mbstring": "*", "phpunit/phpunit": "^9.3" }, - "time": "2021-11-11T14:18:36+00:00", + "time": "2024-03-02T06:33:00+00:00", "type": "library", "extra": { "branch-alias": { @@ -4647,7 +4573,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -4659,17 +4585,17 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", - "version_normalized": "5.0.5.0", + "version": "5.0.7", + "version_normalized": "5.0.7.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -4684,7 +4610,7 @@ "suggest": { "ext-uopz": "*" }, - "time": "2022-02-14T08:28:10+00:00", + "time": "2024-03-02T06:35:11+00:00", "type": "library", "extra": { "branch-alias": { @@ -4714,7 +4640,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -4726,27 +4652,27 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", - "version_normalized": "1.0.3.0", + "version": "1.0.4", + "version_normalized": "1.0.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { "phpunit/phpunit": "^9.3" }, - "time": "2020-11-28T06:42:11+00:00", + "time": "2023-12-22T06:20:34+00:00", "type": "library", "extra": { "branch-alias": { @@ -4774,7 +4700,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -4904,17 +4830,17 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", - "version_normalized": "4.0.4.0", + "version": "4.0.5", + "version_normalized": "4.0.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -4923,7 +4849,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, - "time": "2020-10-26T13:17:30+00:00", + "time": "2023-02-03T06:07:39+00:00", "type": "library", "extra": { "branch-alias": { @@ -4955,10 +4881,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -4970,17 +4896,17 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", - "version_normalized": "3.0.3.0", + "version": "3.0.4", + "version_normalized": "3.0.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -4989,11 +4915,11 @@ "require-dev": { "phpunit/phpunit": "^9.0" }, - "time": "2020-09-28T06:45:17+00:00", + "time": "2024-03-14T16:00:52+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "installation-source": "dist", @@ -5015,8 +4941,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -5028,17 +4953,17 @@ }, { "name": "sebastian/type", - "version": "3.0.0", - "version_normalized": "3.0.0.0", + "version": "3.2.1", + "version_normalized": "3.2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -5047,11 +4972,11 @@ "require-dev": { "phpunit/phpunit": "^9.5" }, - "time": "2022-03-15T09:54:48+00:00", + "time": "2023-02-03T06:13:03+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "installation-source": "dist", @@ -5075,7 +5000,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -5432,17 +5357,17 @@ }, { "name": "symfony/console", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b" + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", - "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", + "url": "https://api.github.com/repos/symfony/console/zipball/f3e591c48688a0cfa1a3296205926c05e84b22b1", + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1", "shasum": "" }, "require": { @@ -5480,7 +5405,7 @@ "symfony/lock": "", "symfony/process": "" }, - "time": "2022-04-12T16:02:29+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5509,12 +5434,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.8" + "source": "https://github.com/symfony/console/tree/v5.4.39" }, "funding": [ { @@ -5534,23 +5459,23 @@ }, { "name": "symfony/css-selector", - "version": "v6.0.3", - "version_normalized": "6.0.3.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a" + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/1955d595c12c111629cc814d3f2a2ff13580508a", - "reference": "1955d595c12c111629cc814d3f2a2ff13580508a", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f1d00bddb83a4cb2138564b2150001cb6ce272b1", + "reference": "f1d00bddb83a4cb2138564b2150001cb6ce272b1", "shasum": "" }, "require": { "php": ">=8.0.2" }, - "time": "2022-01-02T09:55:41+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5582,7 +5507,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.0.3" + "source": "https://github.com/symfony/css-selector/tree/v6.0.19" }, "funding": [ { @@ -5602,8 +5527,8 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -5652,7 +5577,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -5672,17 +5597,17 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c1fcde614dfe99d62a83b796a53b8bad358b266a" + "reference": "9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1fcde614dfe99d62a83b796a53b8bad358b266a", - "reference": "c1fcde614dfe99d62a83b796a53b8bad358b266a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd", + "reference": "9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd", "shasum": "" }, "require": { @@ -5695,7 +5620,7 @@ "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/serializer": "^4.4|^5.0|^6.0" }, - "time": "2022-04-12T15:48:08+00:00", + "time": "2024-04-18T08:26:06+00:00", "bin": [ "Resources/bin/patch-type-declarations" ], @@ -5726,7 +5651,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.8" + "source": "https://github.com/symfony/error-handler/tree/v5.4.39" }, "funding": [ { @@ -5746,17 +5671,17 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.0.3", - "version_normalized": "6.0.3.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6472ea2dd415e925b90ca82be64b8bc6157f3934", - "reference": "6472ea2dd415e925b90ca82be64b8bc6157f3934", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { @@ -5784,7 +5709,7 @@ "symfony/dependency-injection": "", "symfony/http-kernel": "" }, - "time": "2022-01-02T09:55:41+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5812,7 +5737,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -5832,8 +5757,8 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -5894,7 +5819,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -5914,17 +5839,17 @@ }, { "name": "symfony/finder", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" + "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", + "url": "https://api.github.com/repos/symfony/finder/zipball/f6a96e4fcd468a25fede16ee665f50ced856bd0a", + "reference": "f6a96e4fcd468a25fede16ee665f50ced856bd0a", "shasum": "" }, "require": { @@ -5932,7 +5857,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, - "time": "2022-04-15T08:07:45+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5960,7 +5885,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.8" + "source": "https://github.com/symfony/finder/tree/v5.4.39" }, "funding": [ { @@ -5980,17 +5905,17 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2" + "reference": "3356c93efc30b0c85a37606bdfef16b813faec0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2", - "reference": "ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3356c93efc30b0c85a37606bdfef16b813faec0e", + "reference": "3356c93efc30b0c85a37606bdfef16b813faec0e", "shasum": "" }, "require": { @@ -6002,13 +5927,16 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" }, - "time": "2022-04-22T08:14:12+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6036,7 +5964,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.8" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.39" }, "funding": [ { @@ -6056,17 +5984,17 @@ }, { "name": "symfony/http-kernel", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "cf7e61106abfc19b305ca0aedc41724ced89a02a" + "reference": "1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/cf7e61106abfc19b305ca0aedc41724ced89a02a", - "reference": "cf7e61106abfc19b305ca0aedc41724ced89a02a", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0", + "reference": "1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0", "shasum": "" }, "require": { @@ -6075,7 +6003,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^4.4|^5.0|^6.0", "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16" @@ -6115,6 +6043,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -6123,7 +6052,7 @@ "symfony/console": "", "symfony/dependency-injection": "" }, - "time": "2022-04-27T17:22:21+00:00", + "time": "2024-04-29T11:17:46+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6151,7 +6080,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.8" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.39" }, "funding": [ { @@ -6171,17 +6100,17 @@ }, { "name": "symfony/mime", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "af49bc163ec3272f677bde3bc44c0d766c1fd662" + "reference": "a5364f016fd9e090f7b4f250a97ea6925a5ca985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/af49bc163ec3272f677bde3bc44c0d766c1fd662", - "reference": "af49bc163ec3272f677bde3bc44c0d766c1fd662", + "url": "https://api.github.com/repos/symfony/mime/zipball/a5364f016fd9e090f7b4f250a97ea6925a5ca985", + "reference": "a5364f016fd9e090f7b4f250a97ea6925a5ca985", "shasum": "" }, "require": { @@ -6195,17 +6124,19 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<4.4", + "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.4", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3" }, - "time": "2022-04-12T15:48:08+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6237,7 +6168,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.8" + "source": "https://github.com/symfony/mime/tree/v5.4.39" }, "funding": [ { @@ -6257,17 +6188,17 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -6279,12 +6210,9 @@ "suggest": { "ext-ctype": "For best performance" }, - "time": "2021-10-20T20:35:02+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6322,7 +6250,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -6342,17 +6270,17 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f", + "reference": "cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f", "shasum": "" }, "require": { @@ -6364,12 +6292,9 @@ "suggest": { "ext-iconv": "For best performance" }, - "time": "2022-01-04T09:04:05+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6408,7 +6333,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.29.0" }, "funding": [ { @@ -6428,17 +6353,17 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -6447,12 +6372,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2021-11-23T21:10:46+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6492,7 +6414,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -6512,17 +6434,17 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -6533,12 +6455,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2021-09-14T14:02:44+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6582,7 +6501,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -6602,17 +6521,17 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -6621,12 +6540,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2021-02-19T12:13:01+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6669,7 +6585,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -6689,17 +6605,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -6711,12 +6627,9 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2021-11-30T18:21:41+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6755,7 +6668,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -6775,28 +6688,25 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-05-27T09:17:38+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6834,7 +6744,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -6854,28 +6764,25 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-06-05T21:20:04+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -6916,7 +6823,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" }, "funding": [ { @@ -6936,28 +6843,25 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-03-04T08:16:47+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7002,7 +6906,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -7022,28 +6926,25 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", - "version_normalized": "1.25.0.0", + "version": "v1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-09-13T13:58:11+00:00", + "time": "2024-01-29T20:11:03+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7084,7 +6985,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -7104,24 +7005,24 @@ }, { "name": "symfony/process", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3" + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", + "url": "https://api.github.com/repos/symfony/process/zipball/85a554acd7c28522241faf2e97b9541247a0d3d5", + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-php80": "^1.16" }, - "time": "2022-04-08T05:07:18+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7149,7 +7050,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.8" + "source": "https://github.com/symfony/process/tree/v5.4.39" }, "funding": [ { @@ -7169,17 +7070,17 @@ }, { "name": "symfony/routing", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7" + "reference": "5485974ef20de1150dd195a81e9da4915d45263f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", - "reference": "e07817bb6244ea33ef5ad31abc4a9288bef3f2f7", + "url": "https://api.github.com/repos/symfony/routing/zipball/5485974ef20de1150dd195a81e9da4915d45263f", + "reference": "5485974ef20de1150dd195a81e9da4915d45263f", "shasum": "" }, "require": { @@ -7194,7 +7095,7 @@ "symfony/yaml": "<4.4" }, "require-dev": { - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", "symfony/config": "^5.3|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", @@ -7208,7 +7109,7 @@ "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, - "time": "2022-04-18T21:45:37+00:00", + "time": "2024-04-18T08:26:06+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7242,7 +7143,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.8" + "source": "https://github.com/symfony/routing/tree/v5.4.39" }, "funding": [ { @@ -7262,17 +7163,17 @@ }, { "name": "symfony/service-contracts", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", + "version": "v2.5.3", + "version_normalized": "2.5.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -7286,7 +7187,7 @@ "suggest": { "symfony/service-implementation": "" }, - "time": "2022-03-13T20:07:29+00:00", + "time": "2023-04-21T15:04:16+00:00", "type": "library", "extra": { "branch-alias": { @@ -7328,7 +7229,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -7348,17 +7249,17 @@ }, { "name": "symfony/string", - "version": "v6.0.8", - "version_normalized": "6.0.8.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", - "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { @@ -7377,7 +7278,7 @@ "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, - "time": "2022-04-22T08:18:02+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7416,7 +7317,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.8" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -7436,17 +7337,17 @@ }, { "name": "symfony/translation", - "version": "v6.0.8", - "version_normalized": "6.0.8.0", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "3d38cf8f8834148c4457681d539bc204de701501" + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/3d38cf8f8834148c4457681d539bc204de701501", - "reference": "3d38cf8f8834148c4457681d539bc204de701501", + "url": "https://api.github.com/repos/symfony/translation/zipball/9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", + "reference": "9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f", "shasum": "" }, "require": { @@ -7483,7 +7384,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2022-04-22T08:18:02+00:00", + "time": "2023-01-01T08:36:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7514,7 +7415,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.8" + "source": "https://github.com/symfony/translation/tree/v6.0.19" }, "funding": [ { @@ -7534,17 +7435,17 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9" + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", - "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", + "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", "shasum": "" }, "require": { @@ -7553,7 +7454,7 @@ "suggest": { "symfony/translation-implementation": "" }, - "time": "2022-01-02T09:55:41+00:00", + "time": "2022-06-27T17:10:44+00:00", "type": "library", "extra": { "branch-alias": { @@ -7595,7 +7496,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" }, "funding": [ { @@ -7615,17 +7516,17 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.8", - "version_normalized": "5.4.8.0", + "version": "v5.4.39", + "version_normalized": "5.4.39.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053" + "reference": "1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cdcadd343d31ad16fc5e006b0de81ea307435053", - "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e", + "reference": "1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e", "shasum": "" }, "require": { @@ -7634,12 +7535,12 @@ "symfony/polyfill-php80": "^1.16" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", "symfony/console": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -7649,7 +7550,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2022-04-26T13:19:20+00:00", + "time": "2024-04-18T08:26:06+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -7687,7 +7588,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.8" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.39" }, "funding": [ { @@ -7707,17 +7608,17 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", - "version_normalized": "1.2.1.0", + "version": "1.2.3", + "version_normalized": "1.2.3.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -7726,7 +7627,7 @@ "ext-xmlwriter": "*", "php": "^7.2 || ^8.0" }, - "time": "2021-07-28T10:34:58+00:00", + "time": "2024-03-03T12:36:25+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7748,7 +7649,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -7760,29 +7661,29 @@ }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.4", - "version_normalized": "2.2.4.0", + "version": "v2.2.7", + "version_normalized": "2.2.7.0", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", + "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" }, - "time": "2021-12-08T09:12:39+00:00", + "time": "2023-12-08T13:03:43+00:00", "type": "library", "extra": { "branch-alias": { @@ -7810,23 +7711,23 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" }, "install-path": "../tijsverkoyen/css-to-inline-styles" }, { "name": "vlucas/phpdotenv", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", + "version": "v4.3.0", + "version_normalized": "4.3.0.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc" + "reference": "67a491df68208bef8c37092db11fa3885008efcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/77e974614d2ead521f18069dccc571696f52b8dc", - "reference": "77e974614d2ead521f18069dccc571696f52b8dc", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67a491df68208bef8c37092db11fa3885008efcf", + "reference": "67a491df68208bef8c37092db11fa3885008efcf", "shasum": "" }, "require": { @@ -7838,17 +7739,21 @@ "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" }, "suggest": { "ext-filter": "Required to use the boolean validator.", "ext-pcre": "Required to use most of the library." }, - "time": "2021-12-12T23:07:53+00:00", + "time": "2022-10-16T00:51:09+00:00", "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "installation-source": "dist", @@ -7881,7 +7786,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v4.2.2" + "source": "https://github.com/vlucas/phpdotenv/tree/v4.3.0" }, "funding": [ { @@ -7971,67 +7876,6 @@ } ], "install-path": "../voku/portable-ascii" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "version_normalized": "1.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "time": "2021-03-09T10:59:23+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "install-path": "../webmozart/assert" } ], "dev": true, @@ -8048,10 +7892,6 @@ "nunomaduro/collision", "phar-io/manifest", "phar-io/version", - "phpdocumentor/reflection-common", - "phpdocumentor/reflection-docblock", - "phpdocumentor/type-resolver", - "phpspec/prophecy", "phpunit/php-code-coverage", "phpunit/php-file-iterator", "phpunit/php-invoker", @@ -8074,7 +7914,6 @@ "sebastian/resource-operations", "sebastian/type", "sebastian/version", - "theseer/tokenizer", - "webmozart/assert" + "theseer/tokenizer" ] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 5aa7c332..1b9c20b7 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,22 +1,22 @@ array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => NULL, + 'reference' => 'a00255d76971520d7c9b167e3e22a7d15a49d9ac', 'name' => 'laravel/laravel', 'dev' => true, ), 'versions' => array( 'asm89/stack-cors' => array( - 'pretty_version' => 'v2.1.1', - 'version' => '2.1.1.0', + 'pretty_version' => 'v2.2.0', + 'version' => '2.2.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../asm89/stack-cors', 'aliases' => array(), - 'reference' => '73e5b88775c64ccc0b84fb60836b30dc9d92ac4a', + 'reference' => '50f57105bad3d97a43ec4a485eb57daf347eafea', 'dev_requirement' => false, ), 'automattic/woocommerce' => array( @@ -29,21 +29,30 @@ 'dev_requirement' => false, ), 'brick/math' => array( - 'pretty_version' => '0.9.3', - 'version' => '0.9.3.0', + 'pretty_version' => '0.11.0', + 'version' => '0.11.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../brick/math', 'aliases' => array(), - 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae', + 'reference' => '0ad82ce168c82ba30d1c01ec86116ab52f589478', + 'dev_requirement' => false, + ), + 'carbonphp/carbon-doctrine-types' => array( + 'pretty_version' => '2.1.0', + 'version' => '2.1.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types', + 'aliases' => array(), + 'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb', 'dev_requirement' => false, ), 'codexshaper/laravel-woocommerce' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', + 'pretty_version' => 'v3.0.4', + 'version' => '3.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../codexshaper/laravel-woocommerce', 'aliases' => array(), - 'reference' => '029741518cbe23ddd5dd780dc209300029538196', + 'reference' => '4b8865d937699ed386818f2188e23ee9926c8100', 'dev_requirement' => false, ), 'cordoval/hamcrest-php' => array( @@ -59,21 +68,21 @@ ), ), 'doctrine/inflector' => array( - 'pretty_version' => '2.0.4', - 'version' => '2.0.4.0', + 'pretty_version' => '2.0.10', + 'version' => '2.0.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), - 'reference' => '8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89', + 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'dev_requirement' => false, ), 'doctrine/instantiator' => array( - 'pretty_version' => '1.4.1', - 'version' => '1.4.1.0', + 'pretty_version' => '1.5.0', + 'version' => '1.5.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/instantiator', 'aliases' => array(), - 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc', + 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b', 'dev_requirement' => true, ), 'doctrine/lexer' => array( @@ -104,21 +113,21 @@ 'dev_requirement' => false, ), 'facade/flare-client-php' => array( - 'pretty_version' => '1.9.1', - 'version' => '1.9.1.0', + 'pretty_version' => '1.10.0', + 'version' => '1.10.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../facade/flare-client-php', 'aliases' => array(), - 'reference' => 'b2adf1512755637d0cef4f7d1b54301325ac78ed', + 'reference' => '213fa2c69e120bca4c51ba3e82ed1834ef3f41b8', 'dev_requirement' => true, ), 'facade/ignition' => array( - 'pretty_version' => '2.17.5', - 'version' => '2.17.5.0', + 'pretty_version' => '2.17.7', + 'version' => '2.17.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../facade/ignition', 'aliases' => array(), - 'reference' => '1d71996f83c9a5a7807331b8986ac890352b7a0c', + 'reference' => 'b4f5955825bb4b74cba0f94001761c46335c33e9', 'dev_requirement' => true, ), 'facade/ignition-contracts' => array( @@ -131,30 +140,30 @@ 'dev_requirement' => true, ), 'fakerphp/faker' => array( - 'pretty_version' => 'v1.19.0', - 'version' => '1.19.0.0', + 'pretty_version' => 'v1.23.1', + 'version' => '1.23.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../fakerphp/faker', 'aliases' => array(), - 'reference' => 'd7f08a622b3346766325488aa32ddc93ccdecc75', + 'reference' => 'bfb4fe148adbf78eff521199619b93a52ae3554b', 'dev_requirement' => true, ), 'fideloper/proxy' => array( - 'pretty_version' => '4.4.1', - 'version' => '4.4.1.0', + 'pretty_version' => '4.4.2', + 'version' => '4.4.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../fideloper/proxy', 'aliases' => array(), - 'reference' => 'c073b2bd04d1c90e04dc1b787662b558dd65ade0', + 'reference' => 'a751f2bc86dd8e6cfef12dc0cbdada82f5a18750', 'dev_requirement' => false, ), 'filp/whoops' => array( - 'pretty_version' => '2.14.5', - 'version' => '2.14.5.0', + 'pretty_version' => '2.15.4', + 'version' => '2.15.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../filp/whoops', 'aliases' => array(), - 'reference' => 'a63e5e8f26ebbebf8ed3c5c691637325512eb0dc', + 'reference' => 'a139776fa3f5985a50b509f2a02ff0f709d2a546', 'dev_requirement' => true, ), 'fruitcake/laravel-cors' => array( @@ -167,30 +176,30 @@ 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.4.2', - 'version' => '7.4.2.0', + 'pretty_version' => '7.8.1', + 'version' => '7.8.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), - 'reference' => 'ac1ec1cd9b5624694c3a40be801d94137afb12b4', + 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '1.5.1', - 'version' => '1.5.1.0', + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), - 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da', + 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '2.2.1', - 'version' => '2.2.1.0', + 'pretty_version' => '2.6.2', + 'version' => '2.6.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), - 'reference' => 'c94a94f120803a18554c1805ef2e539f8285f9a2', + 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221', 'dev_requirement' => false, ), 'hamcrest/hamcrest-php' => array( @@ -392,21 +401,21 @@ 'dev_requirement' => false, ), 'laravel/laravel' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => NULL, + 'reference' => 'a00255d76971520d7c9b167e3e22a7d15a49d9ac', 'dev_requirement' => false, ), 'laravel/tinker' => array( - 'pretty_version' => 'v2.7.2', - 'version' => '2.7.2.0', + 'pretty_version' => 'v2.9.0', + 'version' => '2.9.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/tinker', 'aliases' => array(), - 'reference' => 'dff39b661e827dae6e092412f976658df82dbac5', + 'reference' => '502e0fe3f0415d06d5db1f83a472f0f3b754bafe', 'dev_requirement' => false, ), 'league/commonmark' => array( @@ -419,66 +428,66 @@ 'dev_requirement' => false, ), 'league/flysystem' => array( - 'pretty_version' => '1.1.9', - 'version' => '1.1.9.0', + 'pretty_version' => '1.1.10', + 'version' => '1.1.10.0', 'type' => 'library', 'install_path' => __DIR__ . '/../league/flysystem', 'aliases' => array(), - 'reference' => '094defdb4a7001845300334e7c1ee2335925ef99', + 'reference' => '3239285c825c152bcc315fe0e87d6b55f5972ed1', 'dev_requirement' => false, ), 'league/mime-type-detection' => array( - 'pretty_version' => '1.11.0', - 'version' => '1.11.0.0', + 'pretty_version' => '1.15.0', + 'version' => '1.15.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../league/mime-type-detection', 'aliases' => array(), - 'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd', + 'reference' => 'ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301', 'dev_requirement' => false, ), 'mockery/mockery' => array( - 'pretty_version' => '1.5.0', - 'version' => '1.5.0.0', + 'pretty_version' => '1.6.12', + 'version' => '1.6.12.0', 'type' => 'library', 'install_path' => __DIR__ . '/../mockery/mockery', 'aliases' => array(), - 'reference' => 'c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac', + 'reference' => '1f4efdd7d3beafe9807b08156dfcb176d18f1699', 'dev_requirement' => true, ), 'monolog/monolog' => array( - 'pretty_version' => '2.5.0', - 'version' => '2.5.0.0', + 'pretty_version' => '2.9.3', + 'version' => '2.9.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../monolog/monolog', 'aliases' => array(), - 'reference' => '4192345e260f1d51b365536199744b987e160edc', + 'reference' => 'a30bfe2e142720dfa990d0a7e573997f5d884215', 'dev_requirement' => false, ), 'myclabs/deep-copy' => array( - 'pretty_version' => '1.11.0', - 'version' => '1.11.0.0', + 'pretty_version' => '1.11.1', + 'version' => '1.11.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/deep-copy', 'aliases' => array(), - 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614', + 'reference' => '7284c22080590fb39f2ffa3e9057f10a4ddd0e0c', 'dev_requirement' => true, ), 'nesbot/carbon' => array( - 'pretty_version' => '2.57.0', - 'version' => '2.57.0.0', + 'pretty_version' => '2.72.3', + 'version' => '2.72.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), - 'reference' => '4a54375c21eea4811dbd1149fe6b246517554e78', + 'reference' => '0c6fd108360c562f6e4fd1dedb8233b423e91c83', 'dev_requirement' => false, ), 'nikic/php-parser' => array( - 'pretty_version' => 'v4.13.2', - 'version' => '4.13.2.0', + 'pretty_version' => 'v5.0.2', + 'version' => '5.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), - 'reference' => '210577fe3cf7badcc5814d99455df46564f3c077', + 'reference' => '139676794dc1e9231bf7bcd123cfc0c99182cb13', 'dev_requirement' => false, ), 'nunomaduro/collision' => array( @@ -500,12 +509,12 @@ 'dev_requirement' => false, ), 'phar-io/manifest' => array( - 'pretty_version' => '2.0.3', - 'version' => '2.0.3.0', + 'pretty_version' => '2.0.4', + 'version' => '2.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phar-io/manifest', 'aliases' => array(), - 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53', + 'reference' => '54750ef60c58e43759730615a392c31c80e23176', 'dev_requirement' => true, ), 'phar-io/version' => array( @@ -517,58 +526,22 @@ 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74', 'dev_requirement' => true, ), - 'phpdocumentor/reflection-common' => array( - 'pretty_version' => '2.2.0', - 'version' => '2.2.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', - 'aliases' => array(), - 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', - 'dev_requirement' => true, - ), - 'phpdocumentor/reflection-docblock' => array( - 'pretty_version' => '5.3.0', - 'version' => '5.3.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', - 'aliases' => array(), - 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170', - 'dev_requirement' => true, - ), - 'phpdocumentor/type-resolver' => array( - 'pretty_version' => '1.6.1', - 'version' => '1.6.1.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', - 'aliases' => array(), - 'reference' => '77a32518733312af16a44300404e945338981de3', - 'dev_requirement' => true, - ), 'phpoption/phpoption' => array( - 'pretty_version' => '1.8.1', - 'version' => '1.8.1.0', + 'pretty_version' => '1.9.2', + 'version' => '1.9.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpoption/phpoption', 'aliases' => array(), - 'reference' => 'eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15', + 'reference' => '80735db690fe4fc5c76dfa7f9b770634285fa820', 'dev_requirement' => false, ), - 'phpspec/prophecy' => array( - 'pretty_version' => 'v1.15.0', - 'version' => '1.15.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpspec/prophecy', - 'aliases' => array(), - 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13', - 'dev_requirement' => true, - ), 'phpunit/php-code-coverage' => array( - 'pretty_version' => '9.2.15', - 'version' => '9.2.15.0', + 'pretty_version' => '9.2.31', + 'version' => '9.2.31.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', 'aliases' => array(), - 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f', + 'reference' => '48c34b5d8d983006bd2adc2d0de92963b9155965', 'dev_requirement' => true, ), 'phpunit/php-file-iterator' => array( @@ -608,14 +581,29 @@ 'dev_requirement' => true, ), 'phpunit/phpunit' => array( - 'pretty_version' => '9.5.20', - 'version' => '9.5.20.0', + 'pretty_version' => '9.6.19', + 'version' => '9.6.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/phpunit', 'aliases' => array(), - 'reference' => '12bc8879fb65aef2138b26fc633cb1e3620cffba', + 'reference' => 'a1a54a473501ef4cdeaae4e06891674114d79db8', 'dev_requirement' => true, ), + 'psr/clock' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../psr/clock', + 'aliases' => array(), + 'reference' => 'e41a24703d4560fd0acb709162f73b8adfc3aa0d', + 'dev_requirement' => false, + ), + 'psr/clock-implementation' => array( + 'dev_requirement' => false, + 'provided' => array( + 0 => '1.0', + ), + ), 'psr/container' => array( 'pretty_version' => '1.1.2', 'version' => '1.1.2.0', @@ -647,12 +635,12 @@ ), ), 'psr/http-client' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', + 'pretty_version' => '1.0.3', + 'version' => '1.0.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), - 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', + 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'dev_requirement' => false, ), 'psr/http-client-implementation' => array( @@ -662,12 +650,12 @@ ), ), 'psr/http-factory' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', + 'pretty_version' => '1.1.0', + 'version' => '1.1.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), - 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be', + 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'dev_requirement' => false, ), 'psr/http-factory-implementation' => array( @@ -677,12 +665,12 @@ ), ), 'psr/http-message' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', + 'pretty_version' => '2.0', + 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', + 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'dev_requirement' => false, ), 'psr/http-message-implementation' => array( @@ -703,8 +691,8 @@ 'psr/log-implementation' => array( 'dev_requirement' => false, 'provided' => array( - 0 => '1.0.0 || 2.0.0 || 3.0.0', - 1 => '1.0|2.0', + 0 => '1.0|2.0', + 1 => '1.0.0 || 2.0.0 || 3.0.0', ), ), 'psr/simple-cache' => array( @@ -717,12 +705,12 @@ 'dev_requirement' => false, ), 'psy/psysh' => array( - 'pretty_version' => 'v0.11.2', - 'version' => '0.11.2.0', + 'pretty_version' => 'v0.12.3', + 'version' => '0.12.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psy/psysh', 'aliases' => array(), - 'reference' => '7f7da640d68b9c9fec819caae7c744a213df6514', + 'reference' => 'b6b6cce7d3ee8fbf31843edce5e8f5a72eff4a73', 'dev_requirement' => false, ), 'ralouphie/getallheaders' => array( @@ -735,36 +723,36 @@ 'dev_requirement' => false, ), 'ramsey/collection' => array( - 'pretty_version' => '1.2.2', - 'version' => '1.2.2.0', + 'pretty_version' => '1.3.0', + 'version' => '1.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/collection', 'aliases' => array(), - 'reference' => 'cccc74ee5e328031b15640b51056ee8d3bb66c0a', + 'reference' => 'ad7475d1c9e70b190ecffc58f2d989416af339b4', 'dev_requirement' => false, ), 'ramsey/uuid' => array( - 'pretty_version' => '4.3.1', - 'version' => '4.3.1.0', + 'pretty_version' => '4.7.6', + 'version' => '4.7.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/uuid', 'aliases' => array(), - 'reference' => '8505afd4fea63b81a85d3b7b53ac3cb8dc347c28', + 'reference' => '91039bc1faa45ba123c4328958e620d382ec7088', 'dev_requirement' => false, ), 'rhumsaa/uuid' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '4.3.1', + 0 => '4.7.6', ), ), 'sebastian/cli-parser' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', + 'pretty_version' => '1.0.2', + 'version' => '1.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/cli-parser', 'aliases' => array(), - 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2', + 'reference' => '2b56bea83a09de3ac06bb18b92f068e60cc6f50b', 'dev_requirement' => true, ), 'sebastian/code-unit' => array( @@ -786,66 +774,66 @@ 'dev_requirement' => true, ), 'sebastian/comparator' => array( - 'pretty_version' => '4.0.6', - 'version' => '4.0.6.0', + 'pretty_version' => '4.0.8', + 'version' => '4.0.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/comparator', 'aliases' => array(), - 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382', + 'reference' => 'fa0f136dd2334583309d32b62544682ee972b51a', 'dev_requirement' => true, ), 'sebastian/complexity' => array( - 'pretty_version' => '2.0.2', - 'version' => '2.0.2.0', + 'pretty_version' => '2.0.3', + 'version' => '2.0.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/complexity', 'aliases' => array(), - 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88', + 'reference' => '25f207c40d62b8b7aa32f5ab026c53561964053a', 'dev_requirement' => true, ), 'sebastian/diff' => array( - 'pretty_version' => '4.0.4', - 'version' => '4.0.4.0', + 'pretty_version' => '4.0.6', + 'version' => '4.0.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), - 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', + 'reference' => 'ba01945089c3a293b01ba9badc29ad55b106b0bc', 'dev_requirement' => true, ), 'sebastian/environment' => array( - 'pretty_version' => '5.1.4', - 'version' => '5.1.4.0', + 'pretty_version' => '5.1.5', + 'version' => '5.1.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/environment', 'aliases' => array(), - 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7', + 'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed', 'dev_requirement' => true, ), 'sebastian/exporter' => array( - 'pretty_version' => '4.0.4', - 'version' => '4.0.4.0', + 'pretty_version' => '4.0.6', + 'version' => '4.0.6.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/exporter', 'aliases' => array(), - 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9', + 'reference' => '78c00df8f170e02473b682df15bfcdacc3d32d72', 'dev_requirement' => true, ), 'sebastian/global-state' => array( - 'pretty_version' => '5.0.5', - 'version' => '5.0.5.0', + 'pretty_version' => '5.0.7', + 'version' => '5.0.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/global-state', 'aliases' => array(), - 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2', + 'reference' => 'bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9', 'dev_requirement' => true, ), 'sebastian/lines-of-code' => array( - 'pretty_version' => '1.0.3', - 'version' => '1.0.3.0', + 'pretty_version' => '1.0.4', + 'version' => '1.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/lines-of-code', 'aliases' => array(), - 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc', + 'reference' => 'e1e4a170560925c26d424b6a03aed157e7dcc5c5', 'dev_requirement' => true, ), 'sebastian/object-enumerator' => array( @@ -867,30 +855,30 @@ 'dev_requirement' => true, ), 'sebastian/recursion-context' => array( - 'pretty_version' => '4.0.4', - 'version' => '4.0.4.0', + 'pretty_version' => '4.0.5', + 'version' => '4.0.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/recursion-context', 'aliases' => array(), - 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172', + 'reference' => 'e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1', 'dev_requirement' => true, ), 'sebastian/resource-operations' => array( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', + 'pretty_version' => '3.0.4', + 'version' => '3.0.4.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/resource-operations', 'aliases' => array(), - 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8', + 'reference' => '05d5692a7993ecccd56a03e40cd7e5b09b1d404e', 'dev_requirement' => true, ), 'sebastian/type' => array( - 'pretty_version' => '3.0.0', - 'version' => '3.0.0.0', + 'pretty_version' => '3.2.1', + 'version' => '3.2.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/type', 'aliases' => array(), - 'reference' => 'b233b84bc4465aff7b57cf1c4bc75c86d00d6dad', + 'reference' => '75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7', 'dev_requirement' => true, ), 'sebastian/version' => array( @@ -939,26 +927,26 @@ 'dev_requirement' => false, ), 'symfony/console' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), - 'reference' => 'ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b', + 'reference' => 'f3e591c48688a0cfa1a3296205926c05e84b22b1', 'dev_requirement' => false, ), 'symfony/css-selector' => array( - 'pretty_version' => 'v6.0.3', - 'version' => '6.0.3.0', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), - 'reference' => '1955d595c12c111629cc814d3f2a2ff13580508a', + 'reference' => 'f1d00bddb83a4cb2138564b2150001cb6ce272b1', 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), @@ -966,26 +954,26 @@ 'dev_requirement' => false, ), 'symfony/error-handler' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/error-handler', 'aliases' => array(), - 'reference' => 'c1fcde614dfe99d62a83b796a53b8bad358b266a', + 'reference' => '9e02a6e831d6c2dbc5f96c8ff5314d453ecd53cd', 'dev_requirement' => false, ), 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v6.0.3', - 'version' => '6.0.3.0', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), - 'reference' => '6472ea2dd415e925b90ca82be64b8bc6157f3934', + 'reference' => '2eaf8e63bc5b8cefabd4a800157f0d0c094f677a', 'dev_requirement' => false, ), 'symfony/event-dispatcher-contracts' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'aliases' => array(), @@ -999,183 +987,183 @@ ), ), 'symfony/finder' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), - 'reference' => '9b630f3427f3ebe7cd346c277a1408b00249dad9', + 'reference' => 'f6a96e4fcd468a25fede16ee665f50ced856bd0a', 'dev_requirement' => false, ), 'symfony/http-foundation' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), - 'reference' => 'ff2818d1c3d49860bcae1f2cbb5eb00fcd3bf9e2', + 'reference' => '3356c93efc30b0c85a37606bdfef16b813faec0e', 'dev_requirement' => false, ), 'symfony/http-kernel' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), - 'reference' => 'cf7e61106abfc19b305ca0aedc41724ced89a02a', + 'reference' => '1d812dc3a2863cc4246aaa636b0d71e0bf68e6b0', 'dev_requirement' => false, ), 'symfony/mime' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/mime', 'aliases' => array(), - 'reference' => 'af49bc163ec3272f677bde3bc44c0d766c1fd662', + 'reference' => 'a5364f016fd9e090f7b4f250a97ea6925a5ca985', 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), - 'reference' => '30885182c981ab175d4d034db0f6f469898070ab', + 'reference' => 'ef4d7e442ca910c4764bce785146269b30cb5fc4', 'dev_requirement' => false, ), 'symfony/polyfill-iconv' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-iconv', 'aliases' => array(), - 'reference' => 'f1aed619e28cb077fc83fac8c4c0383578356e40', + 'reference' => 'cd4226d140ecd3d0f13d32ed0a4a095ffe871d2f', 'dev_requirement' => false, ), 'symfony/polyfill-intl-grapheme' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), - 'reference' => '81b86b50cf841a64252b439e738e97f4a34e2783', + 'reference' => '32a9da87d7b3245e09ac426c83d334ae9f06f80f', 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), - 'reference' => '749045c69efb97c70d25d7463abba812e91f3a44', + 'reference' => 'a287ed7475f85bf6f61890146edbc932c0fff919', 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), - 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', + 'reference' => 'bc45c394692b948b4d383a08d7753968bed9a83d', 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), - 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', + 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec', 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), - 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', + 'reference' => '861391a8da9a04cbad2d232ddd9e4893220d6e25', 'dev_requirement' => false, ), 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), - 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5', + 'reference' => '21bd091060673a1177ae842c0ef8fe30893114d2', 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), - 'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c', + 'reference' => '87b68208d5c1188808dd7839ee1e6c8ec3b02f1b', 'dev_requirement' => false, ), 'symfony/polyfill-php81' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', + 'pretty_version' => 'v1.29.0', + 'version' => '1.29.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), - 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f', + 'reference' => 'c565ad1e63f30e7477fc40738343c62b40bc672d', 'dev_requirement' => false, ), 'symfony/process' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), - 'reference' => '597f3fff8e3e91836bb0bd38f5718b56ddbde2f3', + 'reference' => '85a554acd7c28522241faf2e97b9541247a0d3d5', 'dev_requirement' => false, ), 'symfony/routing' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/routing', 'aliases' => array(), - 'reference' => 'e07817bb6244ea33ef5ad31abc4a9288bef3f2f7', + 'reference' => '5485974ef20de1150dd195a81e9da4915d45263f', 'dev_requirement' => false, ), 'symfony/service-contracts' => array( - 'pretty_version' => 'v2.5.1', - 'version' => '2.5.1.0', + 'pretty_version' => 'v2.5.3', + 'version' => '2.5.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), - 'reference' => '24d9dc654b83e91aa59f9d167b131bc3b5bea24c', + 'reference' => 'a2329596ddc8fd568900e3fc76cba42489ecc7f3', 'dev_requirement' => false, ), 'symfony/string' => array( - 'pretty_version' => 'v6.0.8', - 'version' => '6.0.8.0', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), - 'reference' => 'ac0aa5c2282e0de624c175b68d13f2c8f2e2649d', + 'reference' => 'd9e72497367c23e08bf94176d2be45b00a9d232a', 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v6.0.8', - 'version' => '6.0.8.0', + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), - 'reference' => '3d38cf8f8834148c4457681d539bc204de701501', + 'reference' => '9c24b3fdbbe9fb2ef3a6afd8bbaadfd72dad681f', 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', + 'pretty_version' => 'v3.0.2', + 'version' => '3.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), - 'reference' => 'c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9', + 'reference' => 'acbfbb274e730e5a0236f619b6168d9dedb3e282', 'dev_requirement' => false, ), 'symfony/translation-implementation' => array( @@ -1185,39 +1173,39 @@ ), ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v5.4.8', - 'version' => '5.4.8.0', + 'pretty_version' => 'v5.4.39', + 'version' => '5.4.39.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), - 'reference' => 'cdcadd343d31ad16fc5e006b0de81ea307435053', + 'reference' => '1987f86ad7f339fe3d3e8e6cf3b7ce4d4b8e547e', 'dev_requirement' => false, ), 'theseer/tokenizer' => array( - 'pretty_version' => '1.2.1', - 'version' => '1.2.1.0', + 'pretty_version' => '1.2.3', + 'version' => '1.2.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../theseer/tokenizer', 'aliases' => array(), - 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e', + 'reference' => '737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2', 'dev_requirement' => true, ), 'tijsverkoyen/css-to-inline-styles' => array( - 'pretty_version' => '2.2.4', - 'version' => '2.2.4.0', + 'pretty_version' => 'v2.2.7', + 'version' => '2.2.7.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tijsverkoyen/css-to-inline-styles', 'aliases' => array(), - 'reference' => 'da444caae6aca7a19c0c140f68c6182e337d5b1c', + 'reference' => '83ee6f38df0a63106a9e4536e3060458b74ccedb', 'dev_requirement' => false, ), 'vlucas/phpdotenv' => array( - 'pretty_version' => 'v4.2.2', - 'version' => '4.2.2.0', + 'pretty_version' => 'v4.3.0', + 'version' => '4.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../vlucas/phpdotenv', 'aliases' => array(), - 'reference' => '77e974614d2ead521f18069dccc571696f52b8dc', + 'reference' => '67a491df68208bef8c37092db11fa3885008efcf', 'dev_requirement' => false, ), 'voku/portable-ascii' => array( @@ -1229,14 +1217,5 @@ 'reference' => '87337c91b9dfacee02452244ee14ab3c43bc485a', 'dev_requirement' => false, ), - 'webmozart/assert' => array( - 'pretty_version' => '1.10.0', - 'version' => '1.10.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../webmozart/assert', - 'aliases' => array(), - 'reference' => '6964c76c7804814a842473e0c8fd15bab0f18e25', - 'dev_requirement' => true, - ), ), ); diff --git a/vendor/doctrine/inflector/composer.json b/vendor/doctrine/inflector/composer.json index f08fdc3b..91d77071 100644 --- a/vendor/doctrine/inflector/composer.json +++ b/vendor/doctrine/inflector/composer.json @@ -16,12 +16,12 @@ "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" }, "autoload": { "psr-4": { @@ -32,5 +32,10 @@ "psr-4": { "Doctrine\\Tests\\Inflector\\": "tests/Doctrine/Tests/Inflector" } + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php index 8f0919fc..8bf02a29 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php @@ -11,9 +11,7 @@ use Doctrine\Inflector\Rules\Word; class Inflectible { - /** - * @return Transformation[] - */ + /** @return Transformation[] */ public static function getSingular(): iterable { yield new Transformation(new Pattern('(s)tatuses$'), '\1\2tatus'); @@ -49,19 +47,19 @@ class Inflectible yield new Transformation(new Pattern('(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$'), '\1\2sis'); yield new Transformation(new Pattern('(tax)a$'), '\1on'); yield new Transformation(new Pattern('(c)riteria$'), '\1riterion'); - yield new Transformation(new Pattern('([ti])a$'), '\1um'); + yield new Transformation(new Pattern('([ti])a(? - - - - - - - - diff --git a/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md index 4bc02b65..1fa95679 100644 --- a/vendor/doctrine/instantiator/README.md +++ b/vendor/doctrine/instantiator/README.md @@ -14,7 +14,7 @@ This library provides a way of avoiding usage of constructors when instantiating The suggested installation method is via [composer](https://getcomposer.org/): ```sh -php composer.phar require "doctrine/instantiator:~1.0.3" +composer require doctrine/instantiator ``` ## Usage diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json index 4fba95ca..fab81720 100644 --- a/vendor/doctrine/instantiator/composer.json +++ b/vendor/doctrine/instantiator/composer.json @@ -21,12 +21,12 @@ "require-dev": { "ext-phar": "*", "ext-pdo": "*", - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "autoload": { "psr-4": { diff --git a/vendor/doctrine/instantiator/psalm.xml b/vendor/doctrine/instantiator/psalm.xml index e6270c13..e9b622b3 100644 --- a/vendor/doctrine/instantiator/psalm.xml +++ b/vendor/doctrine/instantiator/psalm.xml @@ -1,7 +1,7 @@ filterExceptionsCallable = $filterExceptionsCallable; } + public function filterReportsUsing(callable $filterReportsCallable) + { + $this->filterReportsCallable = $filterReportsCallable; + } + /** * @return null|string */ @@ -242,6 +250,12 @@ class Flare private function sendReportToApi(Report $report) { + if ($this->filterReportsCallable) { + if (! call_user_func($this->filterReportsCallable, $report)) { + return; + } + } + try { $this->api->report($report); } catch (Exception $exception) { diff --git a/vendor/facade/flare-client-php/src/Report.php b/vendor/facade/flare-client-php/src/Report.php index 44c931a3..e1dae0a8 100644 --- a/vendor/facade/flare-client-php/src/Report.php +++ b/vendor/facade/flare-client-php/src/Report.php @@ -322,7 +322,6 @@ class Report { // Generate 16 bytes (128 bits) of random data or use the data passed into the function. $data = $data ?? random_bytes(16); - assert(strlen($data) == 16); // Set version to 0100 $data[6] = chr(ord($data[6]) & 0x0f | 0x40); diff --git a/vendor/facade/ignition/CHANGELOG.md b/vendor/facade/ignition/CHANGELOG.md index c9104db5..08fd7ac7 100644 --- a/vendor/facade/ignition/CHANGELOG.md +++ b/vendor/facade/ignition/CHANGELOG.md @@ -2,6 +2,34 @@ All notable changes to `ignition` will be documented in this file +## 2.17.6 - 2022-06-30 + +### What's Changed + +- notice if dots have been used in the view name by @WebPajooh in https://github.com/facade/ignition/pull/457 + +### New Contributors + +- @WebPajooh made their first contribution in https://github.com/facade/ignition/pull/457 + +**Full Changelog**: https://github.com/facade/ignition/compare/2.17.5...2.17.6 + +## 2.17.5 - 2022-02-23 + +## What's Changed + +- fix solutions section padding by @faissaloux in https://github.com/facade/ignition/pull/433 +- Bump markdown-it from 9.1.0 to 12.3.2 by @dependabot in https://github.com/facade/ignition/pull/446 +- Bump ajv from 6.10.2 to 6.12.6 by @dependabot in https://github.com/facade/ignition/pull/448 +- Fix E_NOTICE when requesting invalid script by @cweiske in https://github.com/facade/ignition/pull/449 + +## New Contributors + +- @faissaloux made their first contribution in https://github.com/facade/ignition/pull/433 +- @cweiske made their first contribution in https://github.com/facade/ignition/pull/449 + +**Full Changelog**: https://github.com/facade/ignition/compare/2.17.4...2.17.5 + ## 2.17.4 - 2021-12-27 - fix bug where uninitialized property within a job could break Ignition diff --git a/vendor/facade/ignition/src/Http/Controllers/ScriptController.php b/vendor/facade/ignition/src/Http/Controllers/ScriptController.php index aced6ce9..9860f45e 100644 --- a/vendor/facade/ignition/src/Http/Controllers/ScriptController.php +++ b/vendor/facade/ignition/src/Http/Controllers/ScriptController.php @@ -9,9 +9,10 @@ class ScriptController { public function __invoke(Request $request) { - if (!isset(Ignition::scripts()[$request->script])) { + if (! isset(Ignition::scripts()[$request->script])) { abort(404, 'Script not found'); } + return response( file_get_contents( Ignition::scripts()[$request->script] diff --git a/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php b/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php index 5e91aa63..a46b2016 100644 --- a/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php +++ b/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php @@ -49,7 +49,7 @@ class MergeConflictSolutionProvider implements HasSolutionsForThrowable protected function getCurrentBranch(string $directory): string { - $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \\* | cut -d ' ' -f2"))."'"; + $branch = "'".trim(shell_exec("cd {$directory}; git branch | grep \\* | cut -d ' ' -f2"))."'"; if ($branch === "''") { $branch = 'current branch'; diff --git a/vendor/facade/ignition/src/SolutionProviders/ViewNotFoundSolutionProvider.php b/vendor/facade/ignition/src/SolutionProviders/ViewNotFoundSolutionProvider.php index 54d087ad..cd24e855 100644 --- a/vendor/facade/ignition/src/SolutionProviders/ViewNotFoundSolutionProvider.php +++ b/vendor/facade/ignition/src/SolutionProviders/ViewNotFoundSolutionProvider.php @@ -34,6 +34,13 @@ class ViewNotFoundSolutionProvider implements HasSolutionsForThrowable $suggestedView = $this->findRelatedView($missingView); + if ($suggestedView == $missingView) { + return [ + BaseSolution::create("{$missingView} was not found.") + ->setSolutionDescription('View names should not contain the . character!'), + ]; + } + if ($suggestedView) { return [ BaseSolution::create("{$missingView} was not found.") diff --git a/vendor/fakerphp/faker/CHANGELOG.md b/vendor/fakerphp/faker/CHANGELOG.md index b30fa41b..d7f8396d 100644 --- a/vendor/fakerphp/faker/CHANGELOG.md +++ b/vendor/fakerphp/faker/CHANGELOG.md @@ -1,6 +1,42 @@ # CHANGELOG -## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.19.0...main) +## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.1...1.23) + +## [2023-09-29, v1.23.1](https://github.com/FakerPHP/Faker/compare/v1.23.0..v1.23.1) + +- Fixed double `а` female lastName in `ru_RU/Person::name()` (#832) +- Fixed polish license plates (#685) +- Stopped using `static` in callables in `Provider\pt_BR\PhoneNumber` (#785) +- Fixed incorrect female name (#794) +- Stopped using the deprecated `MT_RAND_PHP` constant to seed the random generator on PHP 8.3 (#844) + +## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0) + +- Update `randomElements` to return random number of elements when no count is provided (#658) + +## [2023-05-14, v1.22.0](https://github.com/FakerPHP/Faker/compare/v1.21.0..v1.22.0) + +- Fixed `randomElements()` to accept empty iterator (#605) +- Added support for passing an `Enum` to `randomElement()` and `randomElements()` (#620) +- Started rejecting invalid arguments passed to `randomElement()` and `randomElements()` (#642) + +## [2022-12-13, v1.21.0](https://github.com/FakerPHP/Faker/compare/v1.20.0..v1.21.0) + +- Dropped support for PHP 7.1, 7.2, and 7.3 (#543) +- Added support for PHP 8.2 (#528) + +## [2022-07-20, v1.20.0](https://github.com/FakerPHP/Faker/compare/v1.19.0..v1.20.0) + +- Fixed typo in French phone number (#452) +- Fixed some Hungarian naming bugs (#451) +- Fixed bug where the NL-BE VAT generation was incorrect (#455) +- Improve Turkish phone numbers for E164 and added landline support (#460) +- Add Microsoft Edge User Agent (#464) +- Added option to set image formats on Faker\Provider\Image (#473) +- Added support for French color translations (#466) +- Support filtering timezones by country code (#480) +- Fixed typo in some greek names (#490) +- Marked the Faker\Provider\Image as deprecated ## [2022-02-02, v1.19.0](https://github.com/FakerPHP/Faker/compare/v1.18.0..v1.19.0) @@ -13,7 +49,7 @@ - Fix is_IS Address docbock type (#438) - Fix regexify escape backslash in character class (#434) - Removed UUID from Generator to be able to extend it (#441) -- + ## [2022-01-23, v1.18.0](https://github.com/FakerPHP/Faker/compare/v1.17.0..v1.18.0) - Deprecated UUID, use uuid3 to specify version (#427) diff --git a/vendor/fakerphp/faker/README.md b/vendor/fakerphp/faker/README.md index 018c70bb..2c6a2684 100644 --- a/vendor/fakerphp/faker/README.md +++ b/vendor/fakerphp/faker/README.md @@ -15,7 +15,7 @@ It's heavily inspired by Perl's [Data::Faker](https://metacpan.org/pod/Data::Fak ### Installation -Faker requires PHP >= 7.1. +Faker requires PHP >= 7.4. ```shell composer require fakerphp/faker @@ -57,6 +57,44 @@ for ($i = 0; $i < 3; $i++) { // 'Orlo Bergstrom' ``` +## Automated refactoring + +If you already used this library with its properties, they are now deprecated and needs to be replaced by their equivalent methods. + +You can use the provided [Rector](https://github.com/rectorphp/rector) config file to automate the work. + +Run + +```bash +composer require --dev rector/rector +``` + +to install `rector/rector`. + +Run + +```bash +vendor/bin/rector process src/ --config vendor/fakerphp/faker/rector-migrate.php +``` + +to run `rector/rector`. + +*Note:* do not forget to replace `src/` with the path to your source directory. + +Alternatively, import the configuration in your `rector.php` file: + +```php +import('vendor/fakerphp/faker/rector-migrate.php'); +}; +``` + ## License Faker is released under the MIT License. See [`LICENSE`](LICENSE) for details. diff --git a/vendor/fakerphp/faker/composer.json b/vendor/fakerphp/faker/composer.json index 2eda697d..88724f2a 100644 --- a/vendor/fakerphp/faker/composer.json +++ b/vendor/fakerphp/faker/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -22,7 +22,8 @@ "ext-intl": "*", "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "autoload": { "psr-4": { @@ -51,10 +52,5 @@ "composer/package-versions-deprecated": true }, "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-main": "v1.19-dev" - } } } diff --git a/vendor/fakerphp/faker/psalm.baseline.xml b/vendor/fakerphp/faker/psalm.baseline.xml deleted file mode 100644 index 7d5b2683..00000000 --- a/vendor/fakerphp/faker/psalm.baseline.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - 0 - - - string - - - - - $this->uniqueGenerator - new ChanceGenerator($this, $weight, $default) - new ValidGenerator($this, $validator, $maxRetries) - - - self - self - self - - - - - TableRegistry - - - - - $this->class - \Doctrine\ODM\MongoDB\Mapping\ClassMetadata - \Doctrine\ODM\MongoDB\Mapping\ClassMetadata - \Doctrine\ODM\MongoDB\Mapping\ClassMetadata - \Doctrine\ORM\Mapping\ClassMetadata - \Doctrine\ORM\Mapping\ClassMetadata - - - createQueryBuilder - getAssociationMappings - newInstance - - - - - Mandango - Mandango - - - - - $this->mandango - Mandango - - - - - \ColumnMap - - - - - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - \ColumnMap - - - - - \Propel - - - PropelPDO - - - - - ColumnMap - - - - - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - $columnMap - ColumnMap - - - - - Propel - - - PropelPDO - - - - - $this->mapper - - - string - - - $relation - $relation - BelongsTo - Locator - Mapper - - - $locator - $this->mapper - $this->mapper - $this->mapper - $this->mapper - $this->mapper - Locator - Mapper - - - - - $this->locator - Locator - - - Locator - - - - - Closure - - - - - false - - - - - $imei - - - int - - - - - static::$cityPrefix - - - - - static::birthNumber(static::GENDER_FEMALE) - static::birthNumber(static::GENDER_MALE) - - - - - $checksumArr[$checksum % 11] - - - - - $ref[$i] - - - - - static::split($text) - - - - - DateTime - - - - - static::lastName() - static::lastName() - - - diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php b/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php index 9c3daf17..fbf11fcd 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php @@ -17,11 +17,9 @@ class Ean * * @see https://en.wikipedia.org/wiki/International_Article_Number * - * @param string $digits - * * @return int */ - public static function checksum($digits) + public static function checksum(string $digits) { $sequence = (strlen($digits) + 1) === 8 ? [3, 1] : [1, 3]; $sums = 0; @@ -41,7 +39,7 @@ class Ean * * @return bool */ - public static function isValid($ean) + public static function isValid(string $ean) { if (!preg_match(self::PATTERN, $ean)) { return false; diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php b/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php index c8fae242..19068fd7 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php @@ -7,17 +7,21 @@ class Iban /** * Generates IBAN Checksum * - * @param string $iban - * * @return string Checksum (numeric string) */ - public static function checksum($iban) + public static function checksum(string $iban) { // Move first four digits to end and set checksum to '00' $checkString = substr($iban, 4) . substr($iban, 0, 2) . '00'; // Replace all letters with their number equivalents - $checkString = preg_replace_callback('/[A-Z]/', ['self', 'alphaToNumberCallback'], $checkString); + $checkString = preg_replace_callback( + '/[A-Z]/', + static function (array $matches): string { + return (string) self::alphaToNumber($matches[0]); + }, + $checkString, + ); // Perform mod 97 and subtract from 98 $checksum = 98 - self::mod97($checkString); @@ -25,24 +29,12 @@ class Iban return str_pad($checksum, 2, '0', STR_PAD_LEFT); } - /** - * @param string $match - * - * @return int - */ - private static function alphaToNumberCallback($match) - { - return self::alphaToNumber($match[0]); - } - /** * Converts letter to number * - * @param string $char - * * @return int */ - public static function alphaToNumber($char) + public static function alphaToNumber(string $char) { return ord($char) - 55; } @@ -54,7 +46,7 @@ class Iban * * @return int */ - public static function mod97($number) + public static function mod97(string $number) { $checksum = (int) $number[0]; @@ -68,11 +60,9 @@ class Iban /** * Checks whether an IBAN has a valid checksum * - * @param string $iban - * * @return bool */ - public static function isValid($iban) + public static function isValid(string $iban) { return self::checksum($iban) === substr($iban, 2, 2); } diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Isbn.php b/vendor/fakerphp/faker/src/Faker/Calculator/Isbn.php index 72a5c4ed..df2f59d7 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Isbn.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Isbn.php @@ -34,9 +34,9 @@ class Isbn $digits = str_split($input); array_walk( $digits, - static function (&$digit, $position) { + static function (&$digit, $position): void { $digit = (10 - $position) * $digit; - } + }, ); $result = (11 - array_sum($digits) % 11) % 11; diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php b/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php index 3a048fb0..4c1e6f50 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php @@ -13,11 +13,9 @@ namespace Faker\Calculator; class Luhn { /** - * @param string $number - * * @return int */ - private static function checksum($number) + private static function checksum(string $number) { $number = (string) $number; $length = strlen($number); @@ -35,16 +33,14 @@ class Luhn } /** - * @param string $partialNumber - * * @return string */ - public static function computeCheckDigit($partialNumber) + public static function computeCheckDigit(string $partialNumber) { $checkDigit = self::checksum($partialNumber . '0'); if ($checkDigit === 0) { - return 0; + return '0'; } return (string) (10 - $checkDigit); @@ -53,11 +49,9 @@ class Luhn /** * Checks whether a number (partial number + check digit) is Luhn compliant * - * @param string $number - * * @return bool */ - public static function isValid($number) + public static function isValid(string $number) { return self::checksum($number) === 0; } @@ -65,11 +59,9 @@ class Luhn /** * Generate a Luhn compliant number. * - * @param string $partialValue - * * @return string */ - public static function generateLuhnNumber($partialValue) + public static function generateLuhnNumber(string $partialValue) { if (!preg_match('/^\d+$/', $partialValue)) { throw new \InvalidArgumentException('Argument should be an integer.'); diff --git a/vendor/fakerphp/faker/src/Faker/Core/Barcode.php b/vendor/fakerphp/faker/src/Faker/Core/Barcode.php index 89f801a5..a85420be 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Barcode.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Barcode.php @@ -12,6 +12,13 @@ use Faker\Extension; */ final class Barcode implements Extension\BarcodeExtension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + private function ean(int $length = 13): string { $code = Extension\Helper::numerify(str_repeat('#', $length - 1)); @@ -38,7 +45,7 @@ final class Barcode implements Extension\BarcodeExtension public function isbn13(): string { - $code = '97' . mt_rand(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); + $code = '97' . $this->numberExtension->numberBetween(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); return sprintf('%s%s', $code, Calculator\Ean::checksum($code)); } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Blood.php b/vendor/fakerphp/faker/src/Faker/Core/Blood.php index 48a67ff6..03e563fc 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Blood.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Blood.php @@ -14,12 +14,12 @@ final class Blood implements Extension\BloodExtension /** * @var string[] */ - private $bloodTypes = ['A', 'AB', 'B', 'O']; + private array $bloodTypes = ['A', 'AB', 'B', 'O']; /** * @var string[] */ - private $bloodRhFactors = ['+', '-']; + private array $bloodRhFactors = ['+', '-']; public function bloodType(): string { @@ -36,7 +36,7 @@ final class Blood implements Extension\BloodExtension return sprintf( '%s%s', $this->bloodType(), - $this->bloodRh() + $this->bloodRh(), ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Color.php b/vendor/fakerphp/faker/src/Faker/Core/Color.php index d4d5d268..bd948190 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Color.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Color.php @@ -12,19 +12,20 @@ use Faker\Extension\Helper; */ final class Color implements Extension\ColorExtension { - /** - * @var string[] - */ - private $safeColorNames = [ - 'black', 'maroon', 'green', 'navy', 'olive', - 'purple', 'teal', 'lime', 'blue', 'silver', - 'gray', 'yellow', 'fuchsia', 'aqua', 'white', - ]; + private Extension\NumberExtension $numberExtension; /** * @var string[] */ - private $allColorNames = [ + private array $safeColorNames = [ + 'black', 'maroon', 'green', 'navy', 'olive', + 'purple', 'teal', 'lime', 'blue', 'silver', + 'gray', 'yellow', 'fuchsia', 'aqua', 'white', + ]; + /** + * @var string[] + */ + private array $allColorNames = [ 'AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque', 'Black', 'BlanchedAlmond', 'Blue', 'BlueViolet', 'Brown', 'BurlyWood', 'CadetBlue', @@ -53,14 +54,17 @@ final class Color implements Extension\ColorExtension 'Turquoise', 'Violet', 'Wheat', 'White', 'WhiteSmoke', 'Yellow', 'YellowGreen', ]; + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '#fa3cc2' */ public function hexColor(): string { - $number = new Number(); - - return '#' . str_pad(dechex($number->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); + return '#' . str_pad(dechex($this->numberExtension->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); } /** @@ -68,8 +72,7 @@ final class Color implements Extension\ColorExtension */ public function safeHexColor(): string { - $number = new Number(); - $color = str_pad(dechex($number->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); + $color = str_pad(dechex($this->numberExtension->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); return sprintf( '#%s%s%s%s%s%s', @@ -78,7 +81,7 @@ final class Color implements Extension\ColorExtension $color[1], $color[1], $color[2], - $color[2] + $color[2], ); } @@ -113,7 +116,7 @@ final class Color implements Extension\ColorExtension { return sprintf( 'rgb(%s)', - $this->rgbColor() + $this->rgbColor(), ); } @@ -122,12 +125,10 @@ final class Color implements Extension\ColorExtension */ public function rgbaCssColor(): string { - $number = new Number(); - return sprintf( 'rgba(%s,%s)', $this->rgbColor(), - $number->randomFloat(1, 0, 1) + $this->numberExtension->randomFloat(1, 0, 1), ); } @@ -152,13 +153,11 @@ final class Color implements Extension\ColorExtension */ public function hslColor(): string { - $number = new Number(); - return sprintf( '%s,%s,%s', - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100) + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ); } @@ -169,12 +168,10 @@ final class Color implements Extension\ColorExtension */ public function hslColorAsArray(): array { - $number = new Number(); - return [ - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ]; } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php b/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php index 40a26589..15b5492e 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php @@ -4,10 +4,20 @@ declare(strict_types=1); namespace Faker\Core; -use Faker\Extension\Extension; +use Faker\Extension; -class Coordinates implements Extension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Coordinates implements Extension\Extension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '77.147489' * @@ -52,8 +62,8 @@ class Coordinates implements Extension public function localCoordinates(): array { return [ - 'latitude' => static::latitude(), - 'longitude' => static::longitude(), + 'latitude' => $this->latitude(), + 'longitude' => $this->longitude(), ]; } @@ -63,6 +73,6 @@ class Coordinates implements Extension throw new \LogicException('Invalid coordinates boundaries'); } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return $this->numberExtension->randomFloat($nbMaxDecimals, $min, $max); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/File.php b/vendor/fakerphp/faker/src/Faker/Core/File.php index adddb0cb..5151e900 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/File.php +++ b/vendor/fakerphp/faker/src/Faker/Core/File.php @@ -18,7 +18,7 @@ final class File implements Extension\FileExtension * * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types */ - private $mimeTypes = [ + private array $mimeTypes = [ 'application/atom+xml' => 'atom', 'application/ecmascript' => 'ecma', 'application/emma+xml' => 'emma', diff --git a/vendor/fakerphp/faker/src/Faker/Core/Number.php b/vendor/fakerphp/faker/src/Faker/Core/Number.php index f7af0c29..a16920c9 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Number.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Number.php @@ -13,20 +13,20 @@ final class Number implements Extension\NumberExtension { public function numberBetween(int $min = 0, int $max = 2147483647): int { - $int1 = $min < $max ? $min : $max; - $int2 = $min < $max ? $max : $min; + $int1 = min($min, $max); + $int2 = max($min, $max); return mt_rand($int1, $int2); } public function randomDigit(): int { - return mt_rand(0, 9); + return $this->numberBetween(0, 9); } public function randomDigitNot(int $except): int { - $result = self::numberBetween(0, 8); + $result = $this->numberBetween(0, 8); if ($result >= $except) { ++$result; @@ -37,7 +37,7 @@ final class Number implements Extension\NumberExtension public function randomDigitNotZero(): int { - return mt_rand(1, 9); + return $this->numberBetween(1, 9); } public function randomFloat(?int $nbMaxDecimals = null, float $min = 0, ?float $max = null): float @@ -60,7 +60,7 @@ final class Number implements Extension\NumberExtension $max = $tmp; } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return round($min + $this->numberBetween() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); } public function randomNumber(int $nbDigits = null, bool $strict = false): int @@ -75,9 +75,9 @@ final class Number implements Extension\NumberExtension } if ($strict) { - return mt_rand(10 ** ($nbDigits - 1), $max); + return $this->numberBetween(10 ** ($nbDigits - 1), $max); } - return mt_rand(0, $max); + return $this->numberBetween(0, $max); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Uuid.php b/vendor/fakerphp/faker/src/Faker/Core/Uuid.php index 7311e287..d1db1b22 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Uuid.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Uuid.php @@ -2,17 +2,26 @@ namespace Faker\Core; -use Faker\Extension\UuidExtension; +use Faker\Extension; -final class Uuid implements UuidExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Uuid implements Extension\UuidExtension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + + $this->numberExtension = $numberExtension ?: new Number(); + } + public function uuid3(): string { - $number = new Number(); - // fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit // two such calls will cause 64bits of randomness regardless of architecture - $seed = $number->numberBetween(0, 2147483647) . '#' . $number->numberBetween(0, 2147483647); + $seed = $this->numberExtension->numberBetween(0, 2147483647) . '#' . $this->numberExtension->numberBetween(0, 2147483647); // Hash the seed and convert to a byte array $val = md5($seed, true); @@ -50,7 +59,7 @@ final class Uuid implements UuidExtension $byte[12], $byte[13], $byte[14], - $byte[15] + $byte[15], ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Version.php b/vendor/fakerphp/faker/src/Faker/Core/Version.php index 66dcdfe8..8863c480 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Version.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Version.php @@ -4,16 +4,25 @@ declare(strict_types=1); namespace Faker\Core; -use Faker\Extension\Helper; -use Faker\Extension\VersionExtension; +use Faker\Extension; use Faker\Provider\DateTime; -final class Version implements VersionExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Version implements Extension\VersionExtension { + private Extension\NumberExtension $numberExtension; /** * @var string[] */ - private $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + private array $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + + $this->numberExtension = $numberExtension ?: new Number(); + } /** * Represents v2.0.0 of the semantic versioning: https://semver.org/spec/v2.0.0.html @@ -22,11 +31,11 @@ final class Version implements VersionExtension { return sprintf( '%d.%d.%d%s%s', - mt_rand(0, 9), - mt_rand(0, 99), - mt_rand(0, 99), - $preRelease && mt_rand(0, 1) ? '-' . $this->semverPreReleaseIdentifier() : '', - $build && mt_rand(0, 1) ? '+' . $this->semverBuildIdentifier() : '' + $this->numberExtension->numberBetween(0, 9), + $this->numberExtension->numberBetween(0, 99), + $this->numberExtension->numberBetween(0, 99), + $preRelease && $this->numberExtension->numberBetween(0, 1) === 1 ? '-' . $this->semverPreReleaseIdentifier() : '', + $build && $this->numberExtension->numberBetween(0, 1) === 1 ? '+' . $this->semverBuildIdentifier() : '', ); } @@ -35,13 +44,13 @@ final class Version implements VersionExtension */ private function semverPreReleaseIdentifier(): string { - $ident = Helper::randomElement($this->semverCommonPreReleaseIdentifiers); + $ident = Extension\Helper::randomElement($this->semverCommonPreReleaseIdentifiers); - if (!mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) !== 1) { return $ident; } - return $ident . '.' . mt_rand(1, 99); + return $ident . '.' . $this->numberExtension->numberBetween(1, 99); } /** @@ -49,9 +58,9 @@ final class Version implements VersionExtension */ private function semverBuildIdentifier(): string { - if (mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) === 1) { // short git revision syntax: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection - return substr(sha1(Helper::lexify('??????')), 0, 7); + return substr(sha1(Extension\Helper::lexify('??????')), 0, 7); } // date syntax diff --git a/vendor/fakerphp/faker/src/Faker/Extension/Container.php b/vendor/fakerphp/faker/src/Faker/Extension/Container.php deleted file mode 100644 index 08cbb37f..00000000 --- a/vendor/fakerphp/faker/src/Faker/Extension/Container.php +++ /dev/null @@ -1,137 +0,0 @@ - - */ - private $definitions; - - private $services = []; - - /** - * Create a container object with a set of definitions. The array value MUST - * produce an object that implements Extension. - * - * @param array $definitions - */ - public function __construct(array $definitions) - { - $this->definitions = $definitions; - } - - /** - * @param string $id - * - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws ContainerException - * @throws NotInContainerException - * - * @return Extension - */ - public function get($id) - { - if (!is_string($id)) { - throw new \InvalidArgumentException(sprintf( - 'First argument of %s::get() must be string', - self::class - )); - } - - if (array_key_exists($id, $this->services)) { - return $this->services[$id]; - } - - if (!$this->has($id)) { - throw new NotInContainerException(sprintf( - 'There is not service with id "%s" in the container.', - $id - )); - } - - $definition = $this->definitions[$id]; - - if (is_callable($definition)) { - try { - $service = $definition(); - } catch (\Throwable $e) { - throw new ContainerException( - sprintf( - 'Error while invoking callable for "%s"', - $id - ), - 0, - $e - ); - } - } elseif (is_object($definition)) { - $service = $definition; - } elseif (is_string($definition)) { - if (!class_exists($definition)) { - throw new ContainerException(sprintf( - 'Could not instantiate class "%s". Class was not found.', - $id - )); - } - - try { - $service = new $definition(); - } catch (\Throwable $e) { - throw new ContainerException( - sprintf( - 'Could not instantiate class "%s"', - $id - ), - 0, - $e - ); - } - } else { - throw new ContainerException(sprintf( - 'Invalid type for definition with id "%s"', - $id - )); - } - - if (!$service instanceof Extension) { - throw new \RuntimeException(sprintf( - 'Service resolved for identifier "%s" does not implement the %s" interface.', - $id, - Extension::class - )); - } - - $this->services[$id] = $service; - - return $service; - } - - /** - * @param string $id - * - * @throws \InvalidArgumentException - */ - public function has($id): bool - { - if (!is_string($id)) { - throw new \InvalidArgumentException(sprintf( - 'First argument of %s::get() must be string', - self::class - )); - } - - return array_key_exists($id, $this->definitions); - } -} diff --git a/vendor/fakerphp/faker/src/Faker/Extension/ContainerBuilder.php b/vendor/fakerphp/faker/src/Faker/Extension/ContainerBuilder.php deleted file mode 100644 index 954f52d2..00000000 --- a/vendor/fakerphp/faker/src/Faker/Extension/ContainerBuilder.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ - private $definitions = []; - - /** - * @param callable|object|string $value - * - * @throws \InvalidArgumentException - */ - public function add($value, string $name = null): self - { - if (!is_string($value) && !is_callable($value) && !is_object($value)) { - throw new \InvalidArgumentException(sprintf( - 'First argument to "%s::add()" must be a string, callable or object.', - self::class - )); - } - - if ($name === null) { - if (is_string($value)) { - $name = $value; - } elseif (is_object($value)) { - $name = get_class($value); - } else { - throw new \InvalidArgumentException(sprintf( - 'Second argument to "%s::add()" is required not passing a string or object as first argument', - self::class - )); - } - } - - $this->definitions[$name] = $value; - - return $this; - } - - public function build(): ContainerInterface - { - return new Container($this->definitions); - } - - /** - * Get an array with extension that represent the default English - * functionality. - */ - public static function defaultExtensions(): array - { - return [ - BarcodeExtension::class => Core\Barcode::class, - BloodExtension::class => Core\Blood::class, - ColorExtension::class => Core\Color::class, - FileExtension::class => Core\File::class, - NumberExtension::class => Core\Number::class, - VersionExtension::class => Core\Version::class, - UuidExtension::class => Core\Uuid::class, - ]; - } - - public static function getDefault(): ContainerInterface - { - $instance = new self(); - - foreach (self::defaultExtensions() as $id => $definition) { - $instance->add($definition, $id); - } - - return $instance->build(); - } -} diff --git a/vendor/fakerphp/faker/src/Faker/Extension/ContainerException.php b/vendor/fakerphp/faker/src/Faker/Extension/ContainerException.php deleted file mode 100644 index b26552cd..00000000 --- a/vendor/fakerphp/faker/src/Faker/Extension/ContainerException.php +++ /dev/null @@ -1,14 +0,0 @@ -container = $container ?: Extension\ContainerBuilder::getDefault(); + $this->container = $container ?: Container\ContainerBuilder::withDefaultExtensions()->build(); } /** @@ -576,7 +584,7 @@ class Generator if (!$this->container->has($id)) { throw new Extension\ExtensionNotFound(sprintf( 'No Faker extension with id "%s" was loaded.', - $id + $id, )); } @@ -679,10 +687,22 @@ class Generator if ($seed === null) { mt_srand(); } else { - mt_srand((int) $seed, MT_RAND_PHP); + mt_srand((int) $seed, self::mode()); } } + /** + * @see https://www.php.net/manual/en/migration83.deprecated.php#migration83.deprecated.random + */ + private static function mode(): int + { + if (PHP_VERSION_ID < 80300) { + return MT_RAND_PHP; + } + + return MT_RAND_MT19937; + } + public function format($format, $arguments = []) { return call_user_func_array($this->getFormatter($format), $arguments); @@ -885,7 +905,7 @@ class Generator return $this->ext(Extension\NumberExtension::class)->randomFloat( $nbMaxDecimals !== null ? (int) $nbMaxDecimals : null, (float) $min, - $max !== null ? (float) $max : null + $max !== null ? (float) $max : null, ); } @@ -903,7 +923,7 @@ class Generator { return $this->ext(Extension\NumberExtension::class)->randomNumber( $nbDigits !== null ? (int) $nbDigits : null, - (bool) $strict + (bool) $strict, ); } diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/EntityPopulator.php b/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/EntityPopulator.php index 79d3796b..47923999 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -193,7 +193,7 @@ class EntityPopulator return $obj; } - private function fillColumns($obj, $insertedEntities) + private function fillColumns($obj, $insertedEntities): void { foreach ($this->columnFormatters as $field => $format) { if (null !== $format) { @@ -205,7 +205,7 @@ class EntityPopulator 'Failed to generate a value for %s::%s: %s', get_class($obj), $field, - $ex->getMessage() + $ex->getMessage(), )); } // Try a standard setter if it's available, otherwise fall back on reflection @@ -220,7 +220,7 @@ class EntityPopulator } } - private function callMethods($obj, $insertedEntities) + private function callMethods($obj, $insertedEntities): void { foreach ($this->getModifiers() as $modifier) { $modifier($obj, $insertedEntities); diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/Populator.php b/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/Populator.php index 893d8566..1bce6ab4 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/Populator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Doctrine/Populator.php @@ -111,7 +111,7 @@ class Populator $insertedEntities[$class][] = $this->entities[$class]->execute( $entityManager, $insertedEntities, - $generateId + $generateId, ); if (count($insertedEntities) % $this->batchSize === 0) { diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/vendor/fakerphp/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php index 2d05230b..3d8a9a11 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -69,9 +69,9 @@ class ColumnTypeGuesser case \PropelColumnTypes::FLOAT: case \PropelColumnTypes::DOUBLE: case \PropelColumnTypes::REAL: - return static function () use ($generator) { - return $generator->randomFloat(); - }; + return static function () use ($generator) { + return $generator->randomFloat(); + }; case \PropelColumnTypes::CHAR: case \PropelColumnTypes::VARCHAR: @@ -102,7 +102,7 @@ class ColumnTypeGuesser case \PropelColumnTypes::OBJECT: case \PropelColumnTypes::PHP_ARRAY: default: - // no smart way to guess what the user expects here + // no smart way to guess what the user expects here return null; } } diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Propel/EntityPopulator.php b/vendor/fakerphp/faker/src/Faker/ORM/Propel/EntityPopulator.php index bee659d5..f5af75c9 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Propel/EntityPopulator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Propel/EntityPopulator.php @@ -157,7 +157,7 @@ class EntityPopulator foreach ($tableMap->getBehaviors() as $name => $params) { switch ($name) { case 'nested_set': - $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator): void { if (isset($inserted[$class])) { $queryClass = $class . 'Query'; $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); @@ -170,7 +170,7 @@ class EntityPopulator break; case 'sortable': - $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator): void { $obj->insertAtRank($generator->numberBetween(1, count($inserted[$class] ?? []) + 1)); }; diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php b/vendor/fakerphp/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php index 66e109c7..4c08e0ad 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -105,7 +105,7 @@ class ColumnTypeGuesser case PropelTypes::OBJECT: case PropelTypes::PHP_ARRAY: default: - // no smart way to guess what the user expects here + // no smart way to guess what the user expects here return null; } } diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Propel2/EntityPopulator.php b/vendor/fakerphp/faker/src/Faker/ORM/Propel2/EntityPopulator.php index 199f4563..44804e37 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Propel2/EntityPopulator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Propel2/EntityPopulator.php @@ -160,7 +160,7 @@ class EntityPopulator foreach ($tableMap->getBehaviors() as $name => $params) { switch ($name) { case 'nested_set': - $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator): void { if (isset($inserted[$class])) { $queryClass = $class . 'Query'; $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); @@ -173,7 +173,7 @@ class EntityPopulator break; case 'sortable': - $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator): void { $obj->insertAtRank($generator->numberBetween(1, count($inserted[$class] ?? []) + 1)); }; diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Spot/EntityPopulator.php b/vendor/fakerphp/faker/src/Faker/ORM/Spot/EntityPopulator.php index c0afbb7c..b67ae253 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Spot/EntityPopulator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Spot/EntityPopulator.php @@ -180,7 +180,7 @@ class EntityPopulator return $obj; } - private function fillColumns($obj, $insertedEntities) + private function fillColumns($obj, $insertedEntities): void { foreach ($this->columnFormatters as $field => $format) { if (null !== $format) { @@ -190,7 +190,7 @@ class EntityPopulator } } - private function callMethods($obj, $insertedEntities) + private function callMethods($obj, $insertedEntities): void { foreach ($this->getModifiers() as $modifier) { $modifier($obj, $insertedEntities); diff --git a/vendor/fakerphp/faker/src/Faker/ORM/Spot/Populator.php b/vendor/fakerphp/faker/src/Faker/ORM/Spot/Populator.php index 67202bb3..b321f5c5 100644 --- a/vendor/fakerphp/faker/src/Faker/ORM/Spot/Populator.php +++ b/vendor/fakerphp/faker/src/Faker/ORM/Spot/Populator.php @@ -79,7 +79,7 @@ class Populator foreach ($this->quantities as $entityName => $number) { for ($i = 0; $i < $number; ++$i) { $insertedEntities[$entityName][] = $this->entities[$entityName]->execute( - $insertedEntities + $insertedEntities, ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Base.php b/vendor/fakerphp/faker/src/Faker/Provider/Base.php index 9086ea55..6b9876bc 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Base.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Base.php @@ -179,67 +179,115 @@ class Base /** * Returns randomly ordered subsequence of $count elements from a provided array * - * @param array $array Array to take elements from. Defaults to a-c - * @param int $count Number of elements to take. - * @param bool $allowDuplicates Allow elements to be picked several times. Defaults to false + * @todo update default $count to `null` (BC) for next major version * - * @throws \LengthException When requesting more elements than provided + * @param array|class-string|\Traversable $array Array to take elements from. Defaults to a-c + * @param int|null $count Number of elements to take. If `null` then returns random number of elements + * @param bool $allowDuplicates Allow elements to be picked several times. Defaults to false + * + * @throws \InvalidArgumentException + * @throws \LengthException When requesting more elements than provided * * @return array New array with $count elements from $array */ public static function randomElements($array = ['a', 'b', 'c'], $count = 1, $allowDuplicates = false) { - $traversables = []; + $elements = $array; + + if (is_string($array) && function_exists('enum_exists') && enum_exists($array)) { + $elements = $array::cases(); + } if ($array instanceof \Traversable) { - foreach ($array as $element) { - $traversables[] = $element; - } + $elements = \iterator_to_array($array, false); } - $arr = count($traversables) ? $traversables : $array; - - $allKeys = array_keys($arr); - $numKeys = count($allKeys); - - if (!$allowDuplicates && $numKeys < $count) { - throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys)); + if (!is_array($elements)) { + throw new \InvalidArgumentException(sprintf( + 'Argument for parameter $array needs to be array, an instance of %s, or an instance of %s, got %s instead.', + \UnitEnum::class, + \Traversable::class, + is_object($array) ? get_class($array) : gettype($array), + )); } - $highKey = $numKeys - 1; - $keys = $elements = []; - $numElements = 0; + $numberOfElements = count($elements); - while ($numElements < $count) { - $num = mt_rand(0, $highKey); + if (!$allowDuplicates && null !== $count && $numberOfElements < $count) { + throw new \LengthException(sprintf( + 'Cannot get %d elements, only %d in array', + $count, + $numberOfElements, + )); + } + + if (null === $count) { + $count = mt_rand(1, $numberOfElements); + } + + $randomElements = []; + + $keys = array_keys($elements); + $maxIndex = $numberOfElements - 1; + $elementHasBeenSelectedAlready = []; + $numberOfRandomElements = 0; + + while ($numberOfRandomElements < $count) { + $index = mt_rand(0, $maxIndex); if (!$allowDuplicates) { - if (isset($keys[$num])) { + if (isset($elementHasBeenSelectedAlready[$index])) { continue; } - $keys[$num] = true; + + $elementHasBeenSelectedAlready[$index] = true; } - $elements[] = $arr[$allKeys[$num]]; - ++$numElements; + $key = $keys[$index]; + + $randomElements[] = $elements[$key]; + + ++$numberOfRandomElements; } - return $elements; + return $randomElements; } /** * Returns a random element from a passed array * - * @param array $array + * @param array|class-string|\Traversable $array + * + * @throws \InvalidArgumentException */ public static function randomElement($array = ['a', 'b', 'c']) { - if (!$array || ($array instanceof \Traversable && !count($array))) { + $elements = $array; + + if (is_string($array) && function_exists('enum_exists') && enum_exists($array)) { + $elements = $array::cases(); + } + + if ($array instanceof \Traversable) { + $elements = iterator_to_array($array, false); + } + + if ($elements === []) { return null; } - $elements = static::randomElements($array, 1); - return $elements[0]; + if (!is_array($elements)) { + throw new \InvalidArgumentException(sprintf( + 'Argument for parameter $array needs to be array, an instance of %s, or an instance of %s, got %s instead.', + \UnitEnum::class, + \Traversable::class, + is_object($array) ? get_class($array) : gettype($array), + )); + } + + $randomElements = static::randomElements($elements, 1); + + return $randomElements[0]; } /** @@ -363,7 +411,7 @@ class Base return implode('', static::shuffleArray($array)); } - private static function replaceWildcard($string, $wildcard = '#', $callback = 'static::randomDigit') + private static function replaceWildcard($string, $wildcard, $callback) { if (($pos = strpos($string, $wildcard)) === false) { return $string; @@ -415,7 +463,7 @@ class Base $string[$toReplace[$i]] = $numbers[$i]; } } - $string = self::replaceWildcard($string, '%', 'static::randomDigitNotNull'); + $string = self::replaceWildcard($string, '%', [static::class, 'randomDigitNotNull']); return $string; } @@ -429,21 +477,21 @@ class Base */ public static function lexify($string = '????') { - return self::replaceWildcard($string, '?', 'static::randomLetter'); + return self::replaceWildcard($string, '?', [static::class, 'randomLetter']); } /** * Replaces hash signs ('#') and question marks ('?') with random numbers and letters * An asterisk ('*') is replaced with either a random number or a random letter * - * @param string $string String that needs to bet parsed + * @param string $string String that needs to be parsed * * @return string */ public static function bothify($string = '## ??') { $string = self::replaceWildcard($string, '*', static function () { - return mt_rand(0, 1) ? '#' : '?'; + return mt_rand(0, 1) === 1 ? '#' : '?'; }); return static::lexify(static::numerify($string)); @@ -460,7 +508,7 @@ class Base */ public static function asciify($string = '****') { - return preg_replace_callback('/\*/u', 'static::randomAscii', $string); + return preg_replace_callback('/\*/u', [static::class, 'randomAscii'], $string); } /** @@ -528,12 +576,13 @@ class Base // remove backslashes (that are not followed by another backslash) because they are escape characters $match = preg_replace('/\\\(?!\\\)/', '', $matches[1]); $randomElement = Base::randomElement(str_split($match)); + //[.] should not be a random character, but a literal . return str_replace('.', '\.', $randomElement); }, $regex); // replace \d with number and \w with letter and . with ascii - $regex = preg_replace_callback('/\\\w/', 'static::randomLetter', $regex); - $regex = preg_replace_callback('/\\\d/', 'static::randomDigit', $regex); + $regex = preg_replace_callback('/\\\w/', [static::class, 'randomLetter'], $regex); + $regex = preg_replace_callback('/\\\d/', [static::class, 'randomDigit'], $regex); //replace . with ascii except backslash $regex = preg_replace_callback('/(?add($intervalObject); - $begin = $datetime > $otherDatetime ? $otherDatetime : $datetime; + $begin = min($datetime, $otherDatetime); $end = $datetime === $begin ? $otherDatetime : $datetime; return static::dateTimeBetween( $begin, $end, - $timezone + $timezone, ); } /** + * Get a date time object somewhere within a century. + * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @example DateTime('1964-04-04 11:02:02') - * * @return \DateTime */ public static function dateTimeThisCentury($max = 'now', $timezone = null) @@ -207,11 +207,11 @@ class DateTime extends Base } /** + * Get a date time object somewhere within a decade. + * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @example DateTime('2010-03-10 05:18:58') - * * @return \DateTime */ public static function dateTimeThisDecade($max = 'now', $timezone = null) @@ -220,11 +220,11 @@ class DateTime extends Base } /** + * Get a date time object somewhere inside the current year. + * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @example DateTime('2011-09-19 09:24:37') - * * @return \DateTime */ public static function dateTimeThisYear($max = 'now', $timezone = null) @@ -233,11 +233,11 @@ class DateTime extends Base } /** + * Get a date time object somewhere within a month. + * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * - * @example DateTime('2011-10-05 12:51:46') - * * @return \DateTime */ public static function dateTimeThisMonth($max = 'now', $timezone = null) @@ -246,6 +246,8 @@ class DateTime extends Base } /** + * Get a string containing either "am" or "pm". + * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" * * @return string @@ -310,7 +312,7 @@ class DateTime extends Base * * @return string * - * @example '1673' + * @example '1987' */ public static function year($max = 'now') { @@ -332,9 +334,15 @@ class DateTime extends Base * * @example 'Europe/Paris' */ - public static function timezone() + public static function timezone(string $countryCode = null) { - return static::randomElement(\DateTimeZone::listIdentifiers()); + if ($countryCode) { + $timezones = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $countryCode); + } else { + $timezones = \DateTimeZone::listIdentifiers(); + } + + return static::randomElement($timezones); } /** diff --git a/vendor/fakerphp/faker/src/Faker/Provider/HtmlLorem.php b/vendor/fakerphp/faker/src/Faker/Provider/HtmlLorem.php index 06bcd87d..a8434108 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/HtmlLorem.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/HtmlLorem.php @@ -94,7 +94,7 @@ class HtmlLorem extends Base return $root; } - private function addRandomLeaf(\DOMElement $node) + private function addRandomLeaf(\DOMElement $node): void { $rand = self::numberBetween(1, 10); @@ -146,7 +146,7 @@ class HtmlLorem extends Base } } - private function addRandomAttribute(\DOMElement $node) + private function addRandomAttribute(\DOMElement $node): void { $rand = self::numberBetween(1, 2); @@ -163,20 +163,20 @@ class HtmlLorem extends Base } } - private function addRandomP(\DOMElement $element, $maxLength = 10) + private function addRandomP(\DOMElement $element, $maxLength = 10): void { $node = $element->ownerDocument->createElement(static::P_TAG); $node->textContent = $this->generator->sentence(self::numberBetween(1, $maxLength)); $element->appendChild($node); } - private function addRandomText(\DOMElement $element, $maxLength = 10) + private function addRandomText(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $element->appendChild($text); } - private function addRandomA(\DOMElement $element, $maxLength = 10) + private function addRandomA(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::A_TAG); @@ -185,7 +185,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addRandomTitle(\DOMElement $element, $maxLength = 10) + private function addRandomTitle(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::TITLE_TAG); @@ -193,7 +193,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addRandomH(\DOMElement $element, $maxLength = 10) + private function addRandomH(\DOMElement $element, $maxLength = 10): void { $h = static::H_TAG . (string) self::numberBetween(1, 3); $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); @@ -202,7 +202,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addRandomB(\DOMElement $element, $maxLength = 10) + private function addRandomB(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::B_TAG); @@ -210,7 +210,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addRandomI(\DOMElement $element, $maxLength = 10) + private function addRandomI(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::I_TAG); @@ -218,7 +218,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addRandomSpan(\DOMElement $element, $maxLength = 10) + private function addRandomSpan(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::SPAN_TAG); @@ -226,7 +226,7 @@ class HtmlLorem extends Base $element->appendChild($node); } - private function addLoginForm(\DOMElement $element) + private function addLoginForm(\DOMElement $element): void { $textInput = $element->ownerDocument->createElement(static::INPUT_TAG); $textInput->setAttribute('type', 'text'); @@ -258,7 +258,7 @@ class HtmlLorem extends Base $element->appendChild($submit); } - private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = 6, $maxTitle = 4, $maxLength = 10) + private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = 6, $maxTitle = 4, $maxLength = 10): void { $rows = self::numberBetween(1, $maxRows); $cols = self::numberBetween(1, $maxCols); @@ -292,7 +292,7 @@ class HtmlLorem extends Base $element->appendChild($table); } - private function addRandomUL(\DOMElement $element, $maxItems = 11, $maxLength = 4) + private function addRandomUL(\DOMElement $element, $maxItems = 11, $maxLength = 4): void { $num = self::numberBetween(1, $maxItems); $ul = $element->ownerDocument->createElement(static::UL_TAG); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Image.php b/vendor/fakerphp/faker/src/Faker/Provider/Image.php index 167641c1..e7871421 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Image.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Image.php @@ -12,6 +12,10 @@ class Image extends Base */ public const BASE_URL = 'https://via.placeholder.com'; + public const FORMAT_JPG = 'jpg'; + public const FORMAT_JPEG = 'jpeg'; + public const FORMAT_PNG = 'png'; + /** * @var array * @@ -35,6 +39,7 @@ class Image extends Base * @param bool $randomize * @param string|null $word * @param bool $gray + * @param string $format * * @return string */ @@ -44,9 +49,27 @@ class Image extends Base $category = null, $randomize = true, $word = null, - $gray = false + $gray = false, + $format = 'png' ) { - $size = sprintf('%dx%d.png', $width, $height); + trigger_deprecation( + 'fakerphp/faker', + '1.20', + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', + ); + + // Validate image format + $imageFormats = static::getFormats(); + + if (!in_array(strtolower($format), $imageFormats, true)) { + throw new \InvalidArgumentException(sprintf( + 'Invalid image format "%s". Allowable formats are: %s', + $format, + implode(', ', $imageFormats), + )); + } + + $size = sprintf('%dx%d.%s', $width, $height, $format); $imageParts = []; @@ -69,7 +92,7 @@ class Image extends Base self::BASE_URL, $size, $backgroundColor, - count($imageParts) > 0 ? '?text=' . urlencode(implode(' ', $imageParts)) : '' + count($imageParts) > 0 ? '?text=' . urlencode(implode(' ', $imageParts)) : '', ); } @@ -90,9 +113,17 @@ class Image extends Base $fullPath = true, $randomize = true, $word = null, - $gray = false + $gray = false, + $format = 'png' ) { + trigger_deprecation( + 'fakerphp/faker', + '1.20', + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', + ); + $dir = null === $dir ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible + // Validate directory path if (!is_dir($dir) || !is_writable($dir)) { throw new \InvalidArgumentException(sprintf('Cannot write to directory "%s"', $dir)); @@ -101,10 +132,10 @@ class Image extends Base // Generate a random filename. Use the server address so that a file // generated at the same time on a different server won't have a collision. $name = md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true)); - $filename = $name . '.png'; + $filename = sprintf('%s.%s', $name, $format); $filepath = $dir . DIRECTORY_SEPARATOR . $filename; - $url = static::imageUrl($width, $height, $category, $randomize, $word, $gray); + $url = static::imageUrl($width, $height, $category, $randomize, $word, $gray, $format); // save file if (function_exists('curl_exec')) { @@ -136,4 +167,30 @@ class Image extends Base return $fullPath ? $filepath : $filename; } + + public static function getFormats(): array + { + trigger_deprecation( + 'fakerphp/faker', + '1.20', + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', + ); + + return array_keys(static::getFormatConstants()); + } + + public static function getFormatConstants(): array + { + trigger_deprecation( + 'fakerphp/faker', + '1.20', + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', + ); + + return [ + static::FORMAT_JPG => constant('IMAGETYPE_JPEG'), + static::FORMAT_JPEG => constant('IMAGETYPE_JPEG'), + static::FORMAT_PNG => constant('IMAGETYPE_PNG'), + ]; + } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Lorem.php b/vendor/fakerphp/faker/src/Faker/Provider/Lorem.php index a55144a5..2cfb70ea 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Lorem.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Lorem.php @@ -184,7 +184,15 @@ class Lorem extends Base throw new \InvalidArgumentException('text() can only generate text of at least 5 characters'); } - $type = ($maxNbChars < 25) ? 'word' : (($maxNbChars < 100) ? 'sentence' : 'paragraph'); + $type = 'paragraph'; + + if ($maxNbChars < 100) { + $type = 'sentence'; + } + + if ($maxNbChars < 25) { + $type = 'word'; + } $text = []; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Miscellaneous.php b/vendor/fakerphp/faker/src/Faker/Provider/Miscellaneous.php index 91d992ec..354f67bb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Miscellaneous.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Miscellaneous.php @@ -202,11 +202,12 @@ class Miscellaneous extends Base /** * @see https://en.wikipedia.org/wiki/ISO_4217 - * On date of 2019-09-27 + * On date of 2023-01-01 * * With the following exceptions: * SVC has been replaced by the USD in 2001: https://en.wikipedia.org/wiki/Salvadoran_col%C3%B3n * ZWL has been suspended since 2009: https://en.wikipedia.org/wiki/Zimbabwean_dollar + * HRK has been replaced by EUR since 2023: https://en.wikipedia.org/wiki/Croatian_kuna */ protected static $currencyCode = [ 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', @@ -214,17 +215,17 @@ class Miscellaneous extends Base 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', - 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', - 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', - 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', - 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', - 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', - 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', - 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SYP', 'SZL', - 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', - 'UGX', 'USD', 'UYU', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XCD', - 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HTG', 'HUF', 'IDR', 'ILS', + 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', + 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', + 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', + 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', + 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', + 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SYP', 'SZL', 'THB', + 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', + 'USD', 'UYU', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', + 'XPF', 'YER', 'ZAR', 'ZMW', ]; /** diff --git a/vendor/fakerphp/faker/src/Faker/Provider/UserAgent.php b/vendor/fakerphp/faker/src/Faker/Provider/UserAgent.php index a63b7d1f..752df4d3 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/UserAgent.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/UserAgent.php @@ -4,7 +4,7 @@ namespace Faker\Provider; class UserAgent extends Base { - protected static $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari']; + protected static $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari', 'msedge']; protected static $windowsPlatformTokens = [ 'Windows NT 6.2', 'Windows NT 6.1', 'Windows NT 6.0', 'Windows NT 5.2', 'Windows NT 5.1', @@ -25,7 +25,7 @@ class UserAgent extends Base /** * Add as many languages as you like. */ - protected static $lang = ['en-US', 'sl-SI']; + protected static $lang = ['en-US', 'sl-SI', 'nl-NL']; /** * Generate mac processor @@ -81,6 +81,28 @@ class UserAgent extends Base return 'Mozilla/5.0 ' . static::randomElement($platforms); } + /** + * Generate Edge user agent + * + * @example 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36 Edg/99.0.1150.36' + * + * @return string + */ + public static function msedge() + { + $saf = self::numberBetween(531, 537) . '.' . self::numberBetween(0, 2); + $chrv = self::numberBetween(79, 99) . '.0'; + + $platforms = [ + '(' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf Edg/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99), + '(' . static::macPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf Edg/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99), + '(' . static::linuxPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf EdgA/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99), + '(' . static::iosMobileToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Version/15.0 EdgiOS/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99) . " Mobile/15E148 Safari/$saf", + ]; + + return 'Mozilla/5.0 ' . static::randomElement($platforms); + } + /** * Generate Firefox user agent * @@ -177,6 +199,16 @@ class UserAgent extends Base return 'Macintosh; ' . static::randomElement(static::$macProcessor) . ' Mac OS X 10_' . self::numberBetween(5, 8) . '_' . self::numberBetween(0, 9); } + /** + * @return string + */ + public static function iosMobileToken() + { + $iosVer = self::numberBetween(13, 15) . '_' . self::numberBetween(0, 2); + + return 'iPhone; CPU iPhone OS ' . $iosVer . ' like Mac OS X'; + } + /** * @return string */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Uuid.php b/vendor/fakerphp/faker/src/Faker/Provider/Uuid.php index 1cd15cab..bcfcb05d 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Uuid.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Uuid.php @@ -53,7 +53,7 @@ class Uuid extends Base $byte[12], $byte[13], $byte[14], - $byte[15] + $byte[15], ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Address.php index 8fe73f50..87facaaf 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Address.php @@ -84,35 +84,35 @@ class Address extends \Faker\Provider\Address /** * @see https://ar.wikipedia.org/wiki/%D9%82%D8%A7%D8%A6%D9%85%D8%A9_%D9%85%D8%AD%D8%A7%D9%81%D8%B8%D8%A7%D8%AA_%D9%85%D8%B5%D8%B1 + * @see https://ar.wikipedia.org/wiki/%D8%A8%D8%B7%D8%A7%D9%82%D8%A9_%D8%A7%D9%84%D8%B1%D9%82%D9%85_%D8%A7%D9%84%D9%82%D9%88%D9%85%D9%8A_%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D8%A9 */ protected static $governorates = [ - 'الإسكندرية', - 'الإسماعيلية', - 'أسوان', - 'أسيوط', - 'الأقصر', - 'البحر الأحمر', - 'البحيرة', - 'بني سويف', - 'بورسعيد', - 'جنوب سيناء', - 'الجيزة', - 'الدقهلية', - 'دمياط', - 'سوهاج', - 'السويس', - 'الشرقية', - 'شمال سيناء', - 'الغربية', - 'الفيوم', - 'القاهرة', - 'القليوبية', - 'قنا', - 'كفر الشيخ', - 'مطروح', - 'المنوفية', - 'المنيا', - 'الوادي الجديد', + 'الإسكندرية' => '02', + 'الإسماعيلية' => '19', + 'أسوان' => '28', + 'أسيوط' => '25', + 'الأقصر' => '29', + 'البحر الأحمر' => '31', + 'البحيرة' => '18', + 'بني سويف' => '22', + 'بورسعيد' => '03', + 'جنوب سيناء' => '35', + 'القاهرة' => '01', + 'الدقهلية' => '12', + 'دمياط' => '11', + 'سوهاج' => '26', + 'السويس' => '04', + 'الشرقية' => '13', + 'شمال سيناء' => '34', + 'الغربية' => '16', + 'الفيوم' => '23', + 'القليوبية' => '14', + 'قنا' => '27', + 'كفر الشيخ' => '15', + 'مطروح' => '33', + 'المنوفية' => '17', + 'المنيا' => '24', + 'الوادي الجديد' => '32', ]; protected static $buildingNumber = ['%####', '%###', '%#']; @@ -201,6 +201,16 @@ class Address extends \Faker\Provider\Address * @example 'الإسكندرية' */ public static function governorate() + { + return static::randomKey(static::$governorates); + } + + /** + * @example '01' + * + * @return string + */ + public static function governorateId() { return static::randomElement(static::$governorates); } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Person.php index 76f6f79e..f6e0b15c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ar_EG/Person.php @@ -2,8 +2,6 @@ namespace Faker\Provider\ar_EG; -use Faker\Calculator\Luhn; - class Person extends \Faker\Provider\Person { protected static $maleNameFormats = [ @@ -29,7 +27,7 @@ class Person extends \Faker\Provider\Person 'حاتم', 'حازم', 'حافظ', 'حامد', 'حبيب', 'حسام', 'حسان', 'حسن', 'حسني', 'حسين', 'حمدان', 'حمدي', 'حمزة', 'حميد', 'خالد', 'خضر', 'خلف', 'خليفة', 'خليل', 'خميس', 'داوود', 'دياب', 'رأفت', 'رؤوف', 'رائد', 'رائف', 'راجح', 'راجي', 'راشد', 'راضي', 'راغب', 'رافت', 'راكان', 'رامز', 'رامي', 'ربيع', 'رجب', 'رزق', 'رشاد', 'رشيد', 'رضا', 'رضوان', 'رياض', 'ريان', 'زاهر', 'زاهي', 'زايد', 'زكريا', 'زمام', 'زهير', 'زياد', 'زيد', 'زيدان', 'زين', 'سالم', 'سامح', 'سامر', 'سامي', 'سعد', 'سعيد', 'سلام', 'سلطان', 'سلمان', 'سليم', 'سليمان', 'سمعان', 'سميح', 'سنان', 'سند', - 'سيف', 'شادي', 'شاكر', 'شريف', 'شهاب', 'شهم', 'شوان', 'صادق', 'صافي', 'صالح', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صهيب', 'ضرغام', 'ضياء', 'ضياء الدين’, ', 'طارق', 'طالب', 'طاهر', 'طه', 'عادل', 'عاصم', 'عاطف', + 'سيف', 'شادي', 'شاكر', 'شريف', 'شهاب', 'شهم', 'شوان', 'صادق', 'صافي', 'صالح', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صهيب', 'ضرغام', 'ضياء', 'ضياء الدين', 'طارق', 'طالب', 'طاهر', 'طه', 'عادل', 'عاصم', 'عاطف', 'عبيدة', 'عثمان', 'عدلي', 'عدنان', 'عزت', 'عصام', 'علاء', 'علي', 'عماد', 'عمار', 'عمر', 'عمرو', 'عنان', 'عواد', 'عوض', 'عوف', 'عوني', 'عيد', 'عيسى', 'غازي', 'غسان', 'غيث', 'فؤاد', 'فادي', 'فارس', 'فاروق', 'فاضل', 'فايز', 'فتحي', 'فراس', 'فرح', 'فريد', 'فهد', 'فهمي', 'فوزي', 'فيصل', 'قارس', 'قاسم', 'قيس', 'كامل', 'كرم', 'كريم', 'كمال', 'لؤي', 'لبيب', 'لطفي', 'ليث', 'مأمون', @@ -80,16 +78,30 @@ class Person extends \Faker\Provider\Person } /** + * @see https://ar.wikipedia.org/wiki/%D8%A8%D8%B7%D8%A7%D9%82%D8%A9_%D8%A7%D9%84%D8%B1%D9%82%D9%85_%D8%A7%D9%84%D9%82%D9%88%D9%85%D9%8A_%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D8%A9 + * * @example 27512310101010 + * + * @return string */ - public static function nationalIdNumber() + public static function nationalIdNumber($gender = null) { - $timestamp = self::numberBetween(1, time()); + $randomBirthDateTimestamp = mt_rand(strtotime('1950-Jan-10'), strtotime('2005-Dec-25')); - $date = explode(':', date('y:m:d', $timestamp)); + $centuryId = ((int) date('Y', $randomBirthDateTimestamp)) >= 2000 ? 3 : 2; + $fullBirthDate = date('ymd', $randomBirthDateTimestamp); + $governorateId = Address::governorateId(); + $birthRegistrationSequence = mt_rand(1, 500); - $partialValue = static::numerify(2 . $date[0] . $date[1] . $date[2] . str_repeat('#', 6)); + if ($gender === static::GENDER_MALE) { + $birthRegistrationSequence = $birthRegistrationSequence | 1; // Convert to the nearest odd number + } elseif ($gender === static::GENDER_FEMALE) { + $birthRegistrationSequence = $birthRegistrationSequence & ~1; // Convert to the nearest even number + } - return Luhn::generateLuhnNumber($partialValue); + $birthRegistrationSequence = str_pad((string) $birthRegistrationSequence, 4, '0', STR_PAD_LEFT); + $randomCheckDigit = mt_rand(1, 9); + + return $centuryId . $fullBirthDate . $governorateId . $birthRegistrationSequence . $randomCheckDigit; } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ar_SA/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ar_SA/Person.php index c7bd16ec..91527c39 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ar_SA/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ar_SA/Person.php @@ -36,7 +36,7 @@ class Person extends \Faker\Provider\Person 'جواد', 'حابس', 'حاتم', 'حارث', 'حازم', 'حافظ', 'حاكم', 'حامد', 'حبيب', 'حذيفة', 'حسام', 'حسان', 'حسن', 'حسني', 'حسين', 'حكم', 'حمد', 'حمدالله', 'حمدان', 'حمدي', 'حمزة', 'حمود', 'حميد', 'خالد', 'خضر', 'خلدون', 'خلف', 'خليفة', 'خليل', 'خميس', 'داوود', 'ذياب', 'ذيب', 'رأفت', 'رؤوف', 'رئاد', 'رائد', 'رائف', 'راجح', 'راجي', 'راشد', 'راضي', 'راغب', 'رافت', 'رافع', 'رافي', 'راكان', 'رامان', 'رامز', 'رامي', 'رامين', 'ربيع', 'رجا', 'رجائي', 'رجب', 'رداد', 'رزق', 'رسلان', 'رشاد', 'رشيد', 'رضا', 'رضوان', 'رعد', 'رغد', 'رغيد', 'ركان', 'رماح', 'رياض', 'ريان', 'زاهر', 'زاهي', 'زايد', 'زكريا', 'زمام', 'زهير', 'زياد', 'زيد', 'زيدان', 'زيدون', 'زين', 'زين العابدين', 'سائد', 'ساري', 'سالم', 'سامح', 'سامر', 'سامي', 'ساهر', 'سدير', 'سرمد', 'سري', 'سعد', 'سعود', 'سعيد', 'سفيان', 'سكوت', 'سلام', 'سلطان', 'سلمان', 'سليم', 'سليمان', 'سمعان', 'سميح', 'سنان', 'سند', 'سهل', 'سهم', - 'سيف', 'شادي', 'شافع', 'شاكر', 'شامل', 'شاهر', 'شرحبيل', 'شريف', 'شهاب', 'شهم', 'شوان', 'صادق', 'صافي', 'صالح', 'صخر', 'صدام', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صهيب', 'ضرار', 'ضرغام', 'ضياء', 'ضياء الدين’, ', 'طارق', 'طالب', 'طاهر', 'طلال', 'طه', 'عادل', 'عاصم', 'عاطف', + 'سيف', 'شادي', 'شافع', 'شاكر', 'شامل', 'شاهر', 'شرحبيل', 'شريف', 'شهاب', 'شهم', 'شوان', 'صادق', 'صافي', 'صالح', 'صخر', 'صدام', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صهيب', 'ضرار', 'ضرغام', 'ضياء', 'ضياء الدين', 'طارق', 'طالب', 'طاهر', 'طلال', 'طه', 'عادل', 'عاصم', 'عاطف', 'عامر', 'عايد', 'عبادة', 'عباس', 'عبد الباري', 'عبد الحافظ', 'عبد الحكيم', 'عبد الحليم', 'عبد الحميد', 'عبد الحي', 'عبد الرحمان', 'عبد الرحمن', 'عبد الرحيم', 'عبد الرزاق', 'عبد السلام', 'عبد السميع', 'عبد العزيز', 'عبد العفو', 'عبد الغني', 'عبد الفتاح', 'عبد القادر', 'عبد الكريم', 'عبد اللطيف', 'عبد الله', 'عبد المجيد', 'عبد المولى', 'عبد الناصر', 'عبد الهادي', 'عبد ربه', 'عبداالله', 'عبدالاله', 'عبدالباسط', 'عبدالجليل', 'عبدالجواد', 'عبدالحليم', 'عبدالحميد', 'عبدالرؤوف', 'عبدالرحمن', 'عبدالرحيم', 'عبدالرزاق', 'عبدالسلام', 'عبدالعزيز', 'عبدالفتاح', 'عبدالقادر', 'عبدالكريم', 'عبداللطيف', 'عبدالله', 'عبدالمجيد', 'عبدالمطلب', 'عبدالمعطي', 'عبدالمهيمن', 'عبدالناصر', 'عبدالهادي', 'عبدالوهاب', 'عبيدالله', 'عبيدة', 'عتيبه', 'عثمان', 'عدب', 'عدلي', 'عدنان', 'عدوان', 'عدي', 'عرار', 'عرمان', 'عروة', 'عريق', 'عرين', 'عز الدين', 'عزالدين', 'عزام', 'عزت', @@ -93,7 +93,7 @@ class Person extends \Faker\Provider\Person public static function idNumber() { $partialValue = static::numerify( - static::randomElement([1, 2]) . str_repeat('#', 8) + static::randomElement([1, 2]) . str_repeat('#', 8), ); return Luhn::generateLuhnNumber($partialValue); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/bg_BG/Payment.php b/vendor/fakerphp/faker/src/Faker/Provider/bg_BG/Payment.php index 9a772c8a..d7ed58b8 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/bg_BG/Payment.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/bg_BG/Payment.php @@ -40,7 +40,7 @@ class Payment extends \Faker\Provider\Payment '%s%d%d', $prefix, self::randomNumber(5, true), // workaround for mt_getrandmax() limitation - self::randomNumber(self::randomElement([4, 5]), true) + self::randomNumber(self::randomElement([4, 5]), true), ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php index 6e2bab13..f0bca49e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php @@ -28,7 +28,7 @@ class Person extends \Faker\Provider\Person protected static $firstNameMale = [ 'Adam', 'Aleš', 'Alois', 'Antonín', 'Bohumil', 'Bohuslav', 'Dagmar', 'Dalibor', 'Daniel', 'David', 'Dominik', 'Dušan', 'Eduard', 'Emil', - 'Filip', 'František', 'Ilona', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', + 'Filip', 'František', 'Igor', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', 'Jaromír', 'Jaroslav', 'Jindřich', 'Jiří', 'Josef', 'Jozef', 'Kamil', 'Karel', 'Kryštof', 'Ladislav', 'Libor', 'Lubomír', 'Luboš', 'Luděk', 'Ludvík', 'Lukáš', 'Marcel', 'Marek', 'Martin', 'Matěj', 'Matyáš', @@ -438,8 +438,8 @@ class Person extends \Faker\Provider\Person $gender = $this->generator->boolean() ? static::GENDER_MALE : static::GENDER_FEMALE; } - $startTimestamp = strtotime("-${maxAge} year"); - $endTimestamp = strtotime("-${minAge} year"); + $startTimestamp = strtotime(sprintf('-%d year', $maxAge)); + $endTimestamp = strtotime(sprintf('-%d year', $minAge)); $randTimestamp = self::numberBetween($startTimestamp, $endTimestamp); $year = (int) (date('Y', $randTimestamp)); @@ -451,6 +451,7 @@ class Person extends \Faker\Provider\Person if ($gender == static::GENDER_FEMALE) { $month += 50; } + // from year 2004 everyone has +20 to month when birth numbers in one day are exhausted if ($year >= 2004 && $this->generator->boolean(10)) { $month += 20; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/da_DK/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/da_DK/Person.php index fa1e89c6..732afeb2 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/da_DK/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/da_DK/Person.php @@ -36,7 +36,7 @@ class Person extends \Faker\Provider\Person * @var array Danish first names. */ protected static $firstNameMale = [ - 'Aage', 'Adam', 'Adolf', 'Ahmad', 'Ahmed', 'Aksel', 'Albert', 'Alex', 'Alexander', 'Alf', 'Alfred', 'Ali', 'Allan', + 'Aage', 'Adam', 'Ahmad', 'Ahmed', 'Aksel', 'Albert', 'Alex', 'Alexander', 'Alf', 'Alfred', 'Ali', 'Allan', 'Anders', 'Andreas', 'Anker', 'Anton', 'Arne', 'Arnold', 'Arthur', 'Asbjørn', 'Asger', 'August', 'Axel', 'Benjamin', 'Benny', 'Bent', 'Bernhard', 'Birger', 'Bjarne', 'Bjørn', 'Bo', 'Brian', 'Bruno', 'Børge', 'Carl', 'Carlo', 'Carsten', 'Casper', 'Charles', 'Chris', 'Christian', 'Christoffer', 'Christopher', 'Claus', 'Dan', 'Daniel', 'David', 'Dennis', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/de_CH/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/de_CH/Person.php index 9910b127..d3ead307 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/de_CH/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/de_CH/Person.php @@ -8,7 +8,7 @@ class Person extends \Faker\Provider\de_DE\Person * @see http://www.bfs.admin.ch/bfs/portal/de/index/themen/01/02/blank/dos/prenoms/02.html */ protected static $firstNameMale = [ - 'Adolf', 'Adrian', 'Alain', 'Albert', 'Alessandro', 'Alex', 'Alexander', 'Alfred', 'Ali', 'Alois', 'Andrea', 'Andreas', 'Andrin', 'André', 'Angelo', 'Anton', 'Antonio', 'Armin', 'Arnold', 'Arthur', + 'Adrian', 'Alain', 'Albert', 'Alessandro', 'Alex', 'Alexander', 'Alfred', 'Ali', 'Alois', 'Andrea', 'Andreas', 'Andrin', 'André', 'Angelo', 'Anton', 'Antonio', 'Armin', 'Arnold', 'Arthur', 'Beat', 'Benjamin', 'Bernhard', 'Bruno', 'Carlo', 'Carlos', 'Christian', 'Christoph', 'Claudio', 'Cyrill', 'Cédric', 'Damian', 'Daniel', 'Dario', 'David', 'Denis', 'Diego', 'Dieter', 'Dominic', 'Dominik', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/de_DE/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/de_DE/Person.php index 45a0c2e6..44f205e0 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/de_DE/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/de_DE/Person.php @@ -31,7 +31,7 @@ class Person extends \Faker\Provider\Person * {@link} From https://de.wiktionary.org/wiki/Verzeichnis:Deutsch/Namen/die_h%C3%A4ufigsten_m%C3%A4nnlichen_Vornamen_Deutschlands */ protected static $firstNameMale = [ - 'Achim', 'Adalbert', 'Adam', 'Adolf', 'Adrian', 'Ahmed', 'Ahmet', 'Albert', 'Albin', 'Albrecht', 'Alex', 'Alexander', 'Alfons', 'Alfred', 'Ali', 'Alois', 'Aloys', 'Alwin', 'Anatoli', 'Andre', 'Andreas', 'Andree', 'Andrej', 'Andrzej', 'André', 'Andy', 'Angelo', 'Ansgar', 'Anton', 'Antonio', 'Antonius', 'Armin', 'Arnd', 'Arndt', 'Arne', 'Arno', 'Arnold', 'Arnulf', 'Arthur', 'Artur', 'August', 'Axel', + 'Achim', 'Adalbert', 'Adam', 'Adrian', 'Ahmed', 'Ahmet', 'Albert', 'Albin', 'Albrecht', 'Alex', 'Alexander', 'Alfons', 'Alfred', 'Ali', 'Alois', 'Aloys', 'Alwin', 'Anatoli', 'Andre', 'Andreas', 'Andree', 'Andrej', 'Andrzej', 'André', 'Andy', 'Angelo', 'Ansgar', 'Anton', 'Antonio', 'Antonius', 'Armin', 'Arnd', 'Arndt', 'Arne', 'Arno', 'Arnold', 'Arnulf', 'Arthur', 'Artur', 'August', 'Axel', 'Bastian', 'Benedikt', 'Benjamin', 'Benno', 'Bernard', 'Bernd', 'Berndt', 'Bernhard', 'Bert', 'Berthold', 'Bertram', 'Björn', 'Bodo', 'Bogdan', 'Boris', 'Bruno', 'Burghard', 'Burkhard', 'Carl', 'Carlo', 'Carlos', 'Carsten', 'Christian', 'Christof', 'Christoph', 'Christopher', 'Christos', 'Claudio', 'Claus', 'Claus-Dieter', 'Claus-Peter', 'Clemens', 'Cornelius', 'Daniel', 'Danny', 'Darius', 'David', 'Denis', 'Dennis', 'Detlef', 'Detlev', 'Dierk', 'Dieter', 'Diethard', 'Diethelm', 'Dietmar', 'Dietrich', 'Dimitri', 'Dimitrios', 'Dirk', 'Domenico', 'Dominik', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/de_DE/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/de_DE/PhoneNumber.php index 637f6683..610ae8e2 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/de_DE/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/de_DE/PhoneNumber.php @@ -4,21 +4,124 @@ namespace Faker\Provider\de_DE; class PhoneNumber extends \Faker\Provider\PhoneNumber { + /** + * @var array + */ + protected static $areaCodeRegexes = [ + 2 => '(0[0-389]|0[4-6][1-68]|1[124]|1[0-9][0-9]|2[18]|2[0-9][1-9]|3[14]|3[0-35-9][0-9]|4[1]|4[02-8][0-9]|5[1]|5[02-9][0-9]|6[1]|6[02-9][0-9]|7[1]|7[2-7][0-9]|8[1]|8[02-7][0-9]|9[1]|9[02-9][0-9])', + 3 => '(0|3[15]|3[02-46-9][1-9]|3[02-46-9][02-9][0-9]|4[015]|4[2-4679][1-8]|4[2-4679][02-9][0-9]|5[15]|5[02-46-9][1-9]|5[02-46-9][02-9][0-9]|6[15]|6[02-46-9][1-9]|6[02-46-9][02-9][0-9]|7[15]|7[2-467][1-7]|7[2-467][02-689][0-9]|8[15]|8[2-46-8][013-9]|8[2-46-8][02-9][0-9]|9[15]|9[02-46-9][1-9]|9[02-46-9][02-9][0-9])', + 4 => '(0|1[02-9][0-9]|2[1]|2[02-9][0-9]|3[1]|3[02-9][0-9]|4[1]|4[0-9][0-9]|5[1]|5[02-6][0-9]|6[1]|6[02-8][0-9]|7[1]|7[02-79][0-9]|8[1]|8[02-9][0-9]|9[1]|9[02-7][0-9])', + 5 => '(0[2-8][0-9]|1[1]|1[02-9][0-9]|2[1]|2[02-9][1-9]|3[1]|3[02-8][0-9]|4[1]|4[02-9][1-9]|5[1]|5[02-9][0-9]|6[1]|6[02-9][0-9]|7[1]|7[02-7][1-9]|8[1]|8[02-8][0-9]|9[1]|9[0-7][1-9])', + 6 => '(0[02-9][0-9]|1[1]|1[02-9][0-9]|2[1]|2[02-9][0-9]|3[1]|3[02-9][0-9]|4[1]|4[0-8][0-9]|5[1]|5[02-9][0-9]|6[1]|6[2-9][0-9]|7[1]|7[02-8][1-9]|8[1]|8[02-9][1-9]|9)', + 7 => '(0[2-8][1-6]|1[1]|1[2-9][0-9]|2[1]|2[0-7][0-9]|3[1]|3[02-9][0-9]|4[1]|4[0-8][0-9]|5[1]|5[02-8][0-9]|6[1]|6[02-8][0-9]|7[1]|7[02-7][0-9]|8[1]|8[02-5][1-9]|9[1]|9[03-7][0-9])', + 8 => '(0[2-9][0-9]|1[1]|1[02-79][0-9]|2[1]|2[02-9][0-9]|3[1]|3[02-9][0-9]|4[1]|4[02-6][0-9]|5[1]|5[02-9][0-9]|6[1]|6[2-8][0-9]|7[1]|7[02-8][1-9]|8[1]|8[02-6][0-9]|9)', + 9 => '(0[6]|0[07-9][0-9]|1[1]|1[02-9][0-9]|2[1]|2[02-9][0-9]|3[1]|3[02-9][0-9]|4[1]|4[02-9][0-9]|5[1]|5[02-7][0-9]|6[1]|6[02-8][1-9]|7[1]|7[02-467][0-9]|8[1]|8[02-7][0-9]|9[1]|9[02-7][0-9])', + ]; + + /** + * @see https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers#Germany + * @see https://www.itu.int/oth/T0202000051/en + * @see https://en.wikipedia.org/wiki/Telephone_numbers_in_Germany + */ protected static $formats = [ - '+49(0)##########', - '+49(0)#### ######', - '+49 (0) #### ######', - '+49(0) #########', - '+49(0)#### #####', - '0##########', - '0#########', - '0#### ######', - '0#### #####', - '(0####) ######', - '(0####) #####', + // International format + '+49 {{areaCode}} #######', + '+49 {{areaCode}} ### ####', + '+49 (0{{areaCode}}) #######', + '+49 (0{{areaCode}}) ### ####', + '+49{{areaCode}}#######', + '+49{{areaCode}}### ####', + + // Standard formats + '0{{areaCode}} ### ####', + '0{{areaCode}} #######', + '(0{{areaCode}}) ### ####', + '(0{{areaCode}}) #######', ]; protected static $e164Formats = [ - '+49##########', + '+49{{areaCode}}#######', ]; + + /** + * @see https://en.wikipedia.org/wiki/Toll-free_telephone_number + */ + protected static $tollFreeAreaCodes = [ + 800, + ]; + + protected static $tollFreeFormats = [ + // Standard formats + '0{{tollFreeAreaCode}} ### ####', + '(0{{tollFreeAreaCode}}) ### ####', + '+49{{tollFreeAreaCode}} ### ####', + ]; + + public function tollFreeAreaCode() + { + return self::randomElement(static::$tollFreeAreaCodes); + } + + public function tollFreePhoneNumber() + { + $format = self::randomElement(static::$tollFreeFormats); + + return self::numerify($this->generator->parse($format)); + } + + protected static $mobileCodes = [ + 1511, 1512, 1514, 1515, 1516, 1517, + 1520, 1521, 1522, 1523, 1525, 1526, 1529, + 1570, 1573, 1575, 1577, 1578, 1579, + 1590, + ]; + + protected static $mobileFormats = [ + '+49{{mobileCode}}#######', + '+49 {{mobileCode}} ### ####', + '0{{mobileCode}}#######', + '0{{mobileCode}} ### ####', + '0 {{mobileCode}} ### ####', + ]; + + /** + * @see https://en.wikipedia.org/wiki/List_of_dialling_codes_in_Germany + * + * @return string + */ + public static function areaCode() + { + $firstDigit = self::numberBetween(2, 9); + + return $firstDigit . self::regexify(self::$areaCodeRegexes[$firstDigit]); + } + + /** + * Generate a code for a mobile number. + * + * @internal Used to generate mobile numbers. + * + * @return string + */ + public static function mobileCode() + { + return static::randomElement(static::$mobileCodes); + } + + /** + * Generate a mobile number. + * + * @example A mobile number: '015111234567' + * @example A mobile number with spaces: '01511 123 4567' + * @example A mobile number with international code prefix: '+4915111234567' + * @example A mobile number with international code prefix and spaces: '+49 1511 123 4567' + * + * @return string + */ + public function mobileNumber() + { + return ltrim(static::numerify($this->generator->parse( + static::randomElement(static::$mobileFormats), + ))); + } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/el_GR/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/el_GR/Person.php index 46554375..26a259e6 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/el_GR/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/el_GR/Person.php @@ -126,7 +126,7 @@ class Person extends \Faker\Provider\Person 'Αγγελίδης', 'Αγγελόπουλος', 'Αθανασιάδης', 'Αλαφούζος', 'Αλεβίζος', 'Αλεξόπουλος', 'Αλιβιζάτος', 'Αναγνωστόπουλος', 'Αναστασιάδης', 'Αναστασίου', 'Ανδρεάδης', 'Αντωνιάδης', 'Αντωνόπουλος', 'Αποστολόπουλος', 'Αξιώτης', 'Βαρουξής', 'Βασιλείου', 'Βασιλόπουλος', 'Βενιζέλος', 'Βέργας', 'Βιτάλης', 'Βούλγαρης', 'Γαλάνης', 'Γερμανός', 'Γεωργίου', 'Γεωργιάδης', 'Γιάγκος', 'Γιαννόπουλος', 'Γιαννακόπουλος', 'Γιάνναρης', 'Γούσιος', 'Γρηγοριάδης', 'Δασκαλόπουλος', 'Δελής', 'Διαμαντόπουλος', 'Δημητριάδης', 'Δουρέντης', 'Ελευθερόπουλος', 'Ελευθεριάδης', 'Ευθυμιάδης', 'Ευσταθιάδης', 'Ευταξίας', 'Ζαχαριάδης', 'Ζερβός', 'Ζωγραφός', - 'Ηλιάδης', 'Ηλιόπουλος', 'Θεοτόκης', 'Θεωδωρόπουλος', 'Θεωδώρου', 'Θεωδωρίδης', 'Ιατρίδης', 'Ιωαννίδης', 'Καλύβας', 'Καραβίας', 'Καννελόπουλος', 'Καραγιάννης', 'Κεδίκογλου', 'Κολιάτσος', 'Κόκκινος', 'Κομνηνός', + 'Ηλιάδης', 'Ηλιόπουλος', 'Θεοτόκης', 'Θεοδωρόπουλος', 'Θεοδώρου', 'Θεοδωρίδης', 'Ιατρίδης', 'Ιωαννίδης', 'Καλύβας', 'Καραβίας', 'Καννελόπουλος', 'Καραγιάννης', 'Κεδίκογλου', 'Κολιάτσος', 'Κόκκινος', 'Κομνηνός', 'Κοντολέων', 'Κοντός', 'Κόρακας', 'Κορομηλάς', 'Κορωναίος', 'Κοσμόπουλος', 'Κουταλιανός', 'Κυπραίος', 'Κωνσταντίνου', 'Κωνσταντινίδης', 'Κωνσταντόπουλος', 'Κωστόπουλος', 'Κρητικός', 'Κυριακόπουλος', 'Λαμέρας', 'Λαμπρόπουλος', 'Λούλης', 'Μακρής', 'Μανιάκης', 'Μαρκόπουλος', 'Μαυρλίδης', 'Μεταξάς', 'Μιχαηλίδης', 'Μπλέτσας', 'Νικολαΐδης', 'Νικολάκος', 'Νικολόπουλος', 'Ξανθόπουλος', 'Ξένος', 'Οικονομίδης', 'Ουζουνίδης', 'Παναγιωτίδης', 'Πανταζής', 'Παπαγεωργίου', 'Παπάγος', 'Παπαδάκης', 'Παπαδόπουλος', 'Παπάζογλου', 'Παπακώστας', 'Παπανδρέου', 'Παπανικολάου', 'Παπαντωνίου', 'Παπαστεφάνου', 'Παπαφιλίππου', 'Παπαϊωάννου', 'Παππάς', @@ -136,8 +136,8 @@ class Person extends \Faker\Provider\Person protected static $lastNameFemale = [ 'Αγγελίδου', 'Αγγελοπούλου', 'Αλεξάνδρου', 'Αλεξάνδρου', 'Αλεξίου', 'Αναγνώστου', 'Αναστασίου', 'Ανδρέου', 'Αντωνοπούλου', 'Ανυφαντή', 'Ανυφαντή', 'Αργυρού', 'Βαριμπόμπη', 'Βιτάλη', 'Γάσπαρη', 'Γαλάνη', 'Γεννήτη', - 'Γερμανού', 'Γεωγιάδου', 'Γεωργίβαλου', 'Γεωργίου', 'Γιακουμή', 'Γιαννακοπούλου', 'Γρηγοριάδου', 'Δασκαλοπούλου', 'Διδασκάλου', 'Δημητριάδου', 'Ελευθερίου', 'Ευθυμιάδου', 'Ηλιοπούλου', 'Θεοτόκου', 'Θεωδωροπούλου', - 'Θεωδώρου', 'Θεωδωρίδου', 'Ιωάννου', 'Καπετανάκη', 'Καπνού', 'Καρσιβάνη', 'Κοκκίνου', 'Κωνσταντινίδου', 'Κωνσταντίνου', 'Κυριακοπούλου', 'Λάσκαρη', 'Λασκαρού', 'Μάκρη', 'Μακρή', 'Μοραΐτη', 'Μπόγρη', 'Μυλωνά', + 'Γερμανού', 'Γεωγιάδου', 'Γεωργίβαλου', 'Γεωργίου', 'Γιακουμή', 'Γιαννακοπούλου', 'Γρηγοριάδου', 'Δασκαλοπούλου', 'Διδασκάλου', 'Δημητριάδου', 'Ελευθερίου', 'Ευθυμιάδου', 'Ηλιοπούλου', 'Θεοτόκου', 'Θεοδωροπούλου', + 'Θεοδώρου', 'Θεοδωρίδου', 'Ιωάννου', 'Καπετανάκη', 'Καπνού', 'Καρσιβάνη', 'Κοκκίνου', 'Κωνσταντινίδου', 'Κωνσταντίνου', 'Κυριακοπούλου', 'Λάσκαρη', 'Λασκαρού', 'Μάκρη', 'Μακρή', 'Μοραΐτη', 'Μπόγρη', 'Μυλωνά', 'Νικολάου', 'Νικολοπούλου', 'Ξανθοπούλου', 'Οικονομίδου', 'Οικονομοπούλου', 'Οικονόμου', 'Παπαδοπούλου', 'Παπακιρίσκου', 'Παπακωνσταντίνου', 'Παπαμάρκου', 'Παπαστάμου', 'Ράφτη', 'Σακελλαρίου', 'Σελινά', 'Σκουτέρη', 'Σπανού', 'Σταματιάδου', 'Σωπολιάτη', 'Τριανταφυλλίδου', 'Φοσκιά', 'Φωτιάδου', 'Χαραλαμπίδου', 'Χατζηιωάννου', ]; @@ -164,7 +164,7 @@ class Person extends \Faker\Provider\Person } /** - * @example 'Θεωδωρόπουλος' + * @example 'Θεοδωρόπουλος' */ public static function lastNameMale() { diff --git a/vendor/fakerphp/faker/src/Faker/Provider/el_GR/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/el_GR/PhoneNumber.php index 6fe5000e..53032487 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/el_GR/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/el_GR/PhoneNumber.php @@ -158,7 +158,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public static function areaCode() { return static::numerify( - str_pad(static::randomElement(static::$areaCodes), 4, '#') + str_pad(static::randomElement(static::$areaCodes), 4, '#'), ); } @@ -182,7 +182,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function fixedLineNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$fixedLineFormats) + static::randomElement(static::$fixedLineFormats), ))); } @@ -211,7 +211,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function mobileNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$mobileFormats) + static::randomElement(static::$mobileFormats), ))); } @@ -224,7 +224,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber strtr(static::randomElement(static::$mobileFormats), [ '{{internationalCodePrefix}}' => static::internationalCodePrefix(), '{{mobileCode}}' => static::mobileCode(), - ]) + ]), ); } @@ -241,7 +241,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function personalNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$personalFormats) + static::randomElement(static::$personalFormats), ))); } @@ -260,7 +260,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber return ltrim(static::numerify( strtr(static::randomElement(static::$tollFreeFormats), [ '{{internationalCodePrefix}}' => static::internationalCodePrefix(), - ]) + ]), )); } @@ -289,7 +289,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function sharedCostNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$sharedCostFormats) + static::randomElement(static::$sharedCostFormats), ))); } @@ -318,7 +318,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber public function premiumRateNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$premiumRateFormats) + static::randomElement(static::$premiumRateFormats), ))); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_CA/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/en_CA/Address.php index 5d9bd58d..4e9aa507 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_CA/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_CA/Address.php @@ -64,8 +64,8 @@ class Address extends \Faker\Provider\en_US\Address { $string = static::randomElement(static::$postcode); - $string = preg_replace_callback('/\#/u', 'static::randomDigit', $string); - $string = preg_replace_callback('/\?/u', 'static::randomPostcodeLetter', $string); + $string = preg_replace_callback('/\#/u', [static::class, 'randomDigit'], $string); + $string = preg_replace_callback('/\?/u', [static::class, 'randomPostcodeLetter'], $string); return static::toUpper($string); } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_GB/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/en_GB/Company.php index e00b34c1..17fe07da 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_GB/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_GB/Company.php @@ -21,7 +21,6 @@ class Company extends \Faker\Provider\Company public static function vat(string $type = null): string { switch ($type) { - case static::VAT_TYPE_BRANCH: return static::generateBranchTraderVatNumber(); @@ -33,7 +32,6 @@ class Company extends \Faker\Provider\Company default: return static::generateStandardVatNumber(); - } } @@ -55,7 +53,7 @@ class Company extends \Faker\Provider\Company static::VAT_PREFIX, $firstBlock, $secondBlock, - static::calculateModulus97($firstBlock . $secondBlock) + static::calculateModulus97($firstBlock . $secondBlock), ); } @@ -68,7 +66,7 @@ class Company extends \Faker\Provider\Company return sprintf( '%sHA%d', static::VAT_PREFIX, - static::numberBetween(500, 999) + static::numberBetween(500, 999), ); } @@ -81,7 +79,7 @@ class Company extends \Faker\Provider\Company return sprintf( '%s %d', static::generateStandardVatNumber(), - static::randomNumber(3, true) + static::randomNumber(3, true), ); } @@ -94,7 +92,7 @@ class Company extends \Faker\Provider\Company return sprintf( '%sGD%s', static::VAT_PREFIX, - str_pad((string) static::numberBetween(0, 499), 3, '0', STR_PAD_LEFT) + str_pad((string) static::numberBetween(0, 499), 3, '0', STR_PAD_LEFT), ); } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php index ee72fca9..8cab28a9 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php @@ -15,7 +15,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'blockchain', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Person.php index 3c6f99a4..5cd22d43 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Person.php @@ -27,7 +27,7 @@ class Person extends \Faker\Provider\Person ]; protected static $firstNameMale = [ - 'Aaron', 'Abdiel', 'Abdul', 'Abdullah', 'Abe', 'Abel', 'Abelardo', 'Abner', 'Abraham', 'Adalberto', 'Adam', 'Adan', 'Adelbert', 'Adolf', 'Adolfo', 'Adolph', 'Adolphus', 'Adonis', 'Adrain', 'Adrian', 'Adriel', 'Adrien', 'Afton', 'Agustin', 'Ahmad', 'Ahmed', 'Aidan', 'Aiden', 'Akeem', 'Al', 'Alan', 'Albert', 'Alberto', 'Albin', 'Alden', 'Alec', 'Alejandrin', 'Alek', 'Alessandro', 'Alex', 'Alexander', 'Alexandre', 'Alexandro', 'Alexie', 'Alexis', 'Alexys', 'Alexzander', 'Alf', 'Alfonso', 'Alfonzo', 'Alford', 'Alfred', 'Alfredo', 'Ali', 'Allan', 'Allen', 'Alphonso', 'Alvah', 'Alvis', 'Amani', 'Amari', 'Ambrose', 'Americo', 'Amir', 'Amos', 'Amparo', 'Anastacio', 'Anderson', 'Andre', 'Andres', 'Andrew', 'Andy', 'Angel', 'Angelo', 'Angus', 'Anibal', 'Ansel', 'Ansley', 'Anthony', 'Antone', 'Antonio', 'Antwan', 'Antwon', 'Arch', 'Archibald', 'Arden', 'Arely', 'Ari', 'Aric', 'Ariel', 'Arjun', 'Arlo', 'Armand', 'Armando', 'Armani', 'Arnaldo', 'Arne', 'Arno', 'Arnold', 'Arnoldo', 'Arnulfo', 'Aron', 'Art', 'Arthur', 'Arturo', 'Arvel', 'Arvid', 'Ashton', 'August', 'Augustus', 'Aurelio', 'Austen', 'Austin', 'Austyn', 'Avery', 'Axel', 'Ayden', + 'Aaron', 'Abdiel', 'Abdul', 'Abdullah', 'Abe', 'Abel', 'Abelardo', 'Abner', 'Abraham', 'Adalberto', 'Adam', 'Adan', 'Adelbert', 'Adolfo', 'Adolphus', 'Adonis', 'Adrain', 'Adrian', 'Adriel', 'Adrien', 'Afton', 'Agustin', 'Ahmad', 'Ahmed', 'Aidan', 'Aiden', 'Akeem', 'Al', 'Alan', 'Albert', 'Alberto', 'Albin', 'Alden', 'Alec', 'Alejandrin', 'Alek', 'Alessandro', 'Alex', 'Alexander', 'Alexandre', 'Alexandro', 'Alexie', 'Alexis', 'Alexys', 'Alexzander', 'Alf', 'Alfonso', 'Alfonzo', 'Alford', 'Alfred', 'Alfredo', 'Ali', 'Allan', 'Allen', 'Alphonso', 'Alvah', 'Alvis', 'Amani', 'Amari', 'Ambrose', 'Americo', 'Amir', 'Amos', 'Amparo', 'Anastacio', 'Anderson', 'Andre', 'Andres', 'Andrew', 'Andy', 'Angel', 'Angelo', 'Angus', 'Anibal', 'Ansel', 'Ansley', 'Anthony', 'Antone', 'Antonio', 'Antwan', 'Antwon', 'Arch', 'Archibald', 'Arden', 'Arely', 'Ari', 'Aric', 'Ariel', 'Arjun', 'Arlo', 'Armand', 'Armando', 'Armani', 'Arnaldo', 'Arne', 'Arno', 'Arnold', 'Arnoldo', 'Arnulfo', 'Aron', 'Art', 'Arthur', 'Arturo', 'Arvel', 'Arvid', 'Ashton', 'August', 'Augustus', 'Aurelio', 'Austen', 'Austin', 'Austyn', 'Avery', 'Axel', 'Ayden', 'Bailey', 'Barney', 'Baron', 'Barrett', 'Barry', 'Bart', 'Bartholome', 'Barton', 'Baylee', 'Beau', 'Bell', 'Ben', 'Benedict', 'Benjamin', 'Bennett', 'Bennie', 'Benny', 'Benton', 'Bernard', 'Bernardo', 'Bernhard', 'Bernie', 'Berry', 'Berta', 'Bertha', 'Bertram', 'Bertrand', 'Bill', 'Billy', 'Blair', 'Blaise', 'Blake', 'Blaze', 'Bo', 'Bobbie', 'Bobby', 'Boris', 'Boyd', 'Brad', 'Braden', 'Bradford', 'Bradley', 'Bradly', 'Brady', 'Braeden', 'Brain', 'Brando', 'Brandon', 'Brandt', 'Brannon', 'Branson', 'Brant', 'Braulio', 'Braxton', 'Brayan', 'Brendan', 'Brenden', 'Brendon', 'Brennan', 'Brennon', 'Brent', 'Bret', 'Brett', 'Brian', 'Brice', 'Brock', 'Broderick', 'Brody', 'Brook', 'Brooks', 'Brown', 'Bruce', 'Bryce', 'Brycen', 'Bryon', 'Buck', 'Bud', 'Buddy', 'Buford', 'Burley', 'Buster', 'Cade', 'Caden', 'Caesar', 'Cale', 'Caleb', 'Camden', 'Cameron', 'Camren', 'Camron', 'Camryn', 'Candelario', 'Candido', 'Carey', 'Carleton', 'Carlo', 'Carlos', 'Carmel', 'Carmelo', 'Carmine', 'Carol', 'Carroll', 'Carson', 'Carter', 'Cary', 'Casey', 'Casimer', 'Casimir', 'Casper', 'Ceasar', 'Cecil', 'Cedrick', 'Celestino', 'Cesar', 'Chad', 'Chadd', 'Chadrick', 'Chaim', 'Chance', 'Chandler', 'Charles', 'Charley', 'Charlie', 'Chase', 'Chauncey', 'Chaz', 'Chelsey', 'Chesley', 'Chester', 'Chet', 'Chris', 'Christ', 'Christian', 'Christop', 'Christophe', 'Christopher', 'Cicero', 'Cielo', 'Clair', 'Clark', 'Claud', 'Claude', 'Clay', 'Clemens', 'Clement', 'Cleo', 'Cletus', 'Cleve', 'Cleveland', 'Clifford', 'Clifton', 'Clint', 'Clinton', 'Clovis', 'Cloyd', 'Clyde', 'Coby', 'Cody', 'Colby', 'Cole', 'Coleman', 'Colin', 'Collin', 'Colt', 'Colten', 'Colton', 'Columbus', 'Conner', 'Connor', 'Conor', 'Conrad', 'Constantin', 'Consuelo', 'Cooper', 'Corbin', 'Cordelia', 'Cordell', 'Cornelius', 'Cornell', 'Cortez', 'Cory', 'Coty', 'Coy', 'Craig', 'Crawford', 'Cristian', 'Cristina', 'Cristobal', 'Cristopher', 'Cruz', 'Cullen', 'Curt', 'Curtis', 'Cyril', 'Cyrus', 'Dagmar', 'Dale', 'Dallas', 'Dallin', 'Dalton', 'Dameon', 'Damian', 'Damien', 'Damion', 'Damon', 'Dan', 'Dane', 'D\'angelo', 'Dangelo', 'Danial', 'Danny', 'Dante', 'Daren', 'Darian', 'Darien', 'Dario', 'Darion', 'Darius', 'Daron', 'Darrel', 'Darrell', 'Darren', 'Darrick', 'Darrin', 'Darrion', 'Darron', 'Darryl', 'Darwin', 'Daryl', 'Dashawn', 'Dave', 'David', 'Davin', 'Davion', 'Davon', 'Davonte', 'Dawson', 'Dax', 'Dayne', 'Dayton', 'Dean', 'Deangelo', 'Declan', 'Dedric', 'Dedrick', 'Dee', 'Deion', 'Dejon', 'Dejuan', 'Delaney', 'Delbert', 'Dell', 'Delmer', 'Demarco', 'Demarcus', 'Demario', 'Demetrius', 'Demond', 'Denis', 'Dennis', 'Deon', 'Deondre', 'Deontae', 'Deonte', 'Dereck', 'Derek', 'Derick', 'Deron', 'Derrick', 'Deshaun', 'Deshawn', 'Desmond', 'Destin', 'Devan', 'Devante', 'Deven', 'Devin', 'Devon', 'Devonte', 'Devyn', 'Dewayne', 'Dewitt', 'Dexter', 'Diamond', 'Diego', 'Dillan', 'Dillon', 'Dimitri', 'Dino', 'Dion', 'Dock', 'Domenic', 'Domenick', 'Domenico', 'Domingo', 'Dominic', 'Don', 'Donald', 'Donato', 'Donavon', 'Donnell', 'Donnie', 'Donny', 'Dorcas', 'Dorian', 'Doris', 'Dorthy', 'Doug', 'Douglas', 'Doyle', 'Drake', 'Dudley', 'Duncan', 'Durward', 'Dustin', 'Dusty', 'Dwight', 'Dylan', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Company.php index 86a54321..6480c696 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Company.php @@ -20,7 +20,7 @@ class Company extends \Faker\Provider\Company '%s/%s/%s', \Faker\Provider\DateTime::dateTimeBetween('-50 years', 'now')->format('Y'), static::randomNumber(6, true), - static::randomElement(static::$legalEntities) + static::randomElement(static::$legalEntities), ); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php index df018d15..2d2b525e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php @@ -135,9 +135,8 @@ class Person extends \Faker\Provider\Person /** * @see https://en.wikipedia.org/wiki/National_identification_number#South_Africa * - * @param \DateTime $birthdate - * @param bool $citizen - * @param string $gender + * @param bool $citizen + * @param string $gender * * @return string */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php index f14d4467..bc6211cd 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php index 73bd3159..5d6dafec 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php @@ -22,7 +22,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php index ff9f50dc..96a1d13e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php index 328a44b2..bb1c24c0 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php @@ -91,8 +91,7 @@ class Person extends \Faker\Provider\Person * * @see http://www.finlex.fi/fi/laki/ajantasa/2010/20100128 * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYYCZZZQ, where DDMMYY is the date of birth, C the century sign, ZZZ the individual number and Q the control character (checksum) */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php index 5ca40ad9..d6dbb76c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php @@ -34,7 +34,11 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%', '%#', '%#', '%#', '%##']; - protected static $postcode = ['#####', '## ###']; + + /** + * @see https://en.wikipedia.org/wiki/Postal_codes_in_France + */ + protected static $postcode = ['#####']; protected static $country = [ 'Afghanistan', 'Afrique du sud', 'Albanie', 'Algérie', 'Allemagne', 'Andorre', 'Angola', 'Anguilla', 'Antarctique', 'Antigua et Barbuda', 'Antilles néerlandaises', 'Arabie saoudite', 'Argentine', 'Arménie', 'Aruba', 'Australie', 'Autriche', 'Azerbaïdjan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Belgique', 'Belize', 'Benin', 'Bermudes (Les)', 'Bhoutan', 'Biélorussie', 'Bolivie', 'Bosnie-Herzégovine', 'Botswana', 'Bouvet (Îles)', 'Brunei', 'Brésil', 'Bulgarie', 'Burkina Faso', 'Burundi', 'Cambodge', 'Cameroun', 'Canada', 'Cap Vert', 'Cayman (Îles)', 'Chili', 'Chine (Rép. pop.)', 'Christmas (Île)', 'Chypre', 'Cocos (Îles)', 'Colombie', 'Comores', 'Cook (Îles)', 'Corée du Nord', 'Corée, Sud', 'Costa Rica', 'Croatie', 'Cuba', 'Côte d\'Ivoire', 'Danemark', 'Djibouti', 'Dominique', 'Égypte', 'El Salvador', 'Émirats arabes unis', 'Équateur', 'Érythrée', 'Espagne', 'Estonie', 'États-Unis', 'Ethiopie', 'Falkland (Île)', 'Fidji (République des)', 'Finlande', 'France', 'Féroé (Îles)', 'Gabon', @@ -43,13 +47,13 @@ class Address extends \Faker\Provider\Address 'Territoire britannique de l\'océan Indien', 'Territoires français du sud', 'Thailande', 'Timor', 'Togo', 'Tokelau', 'Tonga', 'Trinité et Tobago', 'Tunisie', 'Turkménistan', 'Turks et Caïques (Îles)', 'Turquie', 'Tuvalu', 'Ukraine', 'Uruguay', 'Vanuatu', 'Vatican (Etat du)', 'Venezuela', 'Vierges (Îles)', 'Vierges britanniques (Îles)', 'Vietnam', 'Wallis et Futuna (Îles)', 'Yemen', 'Yougoslavie', 'Zambie', 'Zaïre', 'Zimbabwe', ]; + /** + * @see https://en.wikipedia.org/wiki/Regions_of_France + */ private static $regions = [ - 'Alsace', 'Aquitaine', 'Auvergne', 'Bourgogne', 'Bretagne', 'Centre', 'Champagne-Ardenne', - 'Corse', 'Franche-Comté', 'Île-de-France', 'Languedoc-Roussillon', 'Limousin', - 'Lorraine', 'Midi-Pyrénées', 'Nord-Pas-de-Calais', 'Basse-Normandie', 'Haute-Normandie', - 'Pays-de-Loire', 'Picardie', 'Poitou-Charentes', "Provence-Alpes-Côte d'Azur", 'Rhone-Alpes', - 'Guadeloupe', 'Martinique', 'Guyane', 'Réunion', 'Saint-Pierre-et-Miquelon', 'Mayotte', - 'Saint-Barthélémy', 'Saint-Martin', 'Wallis-et-Futuna', 'Polynésie française', 'Nouvelle-Calédonie', + 'Auvergne-Rhône-Alpes', 'Bourgogne-Franche-Comté', 'Bretagne', 'Centre-Val de Loire', 'Corse', 'Grand Est', 'Hauts-de-France', + 'Île-de-France', 'Normandie', 'Nouvelle-Aquitaine', 'Occitanie', 'Pays de la Loire', "Provence-Alpes-Côte d'Azur", + 'Guadeloupe', 'Martinique', 'Guyane', 'La Réunion', 'Mayotte', ]; private static $departments = [ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php index fcc142da..0a659aa7 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Company.php @@ -173,6 +173,7 @@ class Company extends \Faker\Provider\Company /** * @see http://www.pole-emploi.fr/candidat/le-code-rome-et-les-fiches-metiers-@/article.jspz?id=60702 + * * @note Randomly took 300 from this list */ protected static $jobTitleFormat = [ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/PhoneNumber.php index 292c546f..69c681d9 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/PhoneNumber.php @@ -70,7 +70,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber ]; protected static $e164Formats = [ - '+33##########', + '+33#########', ]; public function phoneNumber07() diff --git a/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Company.php index ccda8aac..75931991 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Company.php @@ -9,5 +9,5 @@ class Company extends \Faker\Provider\Company '{{lastName}}', ]; - protected static $companySuffix = ['Kft', 'és Tsa', 'Kht', 'ZRT', 'NyRT', 'BT']; + protected static $companySuffix = ['Kft.', 'és Tsa', 'Kht', 'Zrt.', 'Nyrt.', 'Bt.']; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Person.php index 70e64a28..76d84be0 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/hu_HU/Person.php @@ -2,6 +2,11 @@ namespace Faker\Provider\hu_HU; +/** + * More info about the hungarian names and hungarian name abbreviations can be found here: + * + * @see https://en.wikipedia.org/wiki/Hungarian_names and https://en.wiktionary.org/wiki/Category:Hungarian_abbreviations + */ class Person extends \Faker\Provider\Person { protected static $maleNameFormats = [ @@ -16,9 +21,11 @@ class Person extends \Faker\Provider\Person '{{title}} {{lastName}} {{firstNameFemale}}', '{{lastName}} {{firstNameFemale}} {{suffix}}', '{{title}} {{lastName}} {{firstNameFemale}} {{suffix}}', - // ..né + '{{lastNameFemaleMarried}} {{lastName}} {{firstNameFemale}}', + '{{title}} {{lastNameFemaleMarried}} {{firstNameFemale}}', '{{lastName}} {{firstNameMaleNe}}', '{{title}} {{lastName}} {{firstNameMaleNe}}', + '{{lastName}}-{{lastName}} {{firstNameFemale}}', ]; protected static $firstNameMale = [ @@ -35,6 +42,19 @@ class Person extends \Faker\Provider\Person 'Benedekné', 'Hunorné', 'Jenőné', 'Jánosné', 'Mihályné', 'Mátyásné', 'Szervácné', 'Zsomborné', 'Zétényné', 'Árpádné', ]; + protected static $lastNameFemaleMarried = [ + 'Antalné', 'Bakosné', 'Balláné', 'Balogné', 'Baloghné', 'Balázsné', 'Barnáné', 'Bartáné', 'Biróné', 'Bodnárné', + 'Bogdánné', 'Bognárné', 'Borbélyné', 'Borosné', 'Budainé', 'Bálintné', 'Csonkáné', 'Deákné', 'Dobosné', 'Dudásné', + 'Faragóné', 'Farkasné', 'Fazekasné', 'Fehérné', 'Feketéné', 'Fodorné', 'Fábiánné', 'Fülöpné', 'Gulyásné', 'Gálné', + 'Gáspárné', 'Hajdúné', 'Halászné', 'Hegedűsné', 'Horváthné', 'Illésné', 'Jakabné', 'Juhászné', 'Jónásné', 'Katonáné', + 'Kelemenné', 'Kerekesné', 'Királyné', 'Kisné', 'Kissné', 'Kocsisné', 'Kovácsné', 'Kozmané', 'Lakatosné', 'Lengyelné', + 'Lukácsné', 'Lászlóné', 'Magyarné', 'Majorné', 'Molnárné', 'Máténé', 'Mészárosné', 'Nagyné', 'Nemesné', 'Novákné', + 'Némethné', 'Oláhné', 'Orbánné', 'Oroszné', 'Orsósné', 'Papné', 'Pappné', 'Patakiné', 'Pintérné', 'Pálné', 'Pásztorné', + 'Péterné', 'Ráczné', 'Simonné', 'Siposné', 'Somogyiné', 'Soósné', 'Szabóné', 'Szalainé', 'Szekeresné', 'Szilágyiné', + 'Székelyné', 'Szücsné', 'Szőkené', 'Szűcsné', 'Sándorné', 'Takácsné', 'Tamásné', 'Tóthné', 'Törökné', 'Vargáné', 'Vassné', + 'Veresné', 'Vinczéné', 'Virágné', 'Váradiné', 'Véghné', 'Vörösné', + ]; + protected static $firstNameFemale = [ 'Adél', 'Alexa', 'Andrea', 'Angéla', 'Anikó', 'Beatrix', 'Bettina', 'Dalma', 'Dorina', 'Dorottya', 'Evelin', 'Fanni', 'Flóra', 'Gabriella', 'Georgina', 'Gitta', 'Gizella', 'Gréta', 'Henrietta', 'Izabella', 'Johanna', 'Judit', 'Julianna', 'Jázmin', 'Kata', 'Katalin', @@ -48,25 +68,16 @@ class Person extends \Faker\Provider\Person 'Antal', 'Bakos', 'Balla', 'Balog', 'Balogh', 'Balázs', 'Barna', 'Barta', 'Biró', 'Bodnár', 'Bogdán', 'Bognár', 'Borbély', 'Boros', 'Budai', 'Bálint', 'Csonka', 'Deák', 'Dobos', 'Dudás', 'Faragó', 'Farkas', 'Fazekas', 'Fehér', 'Fekete', 'Fodor', 'Fábián', 'Fülöp', 'Gulyás', 'Gál', 'Gáspár', 'Hajdu', 'Halász', 'Hegedüs', 'Hegedűs', 'Horváth', 'Illés', 'Jakab', 'Juhász', 'Jónás', 'Katona', 'Kelemen', 'Kerekes', 'Király', 'Kis', 'Kiss', 'Kocsis', 'Kovács', 'Kozma', 'Lakatos', 'Lengyel', 'Lukács', 'László', 'Magyar', 'Major', 'Molnár', 'Máté', 'Mészáros', 'Nagy', 'Nemes', 'Novák', 'Németh', 'Oláh', 'Orbán', 'Orosz', 'Orsós', 'Pap', 'Papp', 'Pataki', 'Pintér', 'Pál', 'Pásztor', 'Péter', 'Rácz', 'Simon', 'Sipos', 'Somogyi', 'Soós', 'Szabó', 'Szalai', 'Szekeres', 'Szilágyi', 'Székely', 'Szücs', 'Szőke', 'Szűcs', 'Sándor', 'Takács', 'Tamás', 'Tóth', 'Török', 'Varga', 'Vass', 'Veres', 'Vincze', 'Virág', 'Váradi', 'Végh', 'Vörös', ]; - protected static $title = ['Dr.', 'Prof.', 'id.', 'ifj.']; + protected static $title = ['Dr.', 'Prof.', 'Id.', 'Ifj.', 'Báró', 'Gróf', 'Özv.']; + + protected static $titleFemale = ['Özv.', 'Dr.', 'Prof.']; + + protected static $titleMale = ['Dr.', 'Prof.', 'Id.', 'Ifj.', 'Báró', 'Gróf']; private static $suffix = ['PhD']; - public function title($gender = null) - { - return static::titleMale(); - } - /** - * replaced by specific unisex hungarian title - */ - public static function titleMale() - { - return static::randomElement(static::$title); - } - - /** - * specific Hungarian name format for females after marriage + * Specific Hungarian name format for females after marriage */ public static function firstNameMaleNe() { @@ -74,18 +85,17 @@ class Person extends \Faker\Provider\Person } /** - * replaced by specific unisex hungarian title - */ - public static function titleFemale() - { - return static::titleMale(); - } - - /** + * Replaced by specific suffix + * * @example 'PhD' */ public static function suffix() { return static::randomElement(static::$suffix); } + + public static function lastNameFemaleMarried() + { + return static::randomElement(static::$lastNameFemaleMarried); + } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Address.php index 1fb2270a..28dd845c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Address.php @@ -6,6 +6,7 @@ class Address extends \Faker\Provider\Address { /** * @see http://bandung.go.id/images/download/daftarruasjalan.htm + * @see https://id.wikipedia.org/wiki/Kategori:Jalan_di_Jakarta */ protected static $street = [ 'Abang', 'Abdul', 'Abdul Muis', 'Abdul Rahmat', 'Abdul. Muis', 'Abdullah', @@ -17,7 +18,7 @@ class Address extends \Faker\Provider\Address 'Bagonwoto ', 'Bah Jaya', 'Baha', 'Bahagia', 'Bahagia ', 'Baiduri', 'Baik', 'Baing', 'Baja', 'Baja Raya', 'Bak Air', 'Bak Mandi', 'Bakaru', 'Bakau', 'Bakau Griya Utama', - 'Bakhita', 'Bakin', 'Bakit ', 'Bakti', 'Baladewa', + 'Bakhita', 'Bakin', 'Bakit ', 'Bakti', 'Baladewa', 'Balikpapan', 'Bambon', 'Bambu', 'Banal', 'Banceng Pondok', 'Banda', 'Bank Dagang Negara', 'Bappenas', 'Bara', 'Bara Tambar', 'Baranang', 'Baranang Siang', 'Baranang Siang Indah', 'Baranangsiang', 'Barasak', 'Barat', @@ -32,7 +33,7 @@ class Address extends \Faker\Provider\Address 'Flora', 'Flores', 'Gading', 'Gajah', 'Gajah Mada', 'Gambang', 'Gardujati', 'Gatot Subroto', 'Gedebage Selatan', 'Gegerkalong Hilir', 'Gotong Royong', 'Gremet', 'HOS. Cjokroaminoto (Pasirkaliki)', 'Haji', 'Halim', - 'Hang', 'Hasanuddin', 'Honggowongso', 'Ikan', 'Imam', + 'Hang', 'Hasanuddin', 'Hayam Wuruk', 'Honggowongso', 'Ikan', 'Imam', 'Imam Bonjol', 'Industri', 'Ir. H. Juanda', 'Jagakarsa', 'Jakarta', 'Jaksa', 'Jambu', 'Jamika', 'Jayawijaya', 'Jend. A. Yani', 'Jend. Sudirman', 'Juanda', 'K.H. Maskur', 'K.H. Wahid Hasyim (Kopo)', 'Kali', @@ -45,7 +46,7 @@ class Address extends \Faker\Provider\Address 'Muwardi', 'Nakula', 'Nanas', 'Nangka', 'Orang', 'Otista', 'Otto', 'PHH. Mustofa', 'Pacuan Kuda', 'Padang', 'Padma', 'Pahlawan', 'Panjaitan', 'Pasir Koja', 'Pasirkoja', - 'Pasteur', 'Pattimura', 'Pelajar Pejuang 45', 'Perintis Kemerdekaan', 'Peta', + 'Pasteur', 'Pattimura', 'Pelajar Pejuang 45', 'Perintis Kemerdekaan', 'Peta', 'Pintu Besar Selatan', 'Qrisdoren', 'R.E. Martadinata', 'R.M. Said', 'Raden', 'Raden Saleh', 'Radio', 'Rajawali', 'Rajawali Barat', 'Rajawali Timur', 'Rajiman', 'Raya Setiabudhi', 'Raya Ujungberung', 'Reksoninten', 'Ronggowarsito', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Company.php index ffbf6e35..a4a8575c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/id_ID/Company.php @@ -14,7 +14,7 @@ class Company extends \Faker\Provider\Company /** * @see http://id.wikipedia.org/wiki/Jenis_badan_usaha */ - protected static $companyPrefix = ['PT', 'CV', 'UD', 'PD', 'Perum']; + protected static $companyPrefix = ['PT', 'Fa', 'CV', 'UD', 'PJ', 'PD', 'Perum', 'Yayasan']; /** * @see https://www.amesbostonhotel.com/macam-macam-profesi-pekerjaan/ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php index b9930ff8..efa9dd5e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php @@ -12,35 +12,35 @@ class Address extends \Faker\Provider\Address ]; protected static $postcode = ['#####']; protected static $state = [ - 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Carbonia-Iglesias', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Olbia-Tempio', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Medio Campidano', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Ogliastra', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', + 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Sud Sardegna', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', ]; protected static $stateAbbr = [ - 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'VS', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'OG', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', + 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'SU', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', ]; protected static $country = [ - 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', - 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', - 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isola di Cocos (Keeling)', 'Colombia', 'Comoros', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', - 'Danimarca', 'Gibuti', 'Repubblica Dominicana', - 'Equador', 'Egitto', 'El Salvador', 'Guinea Equatoriale', 'Eritrea', 'Estonia', 'Etiopia', - 'Isole Faroe', 'Isole Falkland (Malvinas)', 'Fiji', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del sud', - 'Gabon', 'Gambia', 'Georgia', 'Germania', 'Ghana', 'Gibilterra', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', - 'Haiti', 'Heard Island and McDonald Islands', 'Città del Vaticano', 'Honduras', 'Hong Kong', 'Ungheria', - 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Isola di Man', 'Israele', 'Italia', - 'Giamaica', 'Giappone', 'Jersey', 'Giordania', - 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Kuwait', 'Republicca Kirgiza', - 'Repubblica del Laos', 'Latvia', 'Libano', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lituania', 'Lussemburgo', - 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', - 'Namibia', 'Nauru', 'Nepal', 'Antille Olandesi', 'Olanda', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Northern Mariana Islands', 'Norvegia', - 'Oman', - 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Filippine', 'Pitcairn Islands', 'Polonia', 'Portogallo', 'Porto Rico', + 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Antille Olandesi', 'Arabia Saudita', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', + 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Isola Bouvet', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', + 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isole Cocos', 'Colombia', 'Comore', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', + 'Danimarca', 'Repubblica Dominicana', + 'Equador', 'Egitto', 'El Salvador', 'Emirati Arabi Uniti', 'Eritrea', 'Estonia', 'Eswatini', 'Etiopia', + 'Isole Faroe', 'Isole Falkland', 'Fiji', 'Filippine', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del Sud', + 'Gabon', 'Gambia', 'Georgia', 'Georgia del Sud e Isole Sandwich Australi', 'Germania', 'Ghana', 'Giamaica', 'Giappone', 'Gibilterra', 'Gibuti', 'Giordania', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guinea Equatoriale', 'Guyana', + 'Haiti', 'Isole Heard e McDonald', 'Honduras', 'Hong Kong', + 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Israele', 'Italia', + 'Isola di Jersey', + 'Kazakhstan', 'Kenya', 'Kirghizistan', 'Kiribati', 'Korea', 'Kuwait', + 'Repubblica del Laos', 'Latvia', 'Lesotho', 'Libano', 'Liberia', 'Libia', 'Liechtenstein', 'Lituania', 'Lussemburgo', + 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isola di Man', 'Isole Marianne Settentrionali', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Isole Minori esterne degli Stati Uniti d\'America', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', + 'Namibia', 'Nauru', 'Nepal', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Norvegia', + 'Olanda', 'Oman', + 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Isole Pitcairn', 'Polonia', 'Portogallo', 'Porto Rico', 'Qatar', - 'Reunion', 'Romania', 'Russia', 'Rwanda', - 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Arabia Saudita', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Sud Africa', 'Georgia del sud e South Sandwich Islands', 'Spagna', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Svezia', 'Svizzera', 'Siria', - 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks and Caicos', 'Tuvalu', - 'Uganda', 'Ucraina', 'Emirati Arabi Uniti', 'Regno Unito', 'Stati Uniti d\'America', 'United States Minor Outlying Islands', 'Isole Vergini Statunitensi', 'Uruguay', 'Uzbekistan', - 'Vanuatu', 'Venezuela', 'Vietnam', - 'Wallis and Futuna', 'Western Sahara', + 'Regno Unito', 'Isola della Riunione', 'Romania', 'Russia', 'Rwanda', + 'Sahara Occidentale', 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts e Nevis', 'Saint Lucia', 'Saint Martin', 'Saint-Pierre e Miquelon', 'Saint Vincent e Grenadine', 'Samoa', 'San Marino', 'Sao Tome e Principe', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Spagna', 'Sri Lanka', 'Stati Uniti d\'America', 'Sud Africa', 'Sudan', 'Suriname', 'Isole Svalbard e Jan Mayen', 'Svezia', 'Svizzera', 'Siria', + 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks e Caicos', 'Tuvalu', + 'Uganda', 'Ucraina', 'Uruguay', 'Uzbekistan', 'Ungheria', + 'Vanuatu', 'Vaticano', 'Venezuela', 'Isole Vergini Statunitensi', 'Vietnam', + 'Wallis e Futuna', 'Yemen', 'Zambia', 'Zimbabwe', ]; @@ -64,7 +64,7 @@ class Address extends \Faker\Provider\Address protected static $secondaryAddressFormats = ['Appartamento ##', 'Piano #']; /** - * @example 'East' + * @example 'Borgo' */ public static function cityPrefix() { @@ -72,7 +72,7 @@ class Address extends \Faker\Provider\Address } /** - * @example 'Appt. 350' + * @example 'Appartamento 350' */ public static function secondaryAddress() { @@ -80,7 +80,7 @@ class Address extends \Faker\Provider\Address } /** - * @example 'California' + * @example 'Cagliari' */ public static function state() { diff --git a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php index 9922fd02..c74052ea 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php @@ -23,41 +23,54 @@ class Person extends \Faker\Provider\Person ]; protected static $firstNameMale = [ - 'Aaron', 'Abramo', 'Adriano', 'Akira', 'Alan', 'Alberto', 'Albino', 'Alessandro', 'Alessio', 'Amedeo', 'Amos', 'Anastasio', 'Anselmo', - 'Antimo', 'Antonino', 'Antonio', 'Ariel', 'Armando', 'Aroldo', 'Arturo', 'Augusto', 'Battista', 'Bernardo', 'Boris', 'Caio', - 'Carlo', 'Carmelo', 'Ciro', 'Damiano', 'Danny', 'Dante', 'Davide', 'Davis', 'Demis', 'Dimitri', 'Domingo', 'Dylan', - 'Edilio', 'Egidio', 'Elio', 'Emanuel', 'Emidio', 'Enrico', 'Enzo', 'Ercole', 'Ermes', 'Ethan', 'Ettore', 'Eusebio', - 'Fabiano', 'Fabio', 'Ferdinando', 'Fernando', 'Fiorenzo', 'Flavio', 'Folco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', - 'Gavino', 'Gerlando', 'Germano', 'Giacinto', 'Gianantonio', 'Giancarlo', 'Gianmarco', 'Gianmaria', 'Gioacchino', 'Giordano', 'Giorgio', 'Giuliano', - 'Giulio', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', 'Iacopo', 'Ian', 'Ilario', 'Italo', 'Ivano', 'Jack', - 'Jacopo', 'Jari', 'Jarno', 'Joey', 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kris', 'Lamberto', 'Lauro', 'Lazzaro', - 'Leonardo', 'Liborio', 'Lino', 'Lorenzo', 'Loris', 'Ludovico', 'Luigi', 'Manfredi', 'Manuele', 'Marco', 'Mariano', 'Marino', - 'Marvin', 'Marzio', 'Matteo', 'Mattia', 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Nabil', - 'Nadir', 'Nathan', 'Nazzareno', 'Nick', 'Nico', 'Noah', 'Noel', 'Omar', 'Oreste', 'Osvaldo', 'Pablo', 'Patrizio', - 'Pietro', 'Priamo', 'Quirino', 'Raoul', 'Renato', 'Renzo', 'Rocco', 'Rodolfo', 'Romeo', 'Romolo', 'Rudy', 'Sabatino', - 'Sabino', 'Samuel', 'Sandro', 'Santo', 'Sebastian', 'Sesto', 'Silvano', 'Silverio', 'Sirio', 'Siro', 'Timoteo', 'Timothy', - 'Tommaso', 'Ubaldo', 'Umberto', 'Vinicio', 'Walter', 'Xavier', 'Yago', 'Alighieri', 'Alighiero', 'Amerigo', 'Arcibaldo', 'Arduino', - 'Artes', 'Audenico', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Bettino', 'Bortolo', 'Caligola', 'Cecco', 'Cirino', 'Cleros', - 'Costantino', 'Costanzo', 'Danthon', 'Demian', 'Domiziano', 'Edipo', 'Egisto', 'Eliziario', 'Eriberto', 'Erminio', - 'Eustachio', 'Evangelista', 'Fiorentino', 'Giacobbe', 'Gianleonardo', 'Gianriccardo', 'Giobbe', 'Ippolito', - 'Isira', 'Joannes', 'Kociss', 'Laerte', 'Maggiore', 'Muzio', 'Nestore', 'Odino', 'Odone', 'Olo', 'Oretta', 'Orfeo', - 'Osea', 'Pacifico', 'Pericle', 'Piererminio', 'Pierfrancesco', 'Piersilvio', 'Primo', 'Quarto', 'Quasimodo', - 'Radames', 'Radio', 'Raniero', 'Rosalino', 'Rosolino', 'Rufo', 'Secondo', 'Tancredi', 'Tazio', 'Terzo', 'Teseo', - 'Tolomeo', 'Trevis', 'Tristano', 'Ulrico', 'Valdo', 'Zaccaria', 'Dindo', 'Serse', + 'Aaron', 'Abramo', 'Adriano', 'Agostino', 'Akira', 'Alan', 'Alberto', 'Albino', 'Aldo', 'Alessandro', 'Alessio', + 'Alfonso', 'Alfredo', 'Alighieri', 'Alighiero', 'Amedeo', 'Amerigo', 'Amos', 'Anastasio', 'Andrea', 'Angelo', + 'Anselmo', 'Antimo', 'Antonino', 'Antonio', 'Arcibaldo', 'Arduino', 'Ariel', 'Armando', 'Aroldo', 'Artes', 'Arturo', + 'Audenico', 'Augusto', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Battista', 'Bernardo', 'Bettino', 'Boris', 'Bortolo', + 'Bruno', 'Caio', 'Caligola', 'Carlo', 'Carmelo', 'Carmine', 'Cecco', 'Cesare', 'Cirino', 'Ciro', 'Claudio', 'Cleros', + 'Corrado', 'Cosimo', 'Costantino', 'Costanzo', 'Damiano', 'Danilo', 'Danny', 'Dante', 'Danthon', 'Dario', 'David', + 'Davide', 'Davis', 'Demian', 'Demis', 'Dimitri', 'Dindo', 'Dino', 'Domenico', 'Domingo', 'Domiziano', 'Donato', 'Dylan', + 'Edilio', 'Edipo', 'Egidio', 'Egisto', 'Elio', 'Eliziario', 'Emanuel', 'Emanuele', 'Emidio', 'Emilio', 'Enrico', 'Enzo', + 'Ercole', 'Eriberto', 'Ermes', 'Erminio', 'Ernesto', 'Ethan', 'Ettore', 'Eugenio', 'Eusebio', 'Eustachio', 'Evangelista', + 'Fabiano', 'Fabio', 'Fabrizio', 'Fausto', 'Federico', 'Felice', 'Ferdinando', 'Fernando', 'Filippo', 'Fiorentino', + 'Fiorenzo', 'Flavio', 'Folco', 'Francesco', 'Franco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', 'Gavino', + 'Gennaro', 'Gerardo', 'Gerlando', 'Germano', 'Giacinto', 'Giacobbe', 'Giacomo', 'Gian', 'Gianantonio', 'Giancarlo', + 'Gianfranco', 'Gianleonardo', 'Gianluca', 'Gianmarco', 'Gianmaria', 'Gianni', 'Gianriccardo', 'Gino', 'Gioacchino', 'Giobbe', + 'Giordano', 'Giorgio', 'Giovanni', 'Giuliano', 'Giulio', 'Giuseppe', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', + 'Iacopo', 'Ian', 'Ilario', 'Ippolito', 'Isira', 'Italo', 'Ivano', 'Jack', 'Jacopo', 'Jari', 'Jarno', 'Joannes', 'Joey', + 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kociss', 'Kris', 'Laerte', 'Lamberto', 'Lauro', 'Lazzaro', 'Leonardo', 'Liborio', + 'Lino', 'Lorenzo', 'Loris', 'Luca', 'Luciano', 'Ludovico', 'Luigi', 'Maggiore', 'Manfredi', 'Manuele', 'Marcello', + 'Marco', 'Mariano', 'Marino', 'Mario', 'Marvin', 'Marzio', 'Massimiliano', 'Massimo', 'Matteo', 'Mattia', 'Maurizio', + 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Muzio', 'Nabil', 'Nadir', 'Nathan', 'Nazzareno', + 'Nestore', 'Nick', 'Nico', 'Nicola', 'Noah', 'Noel', 'Odino', 'Odone', 'Olo', 'Omar', 'Oreste', 'Oretta', 'Orfeo', + 'Osea', 'Osvaldo', 'Pablo', 'Pacifico', 'Paolo', 'Pasquale', 'Patrizio', 'Pericle', 'Piererminio', 'Pierfrancesco', + 'Piero', 'Piersilvio', 'Pietro', 'Priamo', 'Primo', 'Quarto', 'Quasimodo', 'Quirino', 'Radames', 'Radio', 'Raffaele', + 'Raniero', 'Raoul', 'Renato', 'Renzo', 'Riccardo', 'Roberto', 'Rocco', 'Rodolfo', 'Romano', 'Romeo', 'Romolo', + 'Rosalino', 'Rosolino', 'Rudy', 'Rufo', 'Sabatino', 'Sabino', 'Salvatore', 'Samuel', 'Sandro', 'Santo', 'Sebastian', + 'Sebastiano', 'Secondo', 'Sergio', 'Serse', 'Sesto', 'Silvano', 'Silverio', 'Silvio', 'Sirio', 'Siro', 'Stefano', + 'Tancredi', 'Tazio', 'Terzo', 'Teseo', 'Timoteo', 'Timothy', 'Tolomeo', 'Tommaso', 'Trevis', 'Tristano', 'Ubaldo', + 'Ugo', 'Ulrico', 'Umberto', 'Valdo', 'Vincenzo', 'Vinicio', 'Vito', 'Vittorio', 'Walter', 'Xavier', 'Yago', 'Zaccaria', ]; protected static $firstNameFemale = [ - 'Assia', 'Benedetta', 'Bibiana', 'Brigitta', 'Carmela', 'Celeste', 'Cira', 'Claudia', 'Concetta', 'Cristyn', 'Deborah', 'Demi', 'Diana', - 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elga', 'Elsa', 'Emilia', 'Enrica', 'Erminia', 'Evita', 'Fatima', 'Felicia', - 'Filomena', 'Fortunata', 'Gilda', 'Giovanna', 'Giulietta', 'Grazia', 'Helga', 'Ileana', 'Ingrid', 'Ione', 'Irene', 'Isabel', - 'Ivonne', 'Jelena', 'Kayla', 'Kristel', 'Laura', 'Leone', 'Lia', 'Lidia', 'Lisa', 'Loredana', 'Loretta', 'Luce', - 'Lucia', 'Lucrezia', 'Luna', 'Maika', 'Marcella', 'Maria', 'Marianita', 'Mariapia', 'Marina', 'Maristella', 'Maruska', 'Matilde', - 'Mercedes', 'Michele', 'Miriam', 'Miriana', 'Monia', 'Morgana', 'Naomi', 'Neri', 'Nicoletta', 'Ninfa', 'Noemi', 'Nunzia', - 'Olimpia', 'Ortensia', 'Penelope', 'Prisca', 'Rebecca', 'Rita', 'Rosalba', 'Rosaria', 'Rosita', 'Ruth', 'Samira', 'Sarita', - 'Sasha', 'Shaira', 'Thea', 'Ursula', 'Vania', 'Vera', 'Vienna', 'Artemide', 'Cassiopea', 'Cesidia', 'Clea', 'Cleopatra', - 'Clodovea', 'Cosetta', 'Damiana', 'Danuta', 'Diamante', 'Eufemia', 'Flaviana', 'Gelsomina', 'Genziana', 'Giacinta', 'Guendalina', - 'Jole', 'Mariagiulia', 'Marieva', 'Mietta', 'Nayade', 'Piccarda', 'Selvaggia', 'Sibilla', 'Soriana', 'Sue ellen', 'Tosca', 'Violante', - 'Vitalba', 'Zelida', + 'Adriana', 'Alessandra', 'Andrea', 'Angela', 'Angelina', 'Anna', 'Annalisa', 'Annamaria', 'Annunziata', 'Antonella', + 'Antonia', 'Antonietta', 'Antonina', 'Artemide', 'Asia', 'Assia', 'Assunta', 'Barbara', 'Benedetta', 'Bibiana', 'Brigitta', + 'Bruna', 'Carla', 'Carmela', 'Cassiopea', 'Caterina', 'Celeste', 'Cesidia', 'Chiara', 'Cinzia', 'Cira', 'Clara', 'Claudia', + 'Clea', 'Cleopatra', 'Clodovea', 'Concetta', 'Cosetta', 'Cristina', 'Cristyn', 'Damiana', 'Daniela', 'Danuta', 'Deborah', + 'Demi', 'Diamante', 'Diana', 'Domenica', 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elena', 'Eleonora', 'Elga', 'Elisa', + 'Elisabetta', 'Elsa', 'Emanuela', 'Emilia', 'Enrica', 'Erminia', 'Eufemia', 'Evita', 'Fatima', 'Federica', 'Felicia', + 'Filomena', 'Flaviana', 'Fortunata', 'Franca', 'Francesca', 'Gabriella', 'Gelsomina', 'Genziana', 'Giacinta', 'Gilda', + 'Giovanna', 'Giuliana', 'Giulietta', 'Giuseppa', 'Giuseppina', 'Grazia', 'Graziella', 'Guendalina', 'Helga', 'Ida', 'Ileana', + 'Ingrid', 'Ione', 'Irene', 'Isabel', 'Isabella', 'Ivana', 'Ivonne', 'Jelena', 'Jole', 'Kayla', 'Kristel', 'Laura', 'Leone', + 'Lia', 'Lidia', 'Liliana', 'Lina', 'Lisa', 'Loredana', 'Loretta', 'Luce', 'Lucia', 'Luciana', 'Lucrezia', 'Luisa', 'Luna', + 'Maddalena', 'Maika', 'Manuela', 'Marcella', 'Margherita', 'Maria', 'Mariagiulia', 'Marianita', 'Marianna', 'Mariapia', + 'Marieva', 'Marina', 'Marisa', 'Maristella', 'Marta', 'Maruska', 'Matilde', 'Mercedes', 'Michela', 'Michele', 'Michelle', + 'Mietta', 'Mirella', 'Miriam', 'Miriana', 'Monia', 'Monica', 'Morgana', 'Nadia', 'Naomi', 'Nayade', 'Neri', 'Nicoletta', + 'Ninfa', 'Noemi', 'Nunzia', 'Olimpia', 'Ortensia', 'Paola', 'Patrizia', 'Penelope', 'Piccarda', 'Pierina', 'Prisca', + 'Raffaella', 'Rebecca', 'Renata', 'Rita', 'Roberta', 'Rosa', 'Rosalba', 'Rosalia', 'Rosanna', 'Rosaria', 'Rosita', + 'Ruth', 'Sabrina', 'Samira', 'Sandra', 'Sara', 'Sarah', 'Sarita', 'Sasha', 'Selvaggia', 'Shaira', 'Sibilla', 'Silvana', + 'Silvia', 'Simona', 'Sonia', 'Soriana', 'Stefania', 'Stella', 'Sue ellen', 'Teresa', 'Thea', 'Tiziana', 'Tosca', + 'Ursula', 'Valentina', 'Vania', 'Vera', 'Veronica', 'Vienna', 'Vincenza', 'Violante', 'Vitalba', 'Vittoria', 'Zelida', ]; protected static $lastName = [ @@ -69,7 +82,7 @@ class Person extends \Faker\Provider\Person 'Rizzi', 'Monti', 'Cattaneo', 'Morelli', 'Amato', 'Silvestri', 'Mazza', 'Testa', 'Grassi', 'Pellegrino', 'Carbone', 'Giuliani', 'Benedetti', 'Barone', 'Rossetti', 'Caputo', 'Montanari', 'Guerra', 'Palmieri', 'Bernardi', 'Martino', 'Fiore', 'De rosa', 'Ferretti', 'Bellini', 'Basile', 'Riva', 'Donati', 'Piras', 'Vitali', 'Battaglia', 'Sartori', 'Neri', 'Costantini', - 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', + 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', 'Verdi', ]; protected static $titleMale = ['Sig.', 'Dott.', 'Dr.', 'Ing.']; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Text.php b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Text.php index 08fa689c..161273fb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Text.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Text.php @@ -5,1991 +5,2075 @@ namespace Faker\Provider\it_IT; class Text extends \Faker\Provider\Text { /** - * Carlo Collodi - * Pinocchio - * Questo e-book è stato realizzato anche grazie al sostegno di: + * The Project Gutenberg EBook of Una notte bizzarra, by Anton Giulio Barrili * - * E-text - * Web design, Editoria, Multimedia - * (pubblica il tuo libro, o crea il tuo sito con E-text!) - * http://www.e-text.it/ + * This eBook is for the use of anyone anywhere at no cost and with + * almost no restrictions whatsoever. You may copy it, give it away or + * re-use it under the terms of the Project Gutenberg License included + * with this eBook or online at www.gutenberg.org * - * QUESTO E-BOOK: + * Title: Una notte bizzarra + * Author: Anton Giulio Barrili + * Release Date: August 8, 2009 [EBook #29636] + * Language: Italian * - * TITOLO: Pinocchio - * AUTORE: Collodi, Carlo - * TRADUTTORE: - * CURATORE: - * NOTE: + * *** START OF THIS PROJECT GUTENBERG EBOOK UNA NOTTE BIZZARRA *** * - * CODICE ISBN E-BOOK: 9788890359767 * - * DIRITTI D'AUTORE: no + * Produced by Claudio Paganelli, Carlo Traverso and the + * Online Distributed Proofreading Team at http://www.pgdp.net + * (This file was produced from images generously made + * available by The Internet Archive/Canadian Libraries) * - * LICENZA: questo testo è distribuito con la licenza specificata al seguente indirizzo Internet: http://www.liberliber.it/libri/licenze/ (Attribution-NonCommercial-ShareAlike 4.0 International) * - * TRATTO DA: Le avventure di Pinocchio : storia di un burattino / di Carlo Collodi ; illustrata da Enrico Mazzanti. – 2a edizione. – Milano : Rizzoli Editore, Milano, 1949. + * CAPITAN DODERO * - * CODICE ISBN: informazione non disponibile + * UNA NOTTE BIZZARRA * - * 1a EDIZIONE ELETTRONICA DEL: 28 gennaio 1996 - * 2a EDIZIONE ELETTRONICA DEL: 17 gennaio 2002 - * 3a EDIZIONE ELETTRONICA DEL: 19 luglio 2013 + * NOVELLE DI ANTON GIULIO BARRILI * - * INDICE DI AFFIDABILITA': 1 - * 0: affidabilità bassa - * 1: affidabilità media - * 2: affidabilità buona - * 3: affidabilità ottima + * Settima edizione. * - * DIGITALIZZAZIONE: - * Riccardo Scateni + * MILANO * - * REVISIONE: - * Marco Zela + * FRATELLI TREVES, EDITORI 1881. * - * IMPAGINAZIONE: - * Riccardo Scateni - * Marco Zela - * Catia Righi + * PROPRIETÀ LETTERARIA * - * PUBBLICAZIONE: - * Marco Calvo, http://www.marcocalvo.it/ - * Informazioni sul "progetto Manuzio" - * Il "progetto Manuzio" è una iniziativa dell'associazione culturale Liber Liber. Aperto a chiunque voglia collaborare, si pone come scopo la pubblicazione e la diffusione gratuita di opere letterarie in formato elettronico. Ulteriori informazioni sono disponibili sul sito Internet: - * http://www.liberliber.it/ - * Aiuta anche tu il "progetto Manuzio" - * Se questo "libro elettronico" è stato di tuo gradimento, o se condividi le finalità del "progetto Manuzio", invia una donazione a Liber Liber. Il tuo sostegno ci aiuterà a far crescere ulteriormente la nostra biblioteca. Qui le istruzioni: - * http://www.liberliber.it/aiuta/ + * Tip. Treves * - * Indice generale - * I. Come andò che maestro Ciliegia, falegname, trovò un pezzo di legno, che piangeva e rideva come un bambino. - * II. Maestro Ciliegia regala il pezzo di legno al suo amico Geppetto, il quale lo prende per fabbricarsi un burattino maraviglioso che sappia ballare, tirar di scherma e fare i salti mortali. - * III Geppetto, tornato a casa, comincia subito a fabbricarsi il burattino e gli mette il nome di Pinocchio. Prime monellerie del burattino. - * IV La storia di Pinocchio col Grillo-parlante, dove si vede come i ragazzi cattivi hanno a noia di sentirsi correggere da chi ne sa più di loro. - * V Pinocchio ha fame, e cerca un uovo per farsi una frittata; ma sul più bello, la frittata gli vola via dalla finestra. - * VI Pinocchio si addormenta coi piedi sul caldano, e la mattina dopo si sveglia coi piedi tutti bruciati. - * VII Geppetto torna a casa, e dà al burattino la colazione che il pover’uomo aveva portata con sé. - * VIII Geppetto rifà i piedi a Pinocchio e vende la propria casacca per comprargli l’Abbecedario. - * IX Pinocchio vende l’Abbecedario per andare a vedere il teatrino dei burattini. - * X I burattini riconoscono il loro fratello Pinocchio e gli fanno una grandissima festa; ma sul più bello, esce fuori il burattinaio Mangiafoco, e Pinocchio corre il pericolo di fare una brutta fine. - * XI Mangiafoco starnutisce e perdona a Pinocchio, il quale poi difende dalla morte il suo amico Arlecchino. - * XII Il burattinaio Mangiafoco regala cinque monete d’oro a Pinocchio, perché le porti al suo babbo Geppetto: e Pinocchio, invece, si lascia abbindolare dalla Volpe e dal Gatto e se ne va con loro. - * XIII L’osteria del Gambero Rosso. - * XIV Pinocchio, per non aver dato retta ai buoni consigli del Grillo-parlante, s’imbatte negli assassini. - * XV Gli assassini inseguono Pinocchio; e, dopo averlo raggiunto, lo impiccano a un ramo della Quercia grande. - * XVI La bella Bambina dai capelli turchini fa raccogliere il burattino: lo mette a letto, e chiama tre medici per sapere se sia vivo o morto. - * XVII Pinocchio mangia lo zucchero, ma non vuol purgarsi: Però quando vede i becchini che vengono a portarlo via, allora si purga. Poi dice una bugia e per gastigo gli cresce il naso. - * XVIII Pinocchio ritrova la Volpe e il Gatto, e va con loro a seminare le quattro monete nel Campo de’ Miracoli. - * XIX Pinocchio è derubato delle sue monete d’oro e, per gastigo, si busca quattro mesi di prigione. - * XX Liberato dalla prigione, si avvia per tornare a casa della Fata; ma lungo la strada trova un serpente orribile, e poi rimane preso alla tagliuola. - * XXI Pinocchio è preso da un contadino, il quale lo costringe a far da can da guardia a un pollaio. - * XXII Pinocchio scuopre i ladri e, in ricompensa di essere stato fedele, vien posto in libertà. - * XXIII Pinocchio piange la morte della bella Bambina dai capelli turchini: poi trova un Colombo che lo porta sulla riva del mare, e lì si getta nell’acqua per andare in aiuto del suo babbo Geppetto. - * XXIV Pinocchio arriva all’isola delle Api industriose e ritrova la Fata. - * XXV Pinocchio promette alla Fata di essere buono e di studiare, perché è stufo di fare il burattino e vuol diventare un bravo ragazzo. - * XXVI Pinocchio va co’ suoi compagni di scuola in riva al mare, per vedere il terribile Pescecane. - * XXVII Gran combattimento fra Pinocchio e i suoi compagni: uno de’ quali essendo rimasto ferito, Pinocchio viene arrestato dai carabinieri. - * XXVIII Pinocchio corre pericolo di essere fritto in padella come un pesce. - * XXIX Ritorna a casa della Fata, la quale gli promette che il giorno dopo non sarà più un burattino, ma diventerà un ragazzo. Gran colazione di caffè-e-latte per festeggiare questo grande avvenimento. - * XXX Pinocchio, invece di diventare un ragazzo, parte di nascosto col suo amico Lucignolo per il Paese dei Balocchi. - * XXXI Dopo cinque mesi di cuccagna, Pinocchio, con sua grande maraviglia, sente spuntarsi un bel paio d’orecchie asinine e diventa un ciuchino, con la coda e tutto. - * XXXII A Pinocchio gli vengono gli orecchi di ciuco, e poi diventa un ciuchino vero e comincia a ragliare. - * XXXIII Diventato un ciuchino vero, è portato a vendere, e lo compra il direttore di una compagnia di pagliacci per insegnargli a ballare e a saltare i cerchi; ma una sera azzoppisce e allora lo ricompra un altro, per far con la sua pelle un tamburo. - * XXXIV Pinocchio, gettato in mare, è mangiato dai pesci e ritorna ad essere un burattino come prima; ma mentre nuota per salvarsi, è ingoiato dal terribile Pesce-cane. - * XXXV Pinocchio ritrova in corpo al Pesce-cane... Chi ritrova? Leggete questo capitolo e lo saprete. - * XXXVI Finalmente Pinocchio cessa d’essere un burattino e diventa un ragazzo. + * UNA NOTTE BIZZARRA * - * @see http://www.liberliber.it/libri/c/collodi/index.php#elenco_opere + * A LUIGI MORANDI + * + * + * _La è proprio una inezia, frutto di tre giorni di lavoro, che intitolo + * a te, giovine amico e compagno d'armi; ma sappi che fu un gaio lavoro + * campestre, e lavoro gaio riesce facile, e val meglio assai che sudato, + * ma uggioso._ + * + * _Nè paia fuor del naturale a te, nè ai lettori cortesi, che i + * personaggi della mia novella s'innamorino in una notte. Anco a non + * volerne cercar la ragione, la scusa, nella novità de' casi narrati, io + * so che la cosa non è poi tanto difficile, io che ti ho per la prima + * volta veduto, ed amato come fratello, in un giorno. Tu dirai che, + * anche là, era quistione d'urgenza, imperocchè chi poteva morire il + * giorno di poi non avea tempo da perdere. Or dunque, concediamo la + * parte loro agli eventi, e non se ne parli più, se non per ricordare + * che l'amicizia, nata e cresciuta in un giorno, ha da fortificarsi in + * tutti que' molti, o pochi, che ci comporranno la trama della vita._ + * + * Di Genova, il 19 di Luglio del 1868. + * + * ANTON GIULIO BARRILI. + * + * @see https://gutenberg.org/cache/epub/29636/pg29636.txt * * @var string */ protected static $baseText = <<<'EOT' -I. Come andò che maestro Ciliegia, falegname, trovò un pezzo di legno, che piangeva e rideva come un bambino. - -C’era una volta... -– Un re! – diranno subito i miei piccoli lettori. -No, ragazzi, avete sbagliato. C’era una volta un pezzo di legno. -Non era un legno di lusso, ma un semplice pezzo da catasta, di quelli che d’inverno si mettono nelle stufe e nei caminetti per accendere il fuoco e per riscaldare le stanze. -Non so come andasse, ma il fatto gli è che un bel giorno questo pezzo di legno capitò nella bottega di un vecchio falegname, il quale aveva nome mastr’Antonio, se non che tutti lo chiamavano maestro Ciliegia, per via della punta del suo naso, che era sempre lustra e paonazza, come una ciliegia matura. -Appena maestro Ciliegia ebbe visto quel pezzo di legno, si rallegrò tutto e dandosi una fregatina di mani per la contentezza, borbottò a mezza voce: -– Questo legno è capitato a tempo: voglio servirmene per fare una gamba di tavolino. -Detto fatto, prese subito l’ascia arrotata per cominciare a levargli la scorza e a digrossarlo, ma quando fu lì per lasciare andare la prima asciata, rimase col braccio sospeso in aria, perché sentì una vocina sottile, che disse raccomandandosi: -– Non mi picchiar tanto forte! -Figuratevi come rimase quel buon vecchio di maestro Ciliegia! -Girò gli occhi smarriti intorno alla stanza per vedere di dove mai poteva essere uscita quella vocina, e non vide nessuno! Guardò sotto il banco, e nessuno; guardò dentro un armadio che stava sempre chiuso, e nessuno; guardò nel corbello dei trucioli e della segatura, e nessuno; apri l’uscio di bottega per dare un’occhiata anche sulla strada, e nessuno! O dunque?... -– Ho capito; – disse allora ridendo e grattandosi la parrucca, – si vede che quella vocina me la sono figurata io. Rimettiamoci a lavorare. -E ripresa l’ascia in mano, tirò giù un solennissimo colpo sul pezzo di legno. -– Ohi! tu m’hai fatto male! – gridò rammaricandosi la solita vocina. -Questa volta maestro Ciliegia restò di stucco, cogli occhi fuori del capo per la paura, colla bocca spalancata e colla lingua giù ciondoloni fino al mento, come un mascherone da fontana. Appena riebbe l’uso della parola, cominciò a dire tremando e balbettando dallo spavento: -– Ma di dove sarà uscita questa vocina che ha detto ohi?... Eppure qui non c’è anima viva. Che sia per caso questo pezzo di legno che abbia imparato a piangere e a lamentarsi come un bambino? Io non lo posso credere. Questo legno eccolo qui; è un pezzo di legno da caminetto, come tutti gli altri, e a buttarlo sul fuoco, c’è da far bollire una pentola di fagioli... O dunque? Che ci sia nascosto dentro qualcuno? Se c’è nascosto qualcuno, tanto peggio per lui. Ora l’accomodo io! -E così dicendo, agguantò con tutt’e due le mani quel povero pezzo di legno e si pose a sbatacchiarlo senza carità contro le pareti della stanza. -Poi si messe in ascolto, per sentire se c’era qualche vocina che si lamentasse. Aspettò due minuti, e nulla; cinque minuti, e nulla; dieci minuti, e nulla! -– Ho capito, – disse allora sforzandosi di ridere e arruffandosi la parrucca, – si vede che quella vocina che ha detto ohi, me la sono figurata io! Rimettiamoci a lavorare. -E perché gli era entrata addosso una gran paura, si provò a canterellare per farsi un po’ di coraggio. -Intanto, posata da una parte l’ascia, prese in mano la pialla, per piallare e tirare a pulimento il pezzo di legno; ma nel mentre che lo piallava in su e in giù, senti la solita vocina che gli disse ridendo: -– Smetti! tu mi fai il pizzicorino sul corpo! -Questa volta il povero maestro Ciliegia cadde giù come fulminato. Quando riaprì gli occhi, si trovò seduto per terra. -Il suo viso pareva trasfigurato, e perfino la punta del naso, di paonazza come era quasi sempre, gli era diventata turchina dalla gran paura. - -II. Maestro Ciliegia regala il pezzo di legno al suo amico Geppetto, il quale lo prende per fabbricarsi un burattino maraviglioso che sappia ballare, tirar di scherma e fare i salti mortali. - -In quel punto fu bussato alla porta. -– Passate pure, – disse il falegname, senza aver la forza di rizzarsi in piedi. -Allora entrò in bottega un vecchietto tutto arzillo, il quale aveva nome Geppetto; ma i ragazzi del vicinato, quando lo volevano far montare su tutte le furie, lo chiamavano col soprannome di Polendina, a motivo della sua parrucca gialla che somigliava moltissimo alla polendina di granturco. -Geppetto era bizzosissimo. Guai a chiamarlo Polendina! Diventava subito una bestia e non c’era più verso di tenerlo. -– Buon giorno, mastr’Antonio, – disse Geppetto. – Che cosa fate costì per terra? -– Insegno l’abbaco alle formicole. -– Buon pro vi faccia! -– Chi vi ha portato da me, compar Geppetto? -– Le gambe. Sappiate, mastr’Antonio, che son venuto da voi, per chiedervi un favore. -– Eccomi qui, pronto a servirvi, – replicò il falegname, rizzandosi su i ginocchi. -– Stamani m’è piovuta nel cervello un’idea. -– Sentiamola. -– Ho pensato di fabbricarmi da me un bel burattino di legno; ma un burattino maraviglioso, che sappia ballare, tirare di scherma e fare i salti mortali. Con questo burattino voglio girare il mondo, per buscarmi un tozzo di pane e un bicchier di vino; che ve ne pare? -– Bravo Polendina! – gridò la solita vocina, che non si capiva di dove uscisse. -A sentirsi chiamar Polendina, compar Geppetto diventò rosso come un peperone dalla bizza, e voltandosi verso il falegname, gli disse imbestialito: -– Perché mi offendete? -– Chi vi offende? -– Mi avete detto Polendina!... -– Non sono stato io. -– Sta’ un po’ a vedere che sarò stato io! Io dico che siete stato voi. -– No! -– Si! -– No! -– Si! -E riscaldandosi sempre più, vennero dalle parole ai fatti, e acciuffatisi fra di loro, si graffiarono, si morsero e si sbertucciarono. -Finito il combattimento, mastr’Antonio si trovò fra le mani la parrucca gialla di Geppetto, e Geppetto si accorse di avere in bocca la parrucca brizzolata del falegname. -– Rendimi la mia parrucca! – gridò mastr’Antonio. -– E tu rendimi la mia, e rifacciamo la pace. -I due vecchietti, dopo aver ripreso ognuno di loro la propria parrucca, si strinsero la mano e giurarono di rimanere buoni amici per tutta la vita. -– Dunque, compar Geppetto, – disse il falegname in segno di pace fatta, – qual è il piacere che volete da me? -– Vorrei un po’ di legno per fabbricare il mio burattino; me lo date? -Mastr’Antonio, tutto contento, andò subito a prendere sul banco quel pezzo di legno che era stato cagione a lui di tante paure. Ma quando fu lì per consegnarlo all’amico, il pezzo di legno dette uno scossone e sgusciandogli violentemente dalle mani, andò a battere con forza negli stinchi impresciuttiti del povero Geppetto. -– Ah! gli è con questo bel garbo, mastr’Antonio, che voi regalate la vostra roba? M’avete quasi azzoppito!... -– Vi giuro che non sono stato io! -– Allora sarò stato io!... -– La colpa è tutta di questo legno... -– Lo so che è del legno: ma siete voi che me l’avete tirato nelle gambe! -– Io non ve l’ho tirato! -– Bugiardo! -– Geppetto, non mi offendete; se no vi chiamo Polendina!... -– Asino! -– Polendina! -– Somaro! -– Polendina! -– Brutto scimmiotto! -– Polendina! -A sentirsi chiamar Polendina per la terza volta, Geppetto perse il lume degli occhi, si avvento sul falegname; e lì se ne dettero un sacco e una sporta. -A battaglia finita, mastr’Antonio si trovo due graffi di più sul naso, e quell’altro due bottoni di meno al giubbetto. Pareggiati in questo modo i loro conti, si strinsero la mano e giurarono di rimanere buoni amici per tutta la vita. -Intanto Geppetto prese con se il suo bravo pezzo di legno, e ringraziato mastr’Antonio, se ne tornò zoppicando a casa. - -III Geppetto, tornato a casa, comincia subito a fabbricarsi il burattino e gli mette il nome di Pinocchio. Prime monellerie del burattino. - -La casa di Geppetto era una stanzina terrena, che pigliava luce da un sottoscala. La mobilia non poteva essere più semplice: una seggiola cattiva, un letto poco buono e un tavolino tutto rovinato. Nella parete di fondo si vedeva un caminetto col fuoco acceso; ma il fuoco era dipinto, e accanto al fuoco c’era dipinta una pentola che bolliva allegramente e mandava fuori una nuvola di fumo, che pareva fumo davvero. -Appena entrato in casa, Geppetto prese subito gli arnesi e si pose a intagliare e a fabbricare il suo burattino. -– Che nome gli metterò? – disse fra sé e sé. – Lo voglio chiamar Pinocchio. Questo nome gli porterà fortuna. Ho conosciuto una famiglia intera di Pinocchi: Pinocchio il padre, Pinocchia la madre e Pinocchi i ragazzi, e tutti se la passavano bene. Il più ricco di loro chiedeva l’elemosina. -Quando ebbe trovato il nome al suo burattino, allora cominciò a lavorare a buono, e gli fece subito i capelli, poi la fronte, poi gli occhi. -Fatti gli occhi, figuratevi la sua maraviglia quando si accorse che gli occhi si muovevano e che lo guardavano fisso fisso. -Geppetto, vedendosi guardare da quei due occhi di legno, se n’ebbe quasi per male, e disse con accento risentito: -– Occhiacci di legno, perché mi guardate? -Nessuno rispose. -Allora, dopo gli occhi, gli fece il naso; ma il naso, appena fatto, cominciò a crescere: e cresci, cresci, cresci diventò in pochi minuti un nasone che non finiva mai. -Il povero Geppetto si affaticava a ritagliarlo; ma più lo ritagliava e lo scorciva, e più quel naso impertinente diventava lungo. -Dopo il naso, gli fece la bocca. -La bocca non era ancora finita di fare, che cominciò subito a ridere e a canzonarlo. -– Smetti di ridere! – disse Geppetto impermalito; ma fu come dire al muro. -– Smetti di ridere, ti ripeto! – urlò con voce minacciosa. -Allora la bocca smesse di ridere, ma cacciò fuori tutta la lingua. -Geppetto, per non guastare i fatti suoi, finse di non avvedersene, e continuò a lavorare. -Dopo la bocca, gli fece il mento, poi il collo, le spalle, lo stomaco, le braccia e le mani. -Appena finite le mani, Geppetto senti portarsi via la parrucca dal capo. Si voltò in su, e che cosa vide? Vide la sua parrucca gialla in mano del burattino. -– Pinocchio!... rendimi subito la mia parrucca! -E Pinocchio, invece di rendergli la parrucca, se la messe in capo per sé, rimanendovi sotto mezzo affogato. -A quel garbo insolente e derisorio, Geppetto si fece triste e melanconico, come non era stato mai in vita sua, e voltandosi verso Pinocchio, gli disse: -– Birba d’un figliuolo! Non sei ancora finito di fare, e già cominci a mancar di rispetto a tuo padre! Male, ragazzo mio, male! -E si rasciugò una lacrima. -Restavano sempre da fare le gambe e i piedi. -Quando Geppetto ebbe finito di fargli i piedi, sentì arrivarsi un calcio sulla punta del naso. -– Me lo merito! – disse allora fra sé. – Dovevo pensarci prima! Ormai è tardi! -Poi prese il burattino sotto le braccia e lo posò in terra, sul pavimento della stanza, per farlo camminare. -Pinocchio aveva le gambe aggranchite e non sapeva muoversi, e Geppetto lo conduceva per la mano per insegnargli a mettere un passo dietro l’altro. -Quando le gambe gli si furono sgranchite, Pinocchio cominciò a camminare da sé e a correre per la stanza; finché, infilata la porta di casa, saltò nella strada e si dette a scappare. -E il povero Geppetto a corrergli dietro senza poterlo raggiungere, perché quel birichino di Pinocchio andava a salti come una lepre, e battendo i suoi piedi di legno sul lastrico della strada, faceva un fracasso, come venti paia di zoccoli da contadini. -– Piglialo! piglialo! – urlava Geppetto; ma la gente che era per la via, vedendo questo burattino di legno, che correva come un barbero, si fermava incantata a guardarlo, e rideva, rideva e rideva, da non poterselo figurare. -Alla fine, e per buona fortuna, capitò un carabiniere, il quale, sentendo tutto quello schiamazzo e credendo si trattasse di un puledro che avesse levata la mano al padrone, si piantò coraggiosamente a gambe larghe in mezzo alla strada, coll’animo risoluto di fermarlo e di impedire il caso di maggiori disgrazie. -Ma Pinocchio, quando si avvide da lontano del carabiniere che barricava tutta la strada, s’ingegnò di passargli, per sorpresa, frammezzo alle gambe, e invece fece fiasco. -Il carabiniere, senza punto smoversi, lo acciuffò pulitamente per il naso (era un nasone spropositato, che pareva fatto apposta per essere acchiappato dai carabinieri), e lo riconsegnò nelle proprie mani di Geppetto; il quale, a titolo di correzione, voleva dargli subito una buona tiratina d’orecchi. Ma figuratevi come rimase quando, nel cercargli gli orecchi, non gli riuscì di poterli trovare: e sapete perché? Perché, nella furia di scolpirlo, si era dimenticato di farglieli. -Allora lo prese per la collottola, e, mentre lo riconduceva indietro, gli disse tentennando minacciosamente il capo: -– Andiamo a casa. Quando saremo a casa, non dubitare che faremo i nostri conti! -Pinocchio, a questa antifona, si buttò per terra, e non volle più camminare. Intanto i curiosi e i bighelloni principiavano a fermarsi lì dintorno e a far capannello. -Chi ne diceva una, chi un’altra. -– Povero burattino! – dicevano alcuni, – ha ragione a non voler tornare a casa! Chi lo sa come lo picchierebbe quell’omaccio di Geppetto!... -E gli altri soggiungevano malignamente: -– Quel Geppetto pare un galantuomo! ma è un vero tiranno coi ragazzi! Se gli lasciano quel povero burattino fra le mani, è capacissimo di farlo a pezzi!... -Insomma, tanto dissero e tanto fecero, che il carabiniere rimise in libertà Pinocchio e condusse in prigione quel pover’uomo di Geppetto. Il quale, non avendo parole lì per lì per difendersi, piangeva come un vitellino, e nell’avviarsi verso il carcere, balbettava singhiozzando: -– Sciagurato figliuolo! E pensare che ho penato tanto a farlo un burattino per bene! Ma mi sta il dovere! Dovevo pensarci prima!... -Quello che accadde dopo, è una storia da non potersi credere, e ve la racconterò in quest’altri capitoli. - -IV La storia di Pinocchio col Grillo-parlante, dove si vede come i ragazzi cattivi hanno a noia di sentirsi correggere da chi ne sa più di loro. - -Vi dirò dunque, ragazzi, che mentre il povero Geppetto era condotto senza sua colpa in prigione, quel monello di Pinocchio, rimasto libero dalle grinfie del carabiniere, se la dava a gambe giù attraverso ai campi, per far più presto a tornarsene a casa; e nella gran furia del correre saltava greppi altissimi, siepi di pruni e fossi pieni d’acqua, tale e quale come avrebbe potuto fare un capretto o un leprottino inseguito dai cacciatori. -Giunto dinanzi a casa, trovò l’uscio di strada socchiuso. Lo spinse, entrò dentro, e appena ebbe messo tanto di paletto, si gettò a sedere per terra, lasciando andare un gran sospirone di contentezza. -Ma quella contentezza durò poco, perché sentì nella stanza qualcuno che fece: -– Crì - crì - crì! -– Chi è che mi chiama? – disse Pinocchio tutto impaurito. -– Sono io! -Pinocchio si voltò e vide un grosso Grillo che saliva lentamente su su per il muro. -– Dimmi, Grillo: e tu chi sei? -– Io sono il Grillo-parlante, ed abito in questa stanza da più di cent’anni. -– Oggi però questa stanza è mia, – disse il burattino, – e se vuoi farmi un vero piacere, vattene subito, senza nemmeno voltarti indietro. -– Io non me ne anderò di qui, – rispose il Grillo, – se prima non ti avrò detto una gran verità. -– Dimmela e spìcciati. -– Guai a quei ragazzi che si ribellano ai loro genitori e che abbandonano capricciosamente la casa paterna! Non avranno mai bene in questo mondo; e prima o poi dovranno pentirsene amaramente. -– Canta pure, Grillo mio, come ti pare e piace: ma io so che domani, all’alba, voglio andarmene di qui, perché se rimango qui, avverrà a me quel che avviene a tutti gli altri ragazzi, vale a dire mi manderanno a scuola e per amore o per forza mi toccherà studiare; e io, a dirtela in confidenza, di studiare non ne ho punto voglia e mi diverto più a correre dietro alle farfalle e a salire su per gli alberi a prendere gli uccellini di nido. -– Povero grullerello! Ma non sai che, facendo così, diventerai da grande un bellissimo somaro e che tutti si piglieranno gioco di te? -– Chétati. Grillaccio del mal’augurio! – gridò Pinocchio. -Ma il Grillo, che era paziente e filosofo, invece di aversi a male di questa impertinenza, continuò con lo stesso tono di voce: -– E se non ti garba di andare a scuola, perché non impari almeno un mestiere, tanto da guadagnarti onestamente un pezzo di pane? -– Vuoi che te lo dica? – replicò Pinocchio, che cominciava a perdere la pazienza. – Fra tutti i mestieri del mondo non ce n’è che uno solo, che veramente mi vada a genio. -– E questo mestiere sarebbe?... -– Quello di mangiare, bere, dormire, divertirmi e fare dalla mattina alla sera la vita del vagabondo. -– Per tua regola, – disse il Grillo-parlante con la sua solita calma, – tutti quelli che fanno codesto mestiere finiscono sempre allo spedale o in prigione. -– Bada, Grillaccio del mal’augurio!... se mi monta la bizza, guai a te! -– Povero Pinocchio! Mi fai proprio compassione!... -– Perché ti faccio compassione? -– Perché sei un burattino e, quel che è peggio, perché hai la testa di legno. -A queste ultime parole, Pinocchio saltò su tutt’infuriato e preso sul banco un martello di legno lo scagliò contro il Grillo-parlante. -Forse non credeva nemmeno di colpirlo: ma disgraziatamente lo colse per l’appunto nel capo, tanto che il povero Grillo ebbe appena il fiato di fare crì - crì - crì, e poi rimase lì stecchito e appiccicato alla parete. - -V Pinocchio ha fame, e cerca un uovo per farsi una frittata; ma sul più bello, la frittata gli vola via dalla finestra. - -Intanto cominciò a farsi notte, e Pinocchio, ricordandosi che non aveva mangiato nulla, senti un’uggiolina allo stomaco, che somigliava moltissimo all’appetito. -Ma l’appetito nei ragazzi cammina presto; e di fatti dopo pochi minuti l’appetito diventò fame, e la fame, dal vedere al non vedere, si converti in una fame da lupi, una fame da tagliarsi col coltello. -Il povero Pinocchio corse subito al focolare, dove c’era una pentola che bolliva e fece l’atto di scoperchiarla, per vedere che cosa ci fosse dentro, ma la pentola era dipinta sul muro. Figuratevi come restò. Il suo naso, che era già lungo, gli diventò più lungo almeno quattro dita. -Allora si dette a correre per la stanza e a frugare per tutte le cassette e per tutti i ripostigli in cerca di un po’ di pane, magari un po’ di pan secco, un crosterello, un osso avanzato al cane, un po’ di polenta muffita, una lisca di pesce, un nocciolo di ciliegia, insomma di qualche cosa da masticare: ma non trovò nulla, il gran nulla, proprio nulla. -E intanto la fame cresceva, e cresceva sempre: e il povero Pinocchio non aveva altro sollievo che quello di sbadigliare: e faceva degli sbadigli così lunghi, che qualche volta la bocca gli arrivava fino agli orecchi. E dopo avere sbadigliato, sputava, e sentiva che lo stomaco gli andava via. -Allora piangendo e disperandosi, diceva: -– Il Grillo-parlante aveva ragione. Ho fatto male a rivoltarmi al mio babbo e a fuggire di casa... Se il mio babbo fosse qui, ora non mi troverei a morire di sbadigli! Oh! che brutta malattia che è la fame! -Quand’ecco gli parve di vedere nel monte della spazzatura qualche cosa di tondo e di bianco, che somigliava tutto a un uovo di gallina. Spiccare un salto e gettarvisi sopra, fu un punto solo. Era un uovo davvero. -La gioia del burattino è impossibile descriverla: bisogna sapersela figurare. Credendo quasi che fosse un sogno, si rigirava quest’uovo fra le mani, e lo toccava e lo baciava, e baciandolo diceva: -– E ora come dovrò cuocerlo? Ne farò una frittata?... No, è meglio cuocerlo nel piatto!... O non sarebbe più saporito se lo friggessi in padella? O se invece lo cuocessi a uso uovo da bere? No, la più lesta di tutte è di cuocerlo nel piatto o nel tegamino: ho troppa voglia di mangiarmelo! -Detto fatto, pose un tegamino sopra un caldano pieno di brace accesa: messe nel tegamino, invece d’olio o di burro, un po’ d’acqua: e quando l’acqua principiò a fumare, tac!... spezzò il guscio dell’uovo, e fece l’atto di scodellarvelo dentro. -Ma invece della chiara e del torlo, scappò fuori un pulcino tutto allegro e complimentoso, il quale, facendo una bella riverenza, disse: -– Mille grazie, signor Pinocchio, d’avermi risparmiata la fatica di rompere il guscio! Arrivedella, stia bene e tanti saluti a casa! -Ciò detto distese le ali e, infilata la finestra che era aperta, se ne volò via a perdita d’occhio. -Il povero burattino rimase lì, come incantato, cogli occhi fissi, colla bocca aperta e coi gusci dell’uovo in mano. Riavutosi, peraltro, dal primo sbigottimento, cominciò a piangere, a strillare, a battere i piedi in terra, per la disperazione, e piangendo diceva: -– Eppure il Grillo-parlante aveva ragione! Se non fossi scappato di casa e se il mio babbo fosse qui, ora non mi troverei a morire di fame! Oh! che brutta malattia che è la fame!... -E perché il corpo gli seguitava a brontolare più che mai, e non sapeva come fare a chetarlo, pensò di uscir di casa e di dare una scappata al paesello vicino, nella speranza di trovare qualche persona caritatevole che gli avesse fatto l’elemosina di un po’ di pane. - -VI Pinocchio si addormenta coi piedi sul caldano, e la mattina dopo si sveglia coi piedi tutti bruciati. - -Per l’appunto era una nottataccia d’inferno. Tuonava forte forte, lampeggiava come se il cielo pigliasse fuoco, e un ventaccio freddo e strapazzone, fischiando rabbiosamente e sollevando un immenso nuvolo di polvere, faceva stridere e cigolare tutti gli alberi della campagna. -Pinocchio aveva una gran paura dei tuoni e dei lampi: se non che la fame era più forte della paura: motivo per cui accostò l’uscio di casa, e presa la carriera, in un centinaio di salti arrivò fino al paese, colla lingua fuori e col fiato grosso, come un cane da caccia. -Ma trovò tutto buio e tutto deserto. Le botteghe erano chiuse; le porte di casa chiuse; le finestre chiuse; e nella strada nemmeno un cane. Pareva il paese dei morti. -Allora Pinocchio, preso dalla disperazione e dalla fame, si attaccò al campanello d’una casa, e cominciò a suonare a distesa, dicendo dentro di sé: -– Qualcuno si affaccierà. -Difatti si affacciò un vecchino, col berretto da notte in capo, il quale gridò tutto stizzito: -– Che cosa volete a quest’ora? -– Che mi fareste il piacere di darmi un po’ di pane? -– Aspettami costì che torno subito, – rispose il vecchino, credendo di aver da fare con qualcuno di quei ragazzacci rompicollo che si divertono di notte a suonare i campanelli delle case, per molestare la gente per bene, che se la dorme tranquillamente. -Dopo mezzo minuto la finestra si riaprì e la voce del solito vecchino gridò a Pinocchio: -– Fatti sotto e para il cappello. -Pinocchio si levò subito il suo cappelluccio; ma mentre faceva l’atto di pararlo, sentì pioversi addosso un’enorme catinellata d’acqua che lo annaffiò tutto dalla testa ai piedi, come se fosse un vaso di giranio appassito. -Tornò a casa bagnato come un pulcino e rifinito dalla stanchezza e dalla fame e perché non aveva più forza di reggersi ritto, si pose a sedere, appoggiando i piedi fradici e impillaccherati sopra un caldano pieno di brace accesa. -E lì si addormentò; e nel dormire, i piedi che erano di legno, gli presero fuoco e adagio adagio gli si carbonizzarono e diventarono cenere. -E Pinocchio seguitava a dormire e a russare, come se i suoi piedi fossero quelli d’un altro. Finalmente sul far del giorno si svegliò, perché qualcuno aveva bussato alla porta. -– Chi è? – domandò sbadigliando e stropicciandosi gli occhi. -– Sono io, – rispose una voce. -Quella voce era la voce di Geppetto. - -VII Geppetto torna a casa, e dà al burattino la colazione che il pover’uomo aveva portata con sé. - -Il povero Pinocchio, che aveva sempre gli occhi fra il sonno, non s’era ancora avvisto dei piedi, che gli si erano tutti bruciati: per cui appena sentì la voce di suo padre, schizzò giù dallo sgabello per correre a tirare il paletto; ma invece, dopo due o tre traballoni, cadde di picchio tutto lungo disteso sul pavimento. -E nel battere in terra fece lo stesso rumore, che avrebbe fatto un sacco di mestoli. cascato da un quinto piano. -– Aprimi! – intanto gridava Geppetto dalla strada. -– Babbo mio, non posso, – rispondeva il burattino piangendo e ruzzolandosi per terra. -– Perché non puoi? -– Perché mi hanno mangiato i piedi. -– E chi te li ha mangiati? -– Il gatto, – disse Pinocchio, vedendo il gatto che colle zampine davanti si divertiva a far ballare alcuni trucioli di legno. -– Aprimi, ti dico! – ripeté Geppetto, – se no quando vengo in casa, il gatto te lo do io! -– Non posso star ritto, credetelo. O povero me! povero me che mi toccherà a camminare coi ginocchi per tutta la vita!... -Geppetto, credendo che tutti questi piagnistei fossero un’altra monelleria del burattino, pensò bene di farla finita, e arrampicatosi su per il muro, entrò in casa dalla finestra. -Da principio voleva dire e voleva fare: ma poi quando vide il suo Pinocchio sdraiato in terra e rimasto senza piedi davvero, allora sentì intenerirsi; e presolo subito in collo, si dette a baciarlo e a fargli mille carezze e mille moine, e, coi luccioloni che gli cascavano giù per le gote, gli disse singhiozzando: -– Pinocchiuccio mio! Com’è che ti sei bruciato i piedi? -– Non lo so, babbo, ma credetelo che è stata una nottata d’inferno e me ne ricorderò fin che campo. Tonava, balenava e io avevo una gran fame e allora il Grillo-parlante mi disse: «Ti sta bene; sei stato cattivo, e te lo meriti», e io gli dissi: «Bada, Grillo!...», e lui mi disse: «Tu sei un burattino e hai la testa di legno» e io gli tirai un martello di legno, e lui morì ma la colpa fu sua, perché io non volevo ammazzarlo, prova ne sia che messi un tegamino sulla brace accesa del caldano, ma il pulcino scappò fuori e disse: «Arrivedella... e tanti saluti a casa» e la fame cresceva sempre, motivo per cui quel vecchino col berretto da notte, affacciandosi alla finestra mi disse: «Fatti sotto e para il cappello» e io con quella catinellata d’acqua sul capo, perché il chiedere un po’ di pane non è vergogna, non è vero? me ne tornai subito a casa, e perché avevo sempre una gran fame, messi i piedi sul caldano per rasciugarmi, e voi siete tornato, e me li sono trovati bruciati, e intanto la fame l’ho sempre e i piedi non li ho più! Ih!... ih!... ih!... ih!... -E il povero Pinocchio cominciò a piangere e a berciare così forte, che lo sentivano da cinque chilometri lontano. -Geppetto, che di tutto quel discorso arruffato aveva capito una cosa sola, cioè che il burattino sentiva morirsi dalla gran fame, tirò fuori di tasca tre pere, e porgendogliele, disse: -– Queste tre pere erano per la mia colazione: ma io te le do volentieri. Mangiale, e buon pro ti faccia. -– Se volete che le mangi, fatemi il piacere di sbucciarle. -– Sbucciarle? – replicò Geppetto meravigliato. – Non avrei mai creduto, ragazzo, mio, che tu fossi così boccuccia e così schizzinoso di palato. Male! In questo mondo, fin da bambini, bisogna avvezzarsi abboccati e a saper mangiare di tutto, perché non si sa mai quel che ci può capitare. I casi son tanti!... -– Voi direte bene, – soggiunse Pinocchio, – ma io non mangerò mai una frutta, che non sia sbucciata. Le bucce non le posso soffrire. -E quel buon uomo di Geppetto, cavato fuori un coltellino, e armatosi di santa pazienza, sbucciò le tre pere, e pose tutte le bucce sopra un angolo della tavola. -Quando Pinocchio in due bocconi ebbe mangiata la prima pera, fece l’atto di buttar via il torsolo: ma Geppetto gli trattenne il braccio, dicendogli: -– Non lo buttar via: tutto in questo mondo può far comodo. -– Ma io il torsolo non lo mangio davvero!... – gridò il burattino, rivoltandosi come una vipera. -– Chi lo sa! I casi son tanti!... – ripeté Geppetto, senza riscaldarsi. -Fatto sta che i tre torsoli, invece di essere gettati fuori dalla finestra, vennero posati sull’angolo della tavola in compagnia delle bucce. -Mangiate o, per dir meglio, divorate le tre pere, Pinocchio fece un lunghissimo sbadiglio e disse piagnucolando: -– Ho dell’altra fame! -– Ma io, ragazzo mio, non ho più nulla da darti. -– Proprio nulla, nulla? -– Ci avrei soltanto queste bucce e questi torsoli di pera. -– Pazienza! – disse Pinocchio, – se non c’è altro, mangerò una buccia. -E cominciò a masticare. Da principio storse un po’ la bocca; ma poi, una dietro l’altra, spolverò in un soffio tutte le bucce: e dopo le bucce, anche i torsoli, e quand’ebbe finito di mangiare ogni cosa, si batté tutto contento le mani sul corpo, e disse gongolando: -– Ora sì che sto bene! -– Vedi dunque, – osservò Geppetto, – che avevo ragione io quando ti dicevo che non bisogna avvezzarsi né troppo sofistici né troppo delicati di palato. Caro mio, non si sa mai quel che ci può capitare in questo mondo. I casi son tanti!... - -VIII Geppetto rifà i piedi a Pinocchio e vende la propria casacca per comprargli l’Abbecedario. - -Il burattino, appena che si fu levata la fame, cominciò subito a bofonchiare e a piangere, perché voleva un paio di piedi nuovi. -Ma Geppetto, per punirlo della monelleria fatta lo lasciò piangere e disperarsi per una mezza giornata: poi gli disse: -– E perché dovrei rifarti i piedi? Forse per vederti scappar di nuovo da casa tua? -– Vi prometto, – disse il burattino singhiozzando, – che da oggi in poi sarò buono... -– Tutti i ragazzi, – replicò Geppetto, – quando vogliono ottenere qualcosa, dicono così. -– Vi prometto che anderò a scuola, studierò e mi farò onore... -– Tutti i ragazzi, quando vogliono ottenere qualcosa, ripetono la medesima storia. -– Ma io non sono come gli altri ragazzi! Io sono più buono di tutti e dico sempre la verità. Vi prometto, babbo, che imparerò un’arte e che sarò la consolazione e il bastone della vostra vecchiaia. -Geppetto che, sebbene facesse il viso di tiranno, aveva gli occhi pieni di pianto e il cuore grosso dalla passione di vedere il suo povero Pinocchio in quello stato compassionevole, non rispose altre parole: ma, presi in mano gli arnesi del mestiere e due pezzetti di legno stagionato, si pose a lavorare di grandissimo impegno. -E in meno d’un’ora, i piedi erano bell’e fatti; due piedini svelti, asciutti e nervosi, come se fossero modellati da un artista di genio. -Allora Geppetto disse al burattino: -– Chiudi gli occhi e dormi! -E Pinocchio chiuse gli occhi e fece finta di dormire. E nel tempo che si fingeva addormentato, Geppetto con un po’ di colla sciolta in un guscio d’uovo gli appiccicò i due piedi al loro posto, e glieli appiccicò così bene, che non si vedeva nemmeno il segno dell’attaccatura. -Appena il burattino si accorse di avere i piedi, saltò giù dalla tavola dove stava disteso, e principiò a fare mille sgambetti e mille capriole, come se fosse ammattito dalla gran contentezza. -– Per ricompensarvi di quanto avete fatto per me, – disse Pinocchio al suo babbo, – voglio subito andare a scuola. -– Bravo ragazzo! -– Ma per andare a scuola ho bisogno d’un po’ di vestito. -Geppetto, che era povero e non aveva in tasca nemmeno un centesimo, gli fece allora un vestituccio di carta fiorita, un paio di scarpe di scorza di albero e un berrettino di midolla di pane. -Pinocchio corse subito a specchiarsi in una catinella piena d’acqua e rimase così contento di sé, che disse pavoneggiandosi: -– Paio proprio un signore! -– Davvero, – replicò Geppetto, – perché, tienlo a mente, non è il vestito bello che fa il signore. ma è piuttosto il vestito pulito. -– A proposito, – soggiunse il burattino, – per andare alla scuola mi manca sempre qualcosa: anzi mi manca il più e il meglio. -– Cioè? -– Mi manca l’Abbecedario. -– Hai ragione: ma come si fa per averlo? -– È facilissimo: si va da un libraio e si compra. -– E i quattrini? -– Io non ce l’ho. -– Nemmeno io, – soggiunse il buon vecchio, facendosi tristo. -E Pinocchio, sebbene fosse un ragazzo allegrissimo, si fece tristo anche lui: perché la miseria, quando è miseria davvero, la intendono tutti: anche i ragazzi. -– Pazienza! – gridò Geppetto tutt’a un tratto rizzandosi in piedi; e infilatasi la vecchia casacca di fustagno, tutta toppe e rimendi, uscì correndo di casa. -Dopo poco tornò: e quando tornò aveva in mano l’Abbecedario per il figliuolo, ma la casacca non l’aveva più. Il pover’uomo era in maniche di camicia, e fuori nevicava. -– E la casacca, babbo? -– L’ho venduta. -– Perché l’avete venduta? -– Perché mi faceva caldo. -Pinocchio capì questa risposta a volo, e non potendo frenare l’impeto del suo buon cuore, saltò al collo di Geppetto e cominciò a baciarlo per tutto il viso. - -IX Pinocchio vende l’Abbecedario per andare a vedere il teatrino dei burattini. - -Smesso che fu di nevicare, Pinocchio col suo bravo Abbecedario nuovo sotto il braccio, prese la strada che menava alla scuola: e strada facendo, fantasticava nel suo cervellino mille ragionamenti e mille castelli in aria, uno più bello dell’altro. -E discorrendo da sé solo diceva: -– Oggi, alla scuola, voglio subito imparare a leggere: domani poi imparerò a scrivere e domani l’altro imparerò a fare i numeri. Poi, colla mia abilità, guadagnerò molti quattrini e coi primi quattrini che mi verranno in tasca, voglio subito fare al mio babbo una bella casacca di panno. Ma che dico di panno? Gliela voglio fare tutta d’argento e d’oro, e coi bottoni di brillanti. E quel pover’uomo se la merita davvero: perché, insomma, per comprarmi i libri e per farmi istruire, è rimasto in maniche di camicia... a questi freddi! Non ci sono che i babbi che sieno capaci di certi sacrifizi!... -Mentre tutto commosso diceva così gli parve di sentire in lontananza una musica di pifferi e di colpi di grancassa: pì-pì-pì, pì-pì-pì zum, zum, zum, zum. -Si fermò e stette in ascolto. Quei suoni venivano di fondo a una lunghissima strada traversa, che conduceva a un piccolo paesetto fabbricato sulla spiaggia del mare. -– Che cosa sia questa musica? Peccato che io debba andare a scuola, se no... -E rimase lì perplesso. A ogni modo, bisognava prendere una risoluzione: o a scuola, o a sentire i pifferi. -– Oggi anderò a sentire i pifferi, e domani a scuola: per andare a scuola c’è sempre tempo, – disse finalmente quel monello facendo una spallucciata. -Detto fatto, infilò giù per la strada traversa, e cominciò a correre a gambe. Più correva e più sentiva distinto il suono dei pifferi e dei tonfi della grancassa: pì-pì-pì, pì-pì-pì… zum, zum, zum, zum. -Quand’ecco che si trovò in mezzo a una piazza tutta piena di gente, la quale si affollava intorno a un gran baraccone di legno e di tela dipinta di mille colori. -– Che cos’è quel baraccone? – domandò Pinocchio, voltandosi a un ragazzetto che era lì del paese. -– Leggi il cartello, che c’è scritto, e lo saprai. -– Lo leggerei volentieri, ma per l’appunto oggi non so leggere. -– Bravo bue! Allora te lo leggerò io. Sappi dunque che in quel cartello a lettere rosse come il fuoco c’è scritto: GRAN TEATRO DEI BURATTINI... -– È molto che è incominciata la commedia? -– Comincia ora. -– E quanto si spende per entrare? -– Quattro soldi. -Pinocchio, che aveva addosso la febbre della curiosità, perse ogni ritegno, e disse senza vergognarsi al ragazzetto, col quale parlava: -– Mi daresti quattro soldi fino a domani? -– Te li darei volentieri, – gli rispose l’altro canzonandolo, – ma oggi per l’appunto non te li posso dare. -– Per quattro soldi, ti vendo la mia giacchetta, – gli disse allora il burattino. -– Che vuoi che mi faccia di una giacchetta di carta fiorita? Se ci piove su, non c’è più verso di cavartela da dosso. -– Vuoi comprare le mie scarpe? -– Sono buone per accendere il fuoco. -– Quanto mi dai del berretto? -– Bell’acquisto davvero! Un berretto di midolla di pane! C’è il caso che i topi me lo vengano a mangiare in capo! -Pinocchio era sulle spine. Stava lì lì per fare un’ultima offerta: ma non aveva coraggio; esitava, tentennava, pativa. Alla fine disse: -– Vuoi darmi quattro soldi di quest’Abbecedario nuovo? -– Io sono un ragazzo, e non compro nulla dai ragazzi, – gli rispose il suo piccolo interlocutore, che aveva molto più giudizio di lui. -– Per quattro soldi l’Abbecedario lo prendo io, – gridò un rivenditore di panni usati, che s’era trovato presente alla conversazione. -E il libro fu venduto lì sui due piedi. E pensare che quel pover’uomo di Geppetto era rimasto a casa, a tremare dal freddo in maniche di camicia, per comprare l’Abbecedario al figliuolo! - -X I burattini riconoscono il loro fratello Pinocchio e gli fanno una grandissima festa; ma sul più bello, esce fuori il burattinaio Mangiafoco, e Pinocchio corre il pericolo di fare una brutta fine. - -Quando Pinocchio entrò nel teatrino delle marionette, accadde un fatto che destò mezza rivoluzione. -Bisogna sapere che il sipario era tirato su e la commedia era già incominciata. -Sulla scena si vedevano Arlecchino e Pulcinella, che bisticciavano fra di loro e, secondo il solito, minacciavano da un momento all’altro di scambiarsi un carico di schiaffi e di bastonate. -La platea, tutta attenta, si mandava a male dalle grandi risate, nel sentire il battibecco di quei due burattini, che gestivano e si trattavano d’ogni vitupero con tanta verità, come se fossero proprio due animali ragionevoli e due persone di questo mondo. -Quando all’improvviso, che è che non è, Arlecchino smette di recitare, e voltandosi verso il pubblico e accennando colla mano qualcuno in fondo alla platea, comincia a urlare in tono drammatico: -– Numi del firmamento! sogno o son desto? Eppure quello laggiù è Pinocchio!... -– È Pinocchio davvero! – grida Pulcinella. -– È proprio lui! – strilla la signora Rosaura, facendo capolino di fondo alla scena. -– È Pinocchio! è Pinocchio! – urlano in coro tutti i burattini, uscendo a salti fuori delle quinte. -– È Pinocchio! è il nostro fratello Pinocchio! Evviva Pinocchio. -– Pinocchio, vieni quassù da me, – grida Arlecchino, – vieni a gettarti fra le braccia dei tuoi fratelli di legno! -A questo affettuoso invito Pinocchio spicca un salto, e di fondo alla platea va nei posti distinti; poi con un altro salto, dai posti distinti monta sulla testa del direttore d’orchestra, e di lì schizza sul palcoscenico. -È impossibile figurarsi gli abbracciamenti, gli strizzoni di collo, i pizzicotti dell’amicizia e le zuccate della vera e sincera fratellanza, che Pinocchio ricevé in mezzo a tanto arruffio dagli attori e dalle attrici di quella compagnia drammatico-vegetale. -Questo spettacolo era commovente, non c’è che dire: ma il pubblico della platea, vedendo che la commedia non andava più avanti, s’impazientì e prese a gridare: -– Vogliamo la commedia, vogliamo la commedia! -Tutto fiato buttato via, perché i burattini, invece di continuare la recita, raddoppiarono il chiasso e le grida, e, postosi Pinocchio sulle spalle, se lo portarono in trionfo davanti ai lumi della ribalta. -Allora uscì fuori il burattinaio, un omone così brutto, che metteva paura soltanto a guardarlo. Aveva una barbaccia nera come uno scarabocchio d’inchiostro, e tanto lunga che gli scendeva dal mento fino a terra: basta dire che, quando camminava, se la pestava coi piedi. La sua bocca era larga come un forno, i suoi occhi parevano due lanterne di vetro rosso, col lume acceso di dietro, e con le mani faceva schioccare una grossa frusta, fatta di serpenti e di code di volpe attorcigliate insieme. -All’apparizione inaspettata del burattinaio, ammutolirono tutti: nessuno fiatò più. Si sarebbe sentito volare una mosca. Quei poveri burattini, maschi e femmine, tremavano tutti come tante foglie. -– Perché sei venuto a mettere lo scompiglio nel mio teatro? – domandò il burattinaio a Pinocchio, con un vocione d’Orco gravemente infreddato di testa. -– La creda, illustrissimo, che la colpa non è stata mia!... -– Basta così! Stasera faremo i nostri conti. -Difatti, finita la recita della commedia, il burattinaio andò in cucina, dov’egli s’era preparato per cena un bel montone, che girava lentamente infilato nello spiedo. E perché gli mancavano la legna per finirlo di cuocere e di rosolare, chiamò Arlecchino e Pulcinella e disse loro: -– Portatemi di qua quel burattino che troverete attaccato al chiodo. Mi pare un burattino fatto di un legname molto asciutto, e sono sicuro che, a buttarlo sul fuoco, mi darà una bellissima fiammata all’arrosto. -Arlecchino e Pulcinella da principio esitarono; ma impauriti da un’occhiataccia del loro padrone, obbedirono: e dopo poco tornarono in cucina, portando sulle braccia il povero Pinocchio, il quale, divincolandosi come un’anguilla fuori dell’acqua, strillava disperatamente: -– Babbo mio, salvatemi! Non voglio morire, non voglio morire!... - -XI Mangiafoco starnutisce e perdona a Pinocchio, il quale poi difende dalla morte il suo amico Arlecchino. - -Il burattinaio Mangiafoco che (questo era il suo nome) pareva un uomo spaventoso, non dico di no, specie con quella sua barbaccia nera che, a uso grembiale, gli copriva tutto il petto e tutte le gambe; ma nel fondo poi non era un cattiv’uomo. Prova ne sia che quando vide portarsi davanti quel povero Pinocchio, che si dibatteva per ogni verso, urlando «Non voglio morire, non voglio morire!», principiò subito a commuoversi e a impietosirsi e, dopo aver resistito un bel pezzo, alla fine non ne poté più, e lasciò andare un sonorissimo starnuto. -A quello starnuto, Arlecchino, che fin allora era stato afflitto e ripiegato come un salcio piangente, si fece tutto allegro in viso, e chinatosi verso Pinocchio, gli bisbigliò sottovoce: -– Buone nuove, fratello. Il burattinaio ha starnutito, e questo è segno che s’è mosso a compassione per te, e oramai sei salvo. -Perché bisogna sapere che, mentre tutti gli uomini, quando si sentono impietositi per qualcuno, o piangono o per lo meno fanno finta di rasciugarsi gli occhi, Mangiafoco, invece, ogni volta che s’inteneriva davvero, aveva il vizio di starnutire. Era un modo come un altro, per dare a conoscere agli altri la sensibilità del suo cuore. -Dopo aver starnutito, il burattinaio, seguitando a fare il burbero, gridò a Pinocchio: -– Finiscila di piangere! I tuoi lamenti mi hanno messo un’uggiolina in fondo allo stomaco... Sento uno spasimo, che quasi quasi... Etcì! etcì! – e fece altri due starnuti. -– Felicità! – disse Pinocchio. -– Grazie! E il tuo babbo e la tua mamma sono sempre vivi? – gli domandò Mangiafoco. -– Il babbo, sì la mamma non l’ho mai conosciuta. -– Chi lo sa che dispiacere sarebbe per il tuo vecchio padre, se ora ti facessi gettare fra quei carboni ardenti! Povero vecchio! lo compatisco!.. Etcì, etcì, etcì, – e fece altri tre starnuti. -– Felicità! – disse Pinocchio. -– Grazie! Del resto bisogna compatire anche me, perché, come vedi, non ho più legna per finire di cuocere quel montone arrosto, e tu, dico la verità, in questo caso mi avresti fatto un gran comodo! Ma oramai mi sono impietosito e ci vuol pazienza. Invece di te, metterò a bruciare sotto lo spiedo qualche burattino della mia Compagnia... Olà, giandarmi! -A questo comando comparvero subito due giandarmi di legno, lunghi lunghi, secchi secchi, col cappello a lucerna in testa e colla sciabola sfoderata in mano. -Allora il burattinaio disse loro con voce rantolosa: -– Pigliatemi lì quell’Arlecchino, legatelo ben bene, e poi gettatelo a bruciare sul fuoco. Io voglio che il mio montone sia arrostito bene! -Figuratevi il povero Arlecchino! Fu tanto il suo spavento, che le gambe gli si ripiegarono e cadde bocconi per terra. -Pinocchio, alla vista di quello spettacolo straziante, andò a gettarsi ai piedi del burattinaio e piangendo dirottamente e bagnandogli di lacrime tutti i peli della lunghissima barba, cominciò a dire con voce supplichevole: -– Pietà, signor Mangiafoco!... -– Qui non ci son signori! – replicò duramente il burattinaio. -– Pietà, signor Cavaliere!... -– Qui non ci son cavalieri! -– Pietà, signor Commendatore!... -– Qui non ci son commendatori! -– Pietà, Eccellenza!... -A sentirsi chiamare Eccellenza il burattinaio fece subito il bocchino tondo, e diventato tutt’a un tratto più umano e più trattabile, disse a Pinocchio: -– Ebbene, che cosa vuoi da me? -– Vi domando grazia per il povero Arlecchino!... -– Qui non c’è grazia che tenga. Se ho risparmiato te, bisogna che faccia mettere sul fuoco lui, perché io voglio che il mio montone sia arrostito bene. -– In questo caso, – gridò fieramente Pinocchio, rizzandosi e gettando via il suo berretto di midolla di pane, – in questo caso conosco qual è il mio dovere. Avanti, signori giandarmi! Legatemi e gettatemi là fra quelle fiamme. No, non è giusta che il povero Arlecchino, il vero amico mio, debba morire per me!... -Queste parole, pronunziate con voce alta e con accento eroico, fecero piangere tutti i burattini che erano presenti a quella scena. Gli stessi giandarmi, sebbene fossero di legno, piangevano come due agnellini di latte. -Mangiafoco, sul principio, rimase duro e immobile come un pezzo di ghiaccio: ma poi, adagio adagio, cominciò anche lui a commuoversi e a starnutire. E fatti quattro o cinque starnuti, aprì affettuosamente le braccia e disse a Pinocchio: -– Tu sei un gran bravo ragazzo! Vieni qua da me e dammi un bacio. -Pinocchio corse subito, e arrampicandosi come uno scoiattolo su per la barba del burattinaio, andò a posargli un bellissimo bacio sulla punta del naso. -– Dunque la grazia è fatta? – domandò il povero Arlecchino, con un fil di voce che si sentiva appena. -– La grazia è fatta! – rispose Mangiafoco: poi soggiunse sospirando e tentennando il capo: – Pazienza! Per questa sera mi rassegnerò a mangiare il montone mezzo crudo, ma un’altra volta, guai a chi toccherà!... -Alla notizia della grazia ottenuta, i burattini corsero tutti sul palcoscenico e, accesi i lumi e i lampadari come in serata di gala, cominciarono a saltare e a ballare. Era l’alba e ballavano sempre. - -XII Il burattinaio Mangiafoco regala cinque monete d’oro a Pinocchio, perché le porti al suo babbo Geppetto: e Pinocchio, invece, si lascia abbindolare dalla Volpe e dal Gatto e se ne va con loro. - -Il giorno dipoi Mangiafoco chiamò in disparte Pinocchio e gli domandò: -– Come si chiama tuo padre? -– Geppetto. -– E che mestiere fa? -– Il povero. -– Guadagna molto? -– Guadagna tanto, quanto ci vuole per non aver mai un centesimo in tasca. Si figuri che per comprarmi l’Abbecedario della scuola dové vendere l’unica casacca che aveva addosso: una casacca che, fra toppe e rimendi, era tutta una piaga. -– Povero diavolo! Mi fa quasi compassione. Ecco qui cinque monete d’oro. Vai subito a portargliele e salutalo tanto da parte mia. -Pinocchio, com’è facile immaginarselo, ringraziò mille volte il burattinaio, abbracciò, a uno a uno, tutti i burattini della Compagnia, anche i giandarmi: e fuori di sé dalla contentezza, si mise in viaggio per tornarsene a casa sua. -Ma non aveva fatto ancora mezzo chilometro, che incontrò per la strada una Volpe zoppa da un piede e un Gatto cieco da tutt’e due gli occhi, che se ne andavano là là, aiutandosi fra di loro, da buoni compagni di sventura. La Volpe che era zoppa, camminava appoggiandosi al Gatto: e il Gatto, che era cieco, si lasciava guidare dalla Volpe. -– Buon giorno, Pinocchio, – gli disse la Volpe, salutandolo garbatamente. -– Com’è che sai il mio nome? – domandò il burattino. -– Conosco bene il tuo babbo. -– Dove l’hai veduto? -– L’ho veduto ieri sulla porta di casa sua. -– E che cosa faceva? -– Era in maniche di camicia e tremava dal freddo. -– Povero babbo! Ma, se Dio vuole, da oggi in poi non tremerà più!... -– Perché? -– Perché io sono diventato un gran signore. -– Un gran signore tu? – disse la Volpe, e cominciò a ridere di un riso sguaiato e canzonatore: e il Gatto rideva anche lui, ma per non darlo a vedere, si pettinava i baffi colle zampe davanti. -– C’è poco da ridere, – gridò Pinocchio impermalito. – Mi dispiace davvero di farvi venire l’acquolina in bocca, ma queste qui, se ve ne intendete, sono cinque bellissime monete d’oro. -E tirò fuori le monete avute in regalo da Mangiafoco. -Al simpatico suono di quelle monete la Volpe, per un moto involontario, allungò la gamba che pareva rattrappita, e il Gatto spalancò tutt’e due gli occhi, che parvero due lanterne verdi: ma poi li richiuse subito, tant’è vero che Pinocchio non si accorse di nulla. -– E ora, – gli domandò la Volpe, – che cosa vuoi farne di codeste monete? -– Prima di tutto, – rispose il burattino, – voglio comprare per il mio babbo una bella casacca nuova, tutta d’oro e d’argento e coi bottoni di brillanti: e poi voglio comprare un Abbecedario per me. -– Per te? -– Davvero: perché voglio andare a scuola e mettermi a studiare a buono. -– Guarda me! – disse la Volpe. – Per la passione sciocca di studiare ho perduto una gamba. -– Guarda me! – disse il Gatto. – Per la passione sciocca di studiare ho perduto la vista di tutti e due gli occhi. -In quel mentre un Merlo bianco, che se ne stava appollaiato sulla siepe della strada, fece il solito verso e disse: -– Pinocchio, non dar retta ai consigli dei cattivi compagni: se no, te ne pentirai! -Povero Merlo, non l’avesse mai detto! Il Gatto, spiccando un gran salto, gli si avventò addosso, e senza dargli nemmeno il tempo di dire ohi se lo mangiò in un boccone, con le penne e tutto. -Mangiato che l’ebbe e ripulitasi la bocca, chiuse gli occhi daccapo e ricominciò a fare il cieco, come prima. -– Povero Merlo! – disse Pinocchio al Gatto, – perché l’hai trattato così male? -– Ho fatto per dargli una lezione. Così un’altra volta imparerà a non metter bocca nei discorsi degli altri. -Erano giunti più che a mezza strada, quando la Volpe, fermandosi di punto in bianco, disse al burattino: -– Vuoi raddoppiare le tue monete d’oro? -– Cioè? -– Vuoi tu, di cinque miserabili zecchini, farne cento, mille, duemila? -– Magari! E la maniera? -– La maniera è facilissima. Invece di tornartene a casa tua, dovresti venire con noi. -– E dove mi volete condurre? -– Nel paese dei Barbagianni. -Pinocchio ci pensò un poco, e poi disse risolutamente: -– No, non ci voglio venire. Oramai sono vicino a casa, e voglio andarmene a casa, dove c’è il mio babbo che m’aspetta. Chi lo sa, povero vecchio, quanto ha sospirato ieri, a non vedermi tornare. Pur troppo io sono stato un figliolo cattivo, e il Grillo-parlante aveva ragione quando diceva: «I ragazzi disobbedienti non possono aver bene in questo mondo». E io l’ho provato a mie spese, Perché mi sono capitate dimolte disgrazie, e anche ieri sera in casa di Mangiafoco, ho corso pericolo... Brrr! mi viene i bordoni soltanto a pensarci! -– Dunque, – disse la Volpe, – vuoi proprio andare a casa tua? Allora vai pure, e tanto peggio per te! -– Tanto peggio per te! – ripeté il Gatto. -– Pensaci bene, Pinocchio, perché tu dai un calcio alla fortuna. -– Alla fortuna! – ripeté il Gatto. -– I tuoi cinque zecchini, dall’oggi al domani sarebbero diventati duemila. -– Duemila! – ripeté il Gatto. -– Ma com’è mai possibile che diventino tanti? – domandò Pinocchio, restando a bocca aperta dallo stupore. -– Te lo spiego subito, – disse la Volpe. – Bisogna sapere che nel paese dei Barbagianni c’è un campo benedetto, chiamato da tutti il Campo dei miracoli. Tu fai in questo campo una piccola buca e ci metti dentro per esempio uno zecchino d’oro. Poi ricuopri la buca con un po’ di terra: l’annaffi con due secchie d’acqua di fontana, ci getti sopra una presa di sale, e la sera te ne vai tranquillamente a letto. Intanto, durante la notte, lo zecchino germoglia e fiorisce, e la mattina dopo, di levata, ritornando nel campo, che cosa trovi? Trovi un bell’albero carico di tanti zecchini d’oro, quanti chicchi di grano può avere una bella spiga nel mese di giugno. -– Sicché dunque, – disse Pinocchio sempre più sbalordito, – se io sotterrassi in quel campo i miei cinque zecchini, la mattina dopo quanti zecchini ci troverei? -– È un conto facilissimo, – rispose la Volpe, – un conto che puoi farlo sulla punta delle dita. Poni che ogni zecchino ti faccia un grappolo di cinquecento zecchini: moltiplica il cinquecento per cinque e la mattina dopo ti trovi in tasca duemila cinquecento zecchini lampanti e sonanti. -– Oh che bella cosa! – gridò Pinocchio, ballando dall’allegrezza. – Appena che questi zecchini gli avrò raccolti, ne prenderò per me duemila e gli altri cinquecento di più li darò in regalo a voi altri due. -– Un regalo a noi? – gridò la Volpe sdegnandosi e chiamandosi offesa. – Dio te ne liberi! -– Te ne liberi! – ripeté il Gatto. -– Noi, – riprese la Volpe, – non lavoriamo per il vile interesse: noi lavoriamo unicamente per arricchire gli altri. -– Gli altri! – ripeté il Gatto. -– Che brave persone! – pensò dentro di sé Pinocchio: e dimenticandosi lì sul tamburo, del suo babbo, della casacca nuova, dell’Abbecedario e di tutti i buoni proponimenti fatti, disse alla Volpe e al Gatto: -– Andiamo pure. Io vengo con voi. - -XIII L’osteria del Gambero Rosso. - -Cammina, cammina, cammina, alla fine sul far della sera arrivarono stanchi morti all’osteria del Gambero Rosso. -– Fermiamoci un po’ qui, – disse la Volpe, – tanto per mangiare un boccone e per riposarci qualche ora. A mezzanotte poi ripartiremo per essere domani, all’alba, nel Campo dei miracoli. -Entrati nell’osteria, si posero tutti e tre a tavola: ma nessuno di loro aveva appetito. -Il povero Gatto, sentendosi gravemente indisposto di stomaco, non poté mangiare altro che trentacinque triglie con salsa di pomodoro e quattro porzioni di trippa alla parmigiana: e perché la trippa non gli pareva condita abbastanza, si rifece tre volte a chiedere il burro e il formaggio grattato! -La Volpe avrebbe spelluzzicato volentieri qualche cosa anche lei: ma siccome il medico le aveva ordinato una grandissima dieta, così dové contentarsi di una semplice lepre dolce e forte con un leggerissimo contorno di pollastre ingrassate e di galletti di primo canto. Dopo la lepre si fece portare per tornagusto un cibreino di pernici, di starne, di conigli, di ranocchi, di lucertole e d’uva paradisa; e poi non volle altro. Aveva tanta nausea per il cibo, diceva lei, che non poteva accostarsi nulla alla bocca. -Quello che mangiò meno di tutti fu Pinocchio. Chiese uno spicchio di noce e un cantuccino di pane, e lasciò nel piatto ogni cosa. Il povero figliuolo col pensiero sempre fisso al Campo dei miracoli, aveva preso un’indigestione anticipata di monete d’oro. -Quand’ebbero cenato, la Volpe disse all’oste: -– Dateci due buone camere, una per il signor Pinocchio e un’altra per me e per il mio compagno. Prima di ripartire schiacceremo un sonnellino. Ricordatevi però che a mezzanotte vogliamo essere svegliati per continuare il nostro viaggio. -– Sissignori, – rispose l’oste e strizzò l’occhio alla Volpe e al Gatto, come dire: «Ho mangiata la foglia e ci siamo intesi!...». -Appena che Pinocchio fu entrato nel letto, si addormentò a colpo e principiò a sognare. E sognando gli pareva di essere in mezzo a un campo, e questo campo era pieno di arboscelli carichi di grappoli, e questi grappoli erano carichi di zecchini d’oro che, dondolandosi mossi dal vento, facevano zin, zin, zin, quasi volessero dire: «Chi ci vuole venga a prenderci». Ma quando Pinocchio fu sul più bello, quando, cioè, allungò la mano per prendere a manciate tutte quelle belle monete e mettersele in tasca, si trovò svegliato all’improvviso da tre violentissimi colpi dati nella porta di camera. -Era l’oste che veniva a dirgli che la mezzanotte era suonata. -– E i miei compagni sono pronti? – gli domandò il burattino. -– Altro che pronti! Sono partiti due ore fa. -– Perché mai tanta fretta? -– Perché il Gatto ha ricevuto un’imbasciata, che il suo gattino maggiore, malato di geloni ai piedi, stava in pericolo di vita. -– E la cena l’hanno pagata? -– Che vi pare? Quelle lì sono persone troppo educate perché facciano un affronto simile alla signoria vostra. -– Peccato! Quest’affronto mi avrebbe fatto tanto piacere! – disse Pinocchio, grattandosi il capo. Poi domandò: -– E dove hanno detto di aspettarmi quei buoni amici? -– Al Campo dei miracoli, domattina, allo spuntare del giorno. -Pinocchio pagò uno zecchino per la cena sua e per quella dei suoi compagni, e dopo partì. -Ma si può dire che partisse a tastoni, perché fuori dell’osteria c’era un buio così buio, che non ci si vedeva da qui a lì. Nella campagna all’intorno non si sentiva alitare una foglia. Solamente alcuni uccellacci notturni, traversando la strada da una siepe all’altra, venivano a sbattere le ali sul naso di Pinocchio, il quale, facendo un salto indietro per la paura, gridava: – Chi va là? – e l’eco delle colline circostanti ripeteva in lontananza: – Chi va là? chi va là? chi va là? -Intanto, mentre camminava, vide sul tronco di un albero un piccolo animaletto che riluceva di una luce pallida e opaca, come un lumino da notte dentro una lampada di porcellana trasparente. -– Chi sei? – gli domandò Pinocchio. -– Sono l’ombra del Grillo-parlante, – rispose l’animaletto, con una vocina fioca fioca, che pareva venisse dal mondo di là. -– Che vuoi da me? – disse il burattino. -– Voglio darti un consiglio. Ritorna indietro e porta i quattro zecchini, che ti sono rimasti, al tuo povero babbo che piange e si dispera per non averti più veduto. -– Domani il mio babbo sarà un gran signore, perché questi quattro zecchini diventeranno duemila. -– Non ti fidare, ragazzo mio, di quelli che promettono di farti ricco dalla mattina alla sera. Per il solito, o sono matti o imbroglioni! Dai retta a me, ritorna indietro. -– E io, invece, voglio andare avanti. -– L’ora è tarda!... -– Voglio andare avanti. -– La nottata è scura... -– Voglio andare avanti. -– La strada è pericolosa... -– Voglio andare avanti. -– Ricordati che i ragazzi che vogliono fare di loro capriccio e a modo loro, prima o poi se ne pentono. -– Le solite storie. Buona notte, Grillo. -– Buona notte, Pinocchio, e che il cielo ti salvi dalla guazza e dagli assassini! -Appena dette queste ultime parole, il Grillo-parlante si spense a un tratto, come si spenge un lume soffiandoci sopra, e la strada rimase più buia di prima. - -XIV Pinocchio, per non aver dato retta ai buoni consigli del Grillo-parlante, s’imbatte negli assassini. - -– Davvero, – disse fra sé il burattino rimettendosi in viaggio, – come siamo disgraziati noialtri poveri ragazzi! Tutti ci sgridano, tutti ci ammoniscono, tutti ci danno consigli. A lasciarli dire, tutti si metterebbero in capo di essere i nostri babbi e i nostri maestri; tutti: anche i Grilli-parlanti. Ecco qui: perché io non ho voluto dar retta a quell’uggioso di Grillo, chi lo sa quante disgrazie, secondo lui, mi dovrebbero accadere! Dovrei incontrare anche gli assassini! Meno male che agli assassini io non ci credo, né ci ho creduto mai. Per me gli assassini sono stati inventati apposta dai babbi, per far paura ai ragazzi che vogliono andare fuori la notte. E poi se anche li trovassi qui sulla strada, mi darebbero forse soggezione? Neanche per sogno. Anderei loro sul viso, gridando: «Signori assassini, che cosa vogliono da me? Si rammentino che con me non si scherza! Se ne vadano dunque per i fatti loro, e zitti!». A questa parlantina fatta sul serio, quei poveri assassini, mi par di vederli, scapperebbero via come il vento. Caso poi fossero tanto ineducati da non voler scappare, allora scapperei io, e così la farei finita... -Ma Pinocchio non poté finire il suo ragionamento, perché in quel punto gli parve di sentire dietro di sé un leggerissimo fruscio di foglie. -Si voltò a guardare e vide nel buio due figuracce nere tutte imbacuccate in due sacchi da carbone, le quali correvano dietro a lui a salti e in punta di piedi, come se fossero due fantasmi. -– Eccoli davvero! – disse dentro di sé: e non sapendo dove nascondere i quattro zecchini, se li nascose in bocca e precisamente sotto la lingua. -Poi si provò a scappare. Ma non aveva ancor fatto il primo passo, che sentì agguantarsi per le braccia e intese due voci orribili e cavernose, che gli dissero: -– O la borsa o la vita! -Pinocchio non potendo rispondere con le parole, a motivo delle monete che aveva in bocca, fece mille salamelecchi e mille pantomime per dare ad intendere a quei due incappati, di cui si vedevano soltanto gli occhi attraverso i buchi dei sacchi, che lui era un povero burattino, e che non aveva in tasca nemmeno un centesimo falso. -– Via, via! Meno ciarle e fuori i denari! – gridavano minacciosamente i due briganti. -E il burattino fece col capo e colle mani un segno come dire: «Non ne ho». -– Metti fuori i denari o sei morto, - disse l’assassino più alto di statura. -- Morto! - ripeté l’altro. -– E dopo ammazzato te, ammazzeremo anche tuo padre! -– Anche tuo padre! -– No, no, no, il mio povero babbo no! – gridò Pinocchio con accento disperato: ma nel gridare così, gli zecchini gli suonarono in bocca. -– Ah! furfante! Dunque i denari te li sei nascosti sotto la lingua? Sputali subito! -E Pinocchio, duro! -– Ah! tu fai il sordo? Aspetta un poco, che penseremo noi a farteli sputare! -Difatti, uno di loro afferrò il burattino per la punta del naso e quell’altro lo prese per la bazza, e lì cominciarono a tirare screanzatamente, uno per in qua e l’altro per in là, tanto da costringerlo a spalancare la bocca: ma non ci fu verso. La bocca del burattino pareva inchiodata e ribadita. -Allora l’assassino più piccolo di statura, cavato fuori un coltellaccio, provò a conficcarglielo, a guisa di leva e di scalpello, fra le labbra: ma Pinocchio, lesto come un lampo, gli azzannò la mano coi denti, e dopo avergliela con un morso staccata di netto, la sputò; e figuratevi la sua maraviglia quando, invece di una mano, si accorse di aver sputato in terra uno zampetto di gatto. -Incoraggiato da questa prima vittoria, si liberò a forza dalle unghie degli assassini e, saltata la siepe della strada, cominciò a fuggire per la campagna. E gli assassini a correre dietro a lui, come due cani dietro una lepre: e quello che aveva perduto uno zampetto correva con una gamba sola, né si è saputo mai come facesse. -Dopo una corsa di quindici chilometri, Pinocchio non ne poteva più. Allora, vistosi perso, si arrampicò su per il fusto di un altissimo pino e si pose a sedere in vetta ai rami. Gli assassini tentarono di arrampicarsi anche loro, ma giunti a metà del fusto sdrucciolarono e, ricascando a terra, si spellarono le mani e i piedi. -Non per questo si dettero per vinti: che anzi, raccolto un fastello di legna secche a piè del pino, vi appiccarono il fuoco. In men che non si dice, il pino cominciò a bruciare e a divampare, come una candela agitata dal vento. Pinocchio, vedendo che le fiamme salivano sempre più, e non volendo far la fine del piccione arrosto, spiccò un bel salto di vetta all’albero, e via a correre daccapo attraverso ai campi e ai vigneti. E gli assassini dietro, sempre dietro, senza stancarsi mai. -Intanto cominciava a baluginare il giorno e si rincorrevano sempre; quand’ecco che Pinocchio si trovò sbarrato il passo da un fosso largo e profondissimo, tutto pieno di acquaccia sudicia, color del caffè e latte. Che fare? «Una, due, tre!» gridò il burattino, e slanciandosi con una gran rincorsa, saltò dall’altra parte. E gli assassini saltarono anche loro, ma non avendo preso bene la misura, patatunfete!... cascarono giù nel bel mezzo del fosso. Pinocchio che sentì il tonfo e gli schizzi dell’acqua, urlò ridendo e seguitando a correre: -– Buon bagno, signori assassini. -E già si figurava che fossero bell’e affogati, quando invece, voltandosi a guardare, si accòrse che gli correvano dietro tutti e due, sempre imbacuccati nei loro sacchi e grondanti acqua come due panieri sfondati. - -XV Gli assassini inseguono Pinocchio; e, dopo averlo raggiunto, lo impiccano a un ramo della Quercia grande. - -Allora il burattino, perdutosi d’animo, fu proprio sul punto di gettarsi in terra e di darsi per vinto, quando nel girare gli occhi all’intorno vide fra mezzo al verde cupo degli alberi biancheggiare in lontananza una casina candida come la neve. -– Se io avessi tanto fiato da arrivare fino a quella casa, forse sarei salvo, – disse dentro di sé. -E senza indugiare un minuto riprese a correre per il bosco a carriera distesa. E gli assassini sempre dietro. -E dopo una corsa disperata di quasi due ore, finalmente tutto trafelato arrivò alla porta di quella casina e bussò. -Nessuno rispose. -Tornò a bussare con maggior violenza, perché sentiva avvicinarsi il rumore dei passi e il respiro grosso e affannoso de’ suoi persecutori. -Lo stesso silenzio. -Avvedutosi che il bussare non giovava a nulla, cominciò per disperazione a dare calci e zuccate nella porta. Allora si affacciò alla finestra una bella bambina, coi capelli turchini e il viso bianco come un’immagine di cera, gli occhi chiusi e le mani incrociate sul petto, la quale senza muovere punto le labbra, disse con una vocina che pareva venisse dall’altro mondo: -– In questa casa non c’è nessuno. Sono tutti morti. -– Aprimi almeno tu! – gridò Pinocchio piangendo e raccomandandosi. -– Sono morta anch’io. -– Morta? e allora che cosa fai costì alla finestra? -– Aspetto la bara che venga a portarmi via. -Appena detto così, la bambina disparve, e la finestra si richiuse senza far rumore. -– O bella bambina dai capelli turchini, – gridava Pinocchio, – aprimi per carità! Abbi compassione di un povero ragazzo inseguito dagli assass... -Ma non poté finir la parola, perché sentì afferrarsi per il collo, e le solite due vociaccie che gli brontolarono minacciosamente: -– Ora non ci scappi più! -Il burattino, vedendosi balenare la morte dinanzi agli occhi, fu preso da un tremito così forte, che nel tremare, gli sonavano le giunture delle sue gambe di legno e i quattro zecchini che teneva nascosti sotto la lingua. -– Dunque? – gli domandarono gli assassini, – vuoi aprirla la bocca, sì o no? Ah! non rispondi?... Lascia fare: ché questa volta te la faremo aprir noi!... -E cavato fuori due coltellacci lunghi lunghi e affilati come rasoi, zaff... gli affibbiarono due colpi nel mezzo alle reni. -Ma il burattino per sua fortuna era fatto d’un legno durissimo, motivo per cui le lame, spezzandosi, andarono in mille schegge e gli assassini rimasero col manico dei coltelli in mano, a guardarsi in faccia. -– Ho capito, – disse allora uno di loro, – bisogna impiccarlo! Impicchiamolo! -– Impicchiamolo, – ripeté l’altro. -Detto fatto, gli legarono le mani dietro le spalle e passatogli un nodo scorsoio intorno alla gola, lo attaccarono penzoloni al ramo di una grossa pianta detta la Quercia grande. -Poi si posero là, seduti sull’erba, aspettando che il burattino facesse l’ultimo sgambetto: ma il burattino, dopo tre ore, aveva sempre gli occhi aperti, la bocca chiusa e sgambettava più che mai. -Annoiati finalmente di aspettare, si voltarono a Pinocchio e gli dissero sghignazzando: -– Addio a domani. Quando domani torneremo qui, si spera che ci farai la garbatezza di farti trovare bell’e morto e con la bocca spalancata. -E se ne andarono. -Intanto s’era levato un vento impetuoso di tramontana, che soffiando e mugghiando con rabbia, sbatacchiava in qua e in là il povero impiccato, facendolo dondolare violentemente come il battaglio di una campana che suona a festa. E quel dondolìo gli cagionava acutissimi spasimi, e il nodo scorsoio, stringendosi sempre più alla gola, gli toglieva il respiro. -A poco a poco gli occhi gli si appannavano; e sebbene sentisse avvicinarsi la morte, pure sperava sempre che da un momento all’altro sarebbe capitata qualche anima pietosa a dargli aiuto. Ma quando, aspetta aspetta, vide che non compariva nessuno, proprio nessuno, allora gli tornò in mente il suo povero babbo... e balbettò quasi moribondo: -– Oh babbo mio! se tu fossi qui!... -E non ebbe fiato per dir altro. Chiuse gli occhi, aprì la bocca, stirò le gambe e, dato un grande scrollone, rimase lì come intirizzito. - -XVI La bella Bambina dai capelli turchini fa raccogliere il burattino: lo mette a letto, e chiama tre medici per sapere se sia vivo o morto. - -In quel mentre che il povero Pinocchio impiccato dagli assassini a un ramo della Quercia grande, pareva oramai più morto che vivo, la bella Bambina dai capelli turchini si affacciò daccapo alla finestra, e impietositasi alla vista di quell’infelice che, sospeso per il collo, ballava il trescone alle ventate di tramontana, batté per tre volte le mani insieme, e fece tre piccoli colpi. -A questo segnale si sentì un gran rumore di ali che volavano con foga precipitosa, e un grosso falco venne a posarsi sul davanzale della finestra. -– Che cosa comandate, mia graziosa Fata? – disse il Falco abbassando il becco in atto di reverenza (perché bisogna sapere che la Bambina dai capelli turchini non era altro, in fin dei conti, che una buonissima Fata, che da più di mill’anni abitava nelle vicinanze di quel bosco): -– Vedi tu quel burattino attaccato penzoloni a un ramo della Quercia grande? -– Lo vedo. -– Orbene: vola subito laggiù: rompi col tuo fortissimo becco il nodo che lo tiene sospeso in aria e posalo delicatamente sdraiato sull’erba a piè della Quercia. -Il Falco volò via e dopo due minuti tornò dicendo: -– Quel che mi avete comandato, è fatto. -– E come l’hai trovato? Vivo o morto? -– A vederlo, pareva morto, ma non dev’essere ancora morto perbene, perché, appena gli ho sciolto il nodo scorsoio che lo stringeva intorno alla gola, ha lasciato andare un sospiro, balbettando a mezza voce: «Ora mi sento meglio!». -Allora la Fata, battendo le mani insieme, fece due piccoli colpi, e apparve un magnifico Can-barbone, che camminava ritto sulle gambe di dietro, tale e quale come se fosse un uomo. -Il Can-barbone era vestito da cocchiere in livrea di gala. Aveva in capo un nicchiettino a tre punte gallonato d’oro, una parrucca bianca coi riccioli che gli scendevano giù per il collo, una giubba color di cioccolata coi bottoni di brillanti e con due grandi tasche per tenervi gli ossi che gli regalava a pranzo la padrona, un paio di calzoni corti di velluto cremisi, le calze di seta, gli scarpini scollati, e di dietro una specie di fodera da ombrelli, tutta di raso turchino, per mettervi dentro la coda, quando il tempo cominciava a piovere. -– Su da bravo, Medoro! – disse la Fata al Can-barbone; – Fai subito attaccare la più bella carrozza della mia scuderia e prendi la via del bosco. Arrivato che sarai sotto la Quercia grande, troverai disteso sull’erba un povero burattino mezzo morto. Raccoglilo con garbo, posalo pari pari su i cuscini della carrozza e portamelo qui. Hai capito? -Il Can-barbone, per fare intendere che aveva capito, dimenò tre o quattro volte la fodera di raso turchino, che aveva dietro, e partì come un barbero. -Di lì a poco, si vide uscire dalla scuderia una bella carrozzina color dell’aria, tutta imbottita di penne di canarino e foderata nell’interno di panna montata e di crema coi savoiardi. La carrozzina era tirata da cento pariglie di topini bianchi, e il Can-barbone, seduto a cassetta, schioccava la frusta a destra e a sinistra, come un vetturino quand’ha paura di aver fatto tardi. -Non era ancora passato un quarto d’ora, che la carrozzina tornò, e la Fata, che stava aspettando sull’uscio di casa, prese in collo il povero burattino, e portatolo in una cameretta che aveva le pareti di madreperla, mandò subito a chiamare i medici più famosi del vicinato. -E i medici arrivarono subito, uno dopo l’altro: arrivò, cioè, un Corvo, una Civetta e un Grillo-parlante. -– Vorrei sapere da lor signori, – disse la Fata, rivolgendosi ai tre medici riuniti intorno al letto di Pinocchio, – vorrei sapere da lor signori se questo disgraziato burattino sia morto o vivo!... -A quest’invito, il Corvo, facendosi avanti per il primo, tastò il polso a Pinocchio: poi gli tastò il naso, poi il dito mignolo dei piedi: e quand’ebbe tastato ben bene, pronunziò solennemente queste parole: -– A mio credere il burattino è bell’e morto: ma se per disgrazia non fosse morto, allora sarebbe indizio sicuro che è sempre vivo! -– Mi dispiace, – disse la Civetta, – di dover contraddire il Corvo, mio illustre amico e collega: per me, invece, il burattino è sempre vivo; ma se per disgrazia non fosse vivo, allora sarebbe segno che è morto davvero! -– E lei non dice nulla? – domandò la Fata al Grillo-parlante. -– Io dico che il medico prudente quando non sa quello che dice, la miglior cosa che possa fare, è quella di stare zitto. Del resto quel burattino lì non m’è fisonomia nuova: io lo conosco da un pezzo!... -Pinocchio, che fin allora era stato immobile come un vero pezzo di legno, ebbe una specie di fremito convulso, che fece scuotere tutto il letto. -– Quel burattino lì, – seguitò a dire il Grillo-parlante, – è una birba matricolata... -Pinocchio aprì gli occhi e li richiuse subito. -– È un monellaccio, uno svogliato, un vagabondo. Pinocchio si nascose la faccia sotto i lenzuoli. -– Quel burattino lì è un figliuolo disubbidiente, che farà morire di crepacuore il suo povero babbo!... -A questo punto si sentì nella camera un suono soffocato di pianti e di singhiozzi. Figuratevi come rimasero tutti, allorché sollevati un poco i lenzuoli, si accorsero che quello che piangeva e singhiozzava era Pinocchio. -– Quando il morto piange, è segno che è in via di guarigione, – disse solennemente il Corvo. -– Mi duole di contraddire il mio illustre amico e collega, – soggiunse la Civetta, – ma per me, quando il morto piange è segno che gli dispiace a morire. - -XVII Pinocchio mangia lo zucchero, ma non vuol purgarsi: Però quando vede i becchini che vengono a portarlo via, allora si purga. Poi dice una bugia e per gastigo gli cresce il naso. - -Appena i tre medici furono usciti di camera, la Fata si accostò a Pinocchio e, dopo averlo toccato sulla fronte, si accòrse che era travagliato da un febbrone da non si dire. -Allora sciolse una certa polverina bianca in un mezzo bicchier d’acqua, e porgendolo al burattino, gli disse amorosamente: -– Bevila, e in pochi giorni sarai guarito. -Pinocchio guardò il bicchiere, storse un po’ la bocca, e poi dimanda con voce di piagnisteo: -– È dolce o amara? -– È amara, ma ti farà bene. -– Se è amara, non la voglio. -– Da’ retta a me: bevila. -– A me l’amaro non mi piace. -– Bevila: e quando l’avrai bevuta, ti darò una pallina di zucchero, per rifarti la bocca. -– Dov’è la pallina di zucchero? -– Eccola qui, – disse la Fata, tirandola fuori da una zuccheriera d’oro. -– Prima voglio la pallina di zucchero, e poi beverò quell’acquaccia amara... -– Me lo prometti? -– Sì... -La fata gli dette la pallina, e Pinocchio, dopo averla sgranocchiata e ingoiata in un attimo, disse leccandosi i labbri: -– Bella cosa se anche lo zucchero fosse una medicina!... Mi purgherei tutti i giorni. -– Ora mantieni la promessa e bevi queste poche gocciole d’acqua, che ti renderanno la salute. -Pinocchio prese di mala voglia il bicchiere in mano e vi ficcò dentro la punta del naso: poi se l’accostò alla bocca: poi tornò a ficcarci la punta del naso: finalmente disse: -– È troppo amara! troppo amara! Io non la posso bere. -– Come fai a dirlo se non l’hai nemmeno assaggiata? -– Me lo figuro! L’ho sentita all’odore. Voglio prima un’altra pallina di zucchero... e poi la beverò!... -Allora la Fata, con tutta la pazienza di una buona mamma, gli pose in bocca un altro po’ di zucchero; e dopo gli presentò daccapo il bicchiere. -– Così non la posso bere! – disse il burattino, facendo mille smorfie. -– Perché? -– Perché mi dà noia quel guanciale che ho laggiù sui piedi. -La Fata gli levò il guanciale. -– È inutile! Nemmeno così la posso bere... -– Che cos’altro ti dà noia? -– Mi dà noia l’uscio di camera, che è mezzo aperto. -La Fata andò e chiuse l’uscio di camera. -– Insomma, – gridò Pinocchio, dando in uno scoppio di pianto, – quest’acquaccia amara, non la voglio bere, no, no, no!... -– Ragazzo mio, te ne pentirai... -– Non me n’importa... -– La tua malattia è grave... -– Non me n’importa... -– La febbre ti porterà in poche ore all’altro mondo... -– Non me n’importa... -– Non hai paura della morte? -– Punto paura!... Piuttosto morire, che bevere quella medicina cattiva. -A questo punto, la porta della camera si spalancò ed entrarono dentro quattro conigli neri come l’inchiostro, che portavano sulle spalle una piccola bara da morto. -– Che cosa volete da me? – gridò Pinocchio, rizzandosi tutto impaurito a sedere sul letto. -– Siamo venuti a prenderti, – rispose il coniglio più grosso. -– A prendermi?... Ma io non sono ancora morto!... -– Ancora no: ma ti restano pochi minuti di vita avendo tu ricusato di bevere la medicina, che ti avrebbe guarito dalla febbre!... -– O Fata, o Fata mia,– cominciò allora a strillare il burattino, – datemi subito quel bicchiere. Spicciatevi, per carità, perché non voglio morire no... non voglio morire... -E preso il bicchiere con tutt’e due le mani, lo votò in un fiato. -– Pazienza! – dissero i conigli. – Per questa volta abbiamo fatto il viaggio a ufo. -E tiratisi di nuovo la piccola bara sulle spalle, uscirono di camera bofonchiando e mormorando fra i denti. -Fatto sta che di lì a pochi minuti, Pinocchio saltò giù dal letto, bell’e guarito; perché bisogna sapere che i burattini di legno hanno il privilegio di ammalarsi di rado e di guarire prestissimo. -E la Fata, vedendolo correre e ruzzare per la camera, vispo e allegro come un gallettino di primo canto, gli disse: -– Dunque la mia medicina t’ha fatto bene davvero? -– Altro che bene! Mi ha rimesso al mondo!... -– E allora come mai ti sei fatto tanto pregare a beverla? -– Egli è che noi ragazzi siamo tutti così! Abbiamo più paura delle medicine che del male. -– Vergogna! I ragazzi dovrebbero sapere che un buon medicamento preso a tempo può salvarli da una grave malattia e fors’anche dalla morte... -– Oh! ma un’altra volta non mi farò tanto pregare! Mi rammenterò di quei conigli neri, colla bara sulle spalle... e allora piglierò subito il bicchiere in mano, e giù!... -– Ora vieni un po’ qui da me e raccontami come andò che ti trovasti fra le mani degli assassini. -– Gli andò che il burattinaio Mangiafoco mi dette alcune monete d’oro, e mi disse: «To’, portale al tuo babbo!» e io, invece, per la strada trovai una Volpe e un Gatto, due persone molto per bene, che mi dissero: «Vuoi che codeste monete diventino mille e duemila? Vieni con noi, e ti condurremo al Campo dei Miracoli». E io dissi: «Andiamo»; e loro dissero: «Fermiamoci qui all’osteria del Gambero Rosso e dopo la mezzanotte ripartiremo». Ed io, quando mi svegliai, loro non c’erano più, perché erano partiti. Allora io cominciai a camminare di notte, che era un buio che pareva impossibile, per cui trovai per la strada due assassini dentro due sacchi da carbone, che mi dissero: «Metti fuori i quattrini»; e io dissi: «Non ce n’ho»; perché le quattro monete d’oro me l’ero nascoste in bocca, e uno degli assassini si provò a mettermi le mani in bocca, e io con un morso gli staccai la mano e poi la sputai, ma invece di una mano sputai uno zampetto di gatto. E gli assassini a corrermi dietro e, io corri che ti corro, finché mi raggiunsero, e mi legarono per il collo a un albero di questo bosco, col dire: «Domani torneremo qui, e allora sarai morto e colla bocca aperta, e così ti porteremo via le monete d’oro che hai nascoste sotto la lingua». -– E ora le quattro monete dove le hai messe? – gli domandò la Fata. -– Le ho perdute! – rispose Pinocchio; ma disse una bugia, perché invece le aveva in tasca. Appena detta la bugia, il suo naso, che era già lungo, gli crebbe subito due dita di più. -– E dove le hai perdute? -– Nel bosco qui vicino. -A questa seconda bugia il naso seguitò a crescere. -– Se le hai perdute nel bosco vicino, – disse la Fata, – le cercheremo e le ritroveremo: perché tutto quello che si perde nel vicino bosco, si ritrova sempre. -– Ah! ora che mi rammento bene, – replicò il burattino, imbrogliandosi, – le quattro monete non le ho perdute, ma senza avvedermene le ho inghiottite mentre bevevo la vostra medicina. -A questa terza bugia, il naso gli si allungò in un modo così straordinario, che il povero Pinocchio non poteva più girarsi da nessuna parte. Se si voltava di qui batteva il naso nel letto o nei vetri della finestra, se si voltava di là, lo batteva nelle pareti o nella porta di camera, se alzava un po’ di più il capo, correva il rischio di ficcarlo in un occhio alla Fata. -E la Fata lo guardava e rideva. -– Perché ridete? – gli domandò il burattino, tutto confuso e impensierito di quel suo naso che cresceva a occhiate. -– Rido della bugia che hai detto. -– Come mai sapete che ho detto una bugia? -– Le bugie, ragazzo mio, si riconoscono subito! perché ve ne sono di due specie: vi sono le bugie che hanno le gambe corte, e le bugie che hanno il naso lungo: la tua per l’appunto è di quelle che hanno il naso lungo. -Pinocchio, non sapendo più dove nascondersi per la vergogna, si provò a fuggire di camera; ma non gli riuscì. Il suo naso era cresciuto tanto, che non passava più dalla porta. - -XVIII Pinocchio ritrova la Volpe e il Gatto, e va con loro a seminare le quattro monete nel Campo de’ Miracoli. - -Come potete immaginarvelo, la Fata lasciò che il burattino piangesse e urlasse una buona mezz’ora, a motivo di quel suo naso che non passava più dalla porta di camera; e lo fece per dargli una severa lezione perché si correggesse dal brutto vizio di dire le bugie, il più brutto vizio che possa avere un ragazzo. Ma quando lo vide trasfigurato e cogli occhi fuori della testa dalla gran disperazione, allora, mossa a pietà, batté le mani insieme, e a quel segnale entrarono in camera dalla finestra un migliaio di grossi uccelli chiamati Picchi, i quali, posatisi tutti sul naso di Pinocchio, cominciarono a beccarglielo tanto e poi tanto, che in pochi minuti quel naso enorme e spropositato si trovò ridotto alla sua grandezza naturale. -– Quanto siete buona, Fata mia, – disse il burattino, asciugandosi gli occhi, – e quanto bene vi voglio! -– Ti voglio bene anch’io, – rispose la Fata, – e se tu vuoi rimanere con me, tu sarai il mio fratellino e io la tua buona sorellina... -– Io resterei volentieri... ma il mio povero babbo? -– Ho pensato a tutto. Il tuo babbo è stato digià avvertito: e prima che faccia notte, sarà qui. -– Davvero?... – gridò Pinocchio, saltando dall’allegrezza. – Allora, Fatina mia, se vi contentate, vorrei andargli incontro! Non vedo l’ora di poter dare un bacio a quel povero vecchio, che ha sofferto tanto per me! -– Vai pure, ma bada di non ti sperdere. Prendi la via del bosco, e sono sicurissima che lo incontrerai. -Pinocchio partì: e appena entrato nel bosco, cominciò a correre come un capriolo. Ma quando fu arrivato a un certo punto, quasi in faccia alla Quercia grande, si fermò, perché gli parve di aver sentito gente fra mezzo alle frasche. Difatti vide apparire sulla strada, indovinate chi?... la Volpe e il Gatto, ossia i due compagni di viaggio, coi quali aveva cenato all’osteria del Gambero Rosso. -– Ecco il nostro caro Pinocchio! – gridò la Volpe, abbracciandolo e baciandolo. – Come mai sei qui? -– Come mai sei qui? – ripeté il Gatto. -– È una storia lunga, – disse il burattino, – e ve la racconterò a comodo. Sappiate però che l’altra notte, quando mi avete lasciato solo nell’osteria, ho trovato gli assassini per la strada... -– Gli assassini?... O povero amico! E che cosa volevano? -– Mi volevano rubare le monete d’oro. -– Infami!... – disse la Volpe. -– Infamissimi! – ripeté il Gatto. -– Ma io cominciai a scappare, – continuò a dire il burattino, – e loro sempre dietro: finché mi raggiunsero e m’impiccarono a un ramo di quella quercia. -E Pinocchio accennò la Quercia grande, che era lì a due passi. -– Si può sentir di peggio? – disse la Volpe. – In che mondo siamo condannati a vivere? Dove troveremo un rifugio sicuro noi altri galantuomini?... -Nel tempo che parlavano così, Pinocchio si accorse che il Gatto era zoppo dalla gamba destra davanti, perché gli mancava in fondo tutto lo zampetto cogli unghioli: per cui gli domandò: -– Che cosa hai fatto del tuo zampetto? -Il Gatto voleva rispondere qualche cosa, ma s’imbrogliò. Allora la Volpe disse subito: -– Il mio amico è troppo modesto, – e per questo non risponde. Risponderò io per lui. Sappi dunque che un’ora fa abbiamo incontrato sulla strada un vecchio lupo, quasi svenuto dalla fame, che ci ha chiesto un po’ d’elemosina. Non avendo noi da dargli nemmeno una lisca di pesce, che cosa ha fatto l’amico mio, che ha davvero un cuore di Cesare?... Si è staccato coi denti uno zampetto delle sue gambe davanti e l’ha gettato a quella povera bestia, perché potesse sdigiunarsi. -E la Volpe nel dir così, si asciugò una lacrima. -Pinocchio, commosso anche lui, si avvicinò al Gatto, sussurrandogli negli orecchi: -– Se tutti i gatti ti somigliassero, fortunati i topi!... -– E ora che cosa fai in questi luoghi? – domandò la Volpe al burattino. -– Aspetto il mio babbo, che deve arrivare qui di momento in momento. -– E le tue monete d’oro? -– Le ho sempre in tasca, meno una che la spesi all’osteria del Gambero Rosso. -– E pensare che, invece di quattro monete, potrebbero diventare domani mille e duemila! Perché non dai retta al mio consiglio? Perché non vai a seminarle nel Campo dei miracoli? -– Oggi è impossibile: vi anderò un altro giorno. -– Un altro giorno sarà tardi, – disse la Volpe. -– Perché? -– Perché quel campo è stato comprato da un gran signore e da domani in là non sarà più permesso a nessuno di seminarvi i denari. -– Quant’è distante di qui il Campo dei miracoli? -– Due chilometri appena. Vuoi venire con noi? Fra mezz’ora sei là: semini subito le quattro monete: dopo pochi minuti ne raccogli duemila e stasera ritorni qui colle tasche piene. Vuoi venire con noi? -Pinocchio esitò un poco a rispondere, perché gli tornò in mente la buona Fata, il vecchio Geppetto e gli avvertimenti del Grillo-parlante; ma poi finì col fare come fanno tutti i ragazzi senza un fil di giudizio e senza cuore; finì, cioè, col dare una scrollatina di capo, e disse alla Volpe e al Gatto: -– Andiamo pure: io vengo con voi. -E partirono. -Dopo aver camminato una mezza giornata arrivarono a una città che aveva nome «Acchiappa-citrulli». Appena entrato in città, Pinocchio vide tutte le strade popolate di cani spelacchiati, che sbadigliavano dall’appetito, di pecore tosate che tremavano dal freddo, di galline rimaste senza cresta e senza bargigli, che chiedevano l’elemosina d’un chicco di granturco, di grosse farfalle, che non potevano più volare, perché avevano venduto le loro bellissime ali colorite, di pavoni tutti scodati, che si vergognavano a farsi vedere, e di fagiani che zampettavano cheti cheti, rimpiangendo le loro scintillanti penne d’oro e d’argento, oramai perdute per sempre. -In mezzo a questa folla di accattoni e di poveri vergognosi passavano di tanto in tanto alcune carrozze signorili con dentro o qualche volpe, o qualche gazza ladra o qualche uccellaccio di rapina. -– E il Campo dei miracoli dov’è? – domandò Pinocchio. -– È qui a due passi. -Detto fatto traversarono la città e, usciti fuori dalle mura, si fermarono in un campo solitario che, su per giù, somigliava a tutti gli altri campi. -– Eccoci giunti, – disse la Volpe al burattino. – Ora chinati giù a terra, scava con le mani una piccola buca nel campo e mettici dentro le monete d’oro. -Pinocchio ubbidì. Scavò la buca, ci pose le quattro monete d’oro che gli erano rimaste: e dopo ricoprì la buca con un po’ di terra. -– Ora poi, – disse la Volpe, – vai alla gora qui vicina, prendi una secchia d’acqua e annaffia il terreno dove hai seminato. -Pinocchio andò alla gora, e perché non aveva lì per lì una secchia, si levò di piedi una ciabatta e, riempitala d’acqua, annaffiò la terra che copriva la buca. Poi domandò: -– C’è altro da fare? -– Nient’altro, – rispose la Volpe. – Ora possiamo andar via. Tu poi ritorna qui fra una ventina di minuti e troverai l’arboscello già spuntato dal suolo e coi rami tutti carichi di monete. -Il povero burattino, fuori di sé dalla contentezza, ringraziò mille volte la Volpe e il Gatto, e promise loro un bellissimo regalo. -– Noi non vogliamo regali, – risposero quei due malanni. – A noi ci basta di averti insegnato il modo di arricchire senza durar fatica, e siamo contenti come pasque. -Ciò detto salutarono Pinocchio, e augurandogli una buona raccolta, se ne andarono per i fatti loro. - -XIX Pinocchio è derubato delle sue monete d’oro e, per gastigo, si busca quattro mesi di prigione. - -Il burattino, ritornato in città, cominciò a contare i minuti a uno a uno; e, quando gli parve che fosse l’ora, riprese subito la strada che menava al Campo dei miracoli. -E mentre camminava con passo frettoloso, il cuore gli batteva forte e gli faceva tic, tac, tic, tac, come un orologio da sala, quando corre davvero. E intanto pensava dentro di sé: -– E se invece di mille monete, ne trovassi su i rami dell’albero duemila?... E se invece di duemila, ne trovassi cinquemila?... E se invece di cinquemila ne trovassi centomila? Oh che bel signore, allora, che diventerei!... Vorrei avere un bel palazzo, mille cavallini di legno e mille scuderie, per potermi baloccare, una cantina di rosoli e di alchermes, e una libreria tutta piena di canditi, di torte, di panettoni, di mandorlati e di cialdoni colla panna. -Così fantasticando, giunse in vicinanza del campo, e lì si fermò a guardare se per caso avesse potuto scorgere qualche albero coi rami carichi di monete: ma non vide nulla. Fece altri cento passi in avanti, e nulla: entrò sul campo... andò proprio su quella piccola buca, dove aveva sotterrato i suoi zecchini, e nulla. Allora diventò pensieroso e, dimenticando le regole del Galateo e della buona creanza, tirò fuori una mano di tasca e si dette una lunghissima grattatina di capo. -In quel mentre sentì fischiare negli orecchi una gran risata: e voltatosi in su, vide sopra un albero un grosso pappagallo che si spollinava le poche penne che aveva addosso. -– Perché ridi? – gli domandò Pinocchio con voce di bizza. -– Rido, perché nello spollinarmi mi son fatto il solletico sotto le ali. -Il burattino non rispose. Andò alla gora e riempita d’acqua la solita ciabatta, si pose nuovamente ad annaffiare la terra che ricuopriva le monete d’oro. -Quand’ecco che un’altra risata, anche più impertinente della prima, si fece sentire nella solitudine silenziosa di quel campo. -– Insomma, – gridò Pinocchio, arrabbiandosi, – si può sapere, Pappagallo mal educato, di che cosa ridi? -– Rido di quei barbagianni, che credono a tutte le scioccherie e che si lasciano trappolare da chi è più furbo di loro. -– Parli forse di me? -– Sì, parlo di te, povero Pinocchio, di te che sei così dolce di sale, da credere che i denari si possano seminare e raccogliere nei campi, come si seminano i fagioli e le zucche. Anch’io l’ho creduto una volta, e oggi ne porto le pene. Oggi (ma troppo tardi!) mi son dovuto persuadere che per mettere insieme onestamente pochi soldi, bisogna saperseli guadagnare o col lavoro delle proprie mani o coll’ingegno della propria testa. -– Non ti capisco, – disse il burattino, che già cominciava a tremare dalla paura. -– Pazienza! Mi spiegherò meglio, – soggiunse il Pappagallo. – Sappi dunque che, mentre tu eri in città, la Volpe e il Gatto sono tornati in questo campo: hanno preso le monete d’oro sotterrate, e poi sono fuggiti come il vento. E ora chi li raggiunge, è bravo! -Pinocchio restò a bocca aperta, e non volendo credere alle parole del Pappagallo, cominciò colle mani e colle unghie a scavare il terreno che aveva annaffiato. E scava, scava, scava, fece una buca così profonda, che ci sarebbe entrato per ritto un pagliaio: ma le monete non ci erano più. -Allora, preso dalla disperazione, tornò di corsa in città e andò difilato in tribunale, per denunziare al giudice i due malandrini, che lo avevano derubato. -Il giudice era uno scimmione della razza dei Gorilla: un vecchio scimmione rispettabile per la sua grave età, per la sua barba bianca e specialmente per i suoi occhiali d’oro, senza vetri, che era costretto a portare continuamente, a motivo di una flussione d’occhi, che lo tormentava da parecchi anni. -Pinocchio, alla presenza del giudice, raccontò per filo e per segno l’iniqua frode, di cui era stato vittima; dette il nome, il cognome e i connotati dei malandrini, e finì col chiedere giustizia. -Il giudice lo ascoltò con molta benignità: prese vivissima parte al racconto: s’intenerì, si commosse: e quando il burattino non ebbe più nulla da dire, allungò la mano e suonò il campanello. -A quella scampanellata comparvero subito due can mastini vestiti da giandarmi. -Allora il giudice, accennando Pinocchio ai giandarmi, disse loro: -– Quel povero diavolo è stato derubato di quattro monete d’oro: pigliatelo dunque e mettetelo subito in prigione. -Il burattino, sentendosi dare questa sentenza fra capo e collo, rimase di princisbecco e voleva protestare: ma i giandarmi, a scanso di perditempi inutili, gli tapparono la bocca e lo condussero in gattabuia. -E lì v’ebbe a rimanere quattro mesi: quattro lunghissimi mesi: e vi sarebbe rimasto anche di più, se non si fosse dato un caso fortunatissimo. Perché bisogna sapere che il giovane Imperatore che regnava nella città di Acchiappa-citrulli, avendo riportato una gran vittoria contro i suoi nemici, ordinò grandi feste pubbliche, luminarie, fuochi artificiali, corse di barberi e velocipedi, e in segno di maggiore esultanza, volle che fossero aperte le carceri e mandati fuori tutti i malandrini. -– Se escono di prigione gli altri, voglio uscire anch’io, – disse Pinocchio al carceriere. -– Voi no, – rispose il carceriere, – perché voi non siete del bel numero... -– Domando scusa, – replicò Pinocchio, – sono un malandrino anch’io. -– In questo caso avete mille ragioni, – disse il carceriere; e levandosi il berretto rispettosamente e salutandolo, gli aprì le porte della prigione e lo lasciò scappare. - -XX Liberato dalla prigione, si avvia per tornare a casa della Fata; ma lungo la strada trova un serpente orribile, e poi rimane preso alla tagliuola. - -Figuratevi l’allegrezza di Pinocchio, quando si sentì libero. Senza stare a dire che è e che non è, uscì subito fuori della città e riprese la strada che doveva ricondurlo alla Casina della Fata. -A motivo del tempo piovigginoso, la strada era diventata tutta un pantano e ci si andava fino a mezza gamba. -Ma il burattino non se ne dava per inteso. -Tormentato dalla passione di rivedere il suo babbo e la sua sorellina dai capelli turchini, correva a salti come un cane levriero, e nel correre le pillacchere gli schizzavano fin sopra il berretto. Intanto andava dicendo fra sé e sé: -– Quante disgrazie mi sono accadute... E me le merito! perché io sono un burattino testardo e piccoso... e voglio far sempre tutte le cose a modo mio, senza dar retta a quelli che mi voglion bene e che hanno mille volte più giudizio di me!... Ma da questa volta in là, faccio proponimento di cambiar vita e di diventare un ragazzo ammodo e ubbidiente... Tanto ormai ho bell’e visto che i ragazzi, a essere disubbidienti, ci scapitano sempre e non ne infilano mai una per il su’ verso. E il mio babbo mi avrà aspettato?... Ce lo troverò a casa della Fata? è tanto tempo, pover’uomo, che non lo vedo più, che mi struggo di fargli mille carezze e di finirlo dai baci! E la Fata mi perdonerà la brutta azione che le ho fatto?... E pensare che ho ricevuto da lei tante attenzioni e tante cure amorose... e pensare che se oggi son sempre vivo, lo debbo a lei! Ma si può dare un ragazzo più ingrato e più senza cuore di me?... -Nel tempo che diceva così, si fermò tutt’a un tratto spaventato e fece quattro passi indietro. -Che cosa aveva veduto?... -Aveva veduto un grosso Serpente, disteso attraverso alla strada, che aveva la pelle verde, gli occhi di fuoco e la coda appuntuta, che gli fumava come una cappa di camino. -Impossibile immaginarsi la paura del burattino: il quale, allontanatosi più di mezzo chilometro, si mise a sedere sopra un monticello di sassi, aspettando che il Serpente se ne andasse una buona volta per i fatti suoi e lasciasse libero il passo della strada. -Aspettò un’ora; due ore; tre ore; ma il Serpente era sempre là, e, anche di lontano, si vedeva il rosseggiare de’ suoi occhi di fuoco e la colonna di fumo che gli usciva dalla punta della coda. -Allora Pinocchio, figurandosi di aver coraggio, si avvicinò a pochi passi di distanza, e facendo una vocina dolce, insinuante e sottile, disse al Serpente: -– Scusi, signor Serpente, che mi farebbe il piacere di tirarsi un pochino da una parte, tanto da lasciarmi passare? -Fu lo stesso che dire al muro. Nessuno si mosse. -Allora riprese colla solita vocina: -– Deve sapere, signor Serpente, che io vado a casa, dove c’è il mio babbo che mi aspetta e che è tanto tempo che non lo vedo più!... Si contenta dunque che io seguiti per la mia strada? -Aspettò un segno di risposta a quella dimanda: ma la risposta non venne: anzi il Serpente, che fin allora pareva arzillo e pieno di vita, diventò immobile e quasi irrigidito. Gli occhi gli si chiusero e la coda gli smesse di fumare. -– Che sia morto davvero?... – disse Pinocchio, dandosi una fregatina di mani dalla gran contentezza: e senza mettere tempo in mezzo, fece l’atto di scavalcarlo, per passare dall’altra parte della strada. Ma non aveva ancora finito di alzare la gamba, che il Serpente si rizzò all’improvviso, come una molla scattata: e il burattino, nel tirarsi indietro, spaventato, inciampò e cadde per terra. -E per l’appunto cadde così male, che restò col capo conficcato nel fango della strada e con le gambe ritte su in aria. -Alla vista di quel burattino, che sgambettava a capofitto con una velocità incredibile il Serpente fu preso da una tal convulsione di risa, che ridi, ridi, ridi, alla fine, dallo sforzo del troppo ridere, gli si strappò una vena sul petto: e quella volta morì davvero. -Allora Pinocchio ricominciò a correre per arrivare a casa della Fata prima che si facesse buio. Ma lungo la strada non potendo più reggere ai morsi terribili della fame, saltò in un campo coll’intenzione di cogliere poche ciocche d’uva moscadella. Non l’avesse mai fatto! -Appena giunto sotto la vite, crac... sentì stringersi le gambe da due ferri taglienti, che gli fecero vedere quante stelle c’erano in cielo. -Il povero burattino era rimasto preso da una tagliuola appostata là da alcuni contadini per beccarvi alcune grosse faine, che erano il flagello di tutti i pollai del vicinato. - -XXI Pinocchio è preso da un contadino, il quale lo costringe a far da can da guardia a un pollaio. - -Pinocchio, come potete figurarvelo, si dette a piangere, a strillare, a raccomandarsi: ma erano pianti e grida inutili, perché lì all’intorno non si vedevano case, e dalla strada non passava anima viva. -Intanto si fece notte. -Un po’ per lo spasimo della tagliuola, che gli segava gli stinchi, e un po’ per la paura di trovarsi solo e al buio in mezzo a quei campi, il burattino principiava quasi a svenirsi; quando a un tratto vedendosi passare una Lucciola di sul capo, la chiamò e le disse: -– O Lucciolina, mi faresti la carità di liberarmi da questo supplizio?... -– Povero figliuolo! – replicò la Lucciola, fermandosi impietosita a guardarlo. – Come mai sei rimasto colle gambe attanagliate fra codesti ferri arrotati? -– Sono entrato nel campo per cogliere due grappoli di quest’uva moscadella, e... -– Ma l’uva era tua? -– No... -– E allora chi t’ha insegnato a portar via la roba degli altri?... -– Avevo fame... -– La fame, ragazzo mio, non è una buona ragione per potere appropriarsi la roba che non è nostra... -– È vero, è vero! – gridò Pinocchio piangendo, – ma un’altra volta non lo farò più. -A questo punto il dialogo fu interrotto da un piccolissimo rumore di passi, che si avvicinavano. -Era il padrone del campo che veniva in punta di piedi a vedere se qualcuna di quelle faine, che mangiavano di nottetempo i polli, fosse rimasta al trabocchetto della tagliuola. -E la sua maraviglia fu grandissima quando, tirata fuori la lanterna di sotto il pastrano, s’accorse che, invece di una faina, c’era rimasto preso un ragazzo. -– Ah, ladracchiòlo! – disse il contadino incollerito, – dunque sei tu che mi porti via le galline? -– Io no, io no! – gridò Pinocchio, singhiozzando. – Io sono entrato nel campo per prendere soltanto due grappoli d’uva!... -– Chi ruba l’uva è capacissimo di rubare anche i polli. Lascia fare a me, che ti darò una lezione da ricordartene per un pezzo. -E aperta la tagliuola, afferrò il burattino per la collottola e lo portò di peso fino a casa, come si porterebbe un agnellino di latte. -Arrivato che fu sull’aia dinanzi alla casa, lo scaraventò in terra: e tenendogli un piede sul collo, gli disse: -– Oramai è tardi e voglio andare a letto. I nostri conti li aggiusteremo domani. Intanto, siccome oggi mi è morto il cane che mi faceva la guardia di notte, tu prenderai subito il suo posto. Tu mi farai da cane di guardia. -Detto fatto, gl’infilò al collo un grosso collare tutto coperto di spunzoni di ottone, e glielo strinse in modo da non poterselo levare passandoci la testa dentro. Al collare c’era attaccata una lunga catenella di ferro: e la catenella era fissata nel muro. -– Se questa notte, – disse il contadino, – cominciasse a piovere, tu puoi andare a cuccia in quel casotto di legno, dove c’è sempre la paglia che ha servito di letto per quattr’anni al mio povero cane. E se per disgrazia venissero i ladri, ricordati di stare a orecchi ritti e di abbaiare. -Dopo quest’ultimo avvertimento, il contadino entrò in casa chiudendo la porta con tanto di catenaccio: e il povero Pinocchio rimase accovacciato sull’aia, più morto che vivo, a motivo del freddo, della fame e della paura. E di tanto in tanto, cacciandosi rabbiosamente le mani dentro al collare, che gli serrava la gola, diceva piangendo: -– Mi sta bene!... Pur troppo mi sta bene! Ho voluto fare lo svogliato, il vagabondo... ho voluto dar retta ai cattivi compagni, e per questo la sfortuna mi perseguita sempre. Se fossi stato un ragazzino per bene, come ce n’è tanti, se avessi avuto voglia di studiare e di lavorare, se fossi rimasto in casa col mio povero babbo, a quest’ora non mi troverei qui, in mezzo ai campi, a fare il cane di guardia alla casa d’un contadino. Oh, se potessi rinascere un’altra volta!... Ma oramai è tardi, e ci vuol pazienza! -Fatto questo piccolo sfogo, che gli venne proprio dal cuore, entrò dentro il casotto e si addormentò. - -XXII Pinocchio scuopre i ladri e, in ricompensa di essere stato fedele, vien posto in libertà. - -Ed era già più di due ore che dormiva saporitamente; quando verso la mezzanotte fu svegliato da un bisbiglio e da un pissi-pissi di vocine strane, che gli parve di sentire nell’aia. Messa fuori la punta del naso dalla buca del casotto, vide riunite a consiglio quattro bestiuole di pelame scuro, che parevano gatti. Ma non erano gatti: erano faine, animaletti carnivori, ghiottissimi specialmente di uova e di pollastrine giovani. Una di queste faine, staccandosi dalle sue compagne, andò alla buca del casotto e disse sottovoce: -– Buona sera, Melampo. -– Io non mi chiamo Melampo, – rispose il burattino. -– O dunque chi sei? -– Io sono Pinocchio. -– E che cosa fai costì? -– Faccio il cane di guardia. -– O Melampo dov’è? dov’è il vecchio cane, che stava in questo casotto? -– È morto questa mattina. -– Morto? Povera bestia! Era tanto buono!... Ma giudicandoti alla fisonomia, anche te mi sembri un cane di garbo. -– Domando scusa, io non sono un cane!... -– O chi sei? -– Io sono un burattino. -– E fai da cane di guardia? -– Purtroppo: per mia punizione!... -– Ebbene, io ti propongo gli stessi patti, che avevo col defunto Melampo: e sarai contento. -– E questi patti sarebbero? -– Noi verremo una volta la settimana, come per il passato, a visitare di notte questo pollaio, e porteremo via otto galline. Di queste galline, sette le mangeremo noi, e una la daremo a te, a condizione, s’intende bene, che tu faccia finta di dormire e non ti venga mai l’estro di abbaiare e di svegliare il contadino. -– E Melampo faceva proprio così? – domandò Pinocchio. -– Faceva così, e fra noi e lui siamo andati sempre d’accordo. Dormi dunque tranquillamente, e stai sicuro che prima di partire di qui, ti lasceremo sul casotto una gallina bell’e pelata, per la colazione di domani. Ci siamo intesi bene? -– Anche troppo bene!... – rispose Pinocchio: e tentennò il capo in un certo modo minaccioso, come se avesse voluto dire: «Fra poco ci riparleremo!». -Quando le quattro faine si credettero sicure del fatto loro, andarono difilato al pollaio, che rimaneva appunto vicinissimo al casotto del cane, e aperta a furia di denti e di unghioli la porticina di legno, che ne chiudeva l’entratina, vi sgusciarono dentro, una dopo l’altra. Ma non erano ancora finite d’entrare, che sentirono la porticina richiudersi con grandissima violenza. -Quello che l’aveva richiusa era Pinocchio; il quale, non contento di averla richiusa, vi posò davanti per maggior sicurezza una grossa pietra, a guisa di puntello. -E poi cominciò ad abbaiare: e, abbaiando proprio come se fosse un cane di guardia, faceva colla voce bu-bu-bu-bu. -A quell’abbaiata, il contadino saltò dal letto e, preso il fucile e affacciatosi alla finestra, domandò: -– Che c’è di nuovo? -– Ci sono i ladri! – rispose Pinocchio. -– Dove sono? -– Nel pollaio. -– Ora scendo subito. -E infatti, in men che non si dice amen, il contadino scese: entrò di corsa nel pollaio e, dopo avere acchiappate e rinchiuse in un sacco le quattro faine, disse loro con accento di vera contentezza: -– Alla fine siete cascate nelle mie mani! Potrei punirvi, ma sì vil non sono! Mi contenterò, invece, di portarvi domani all’oste del vicino paese, il quale vi spellerà e vi cucinerà a uso lepre dolce e forte. È un onore che non vi meritate, ma gli uomini generosi come me non badano a queste piccolezze!... -Quindi, avvicinatosi a Pinocchio, cominciò a fargli molte carezze, e, fra le altre cose, gli domandò: -– Com’hai fatto a scuoprire il complotto di queste quattro ladroncelle? E dire che Melampo, il mio fido Melampo, non s’era mai accorto di nulla... -Il burattino, allora, avrebbe potuto raccontare quel che sapeva: avrebbe potuto, cioè, raccontare i patti vergognosi che passavano fra il cane e le faine: ma ricordatosi che il cane era morto, pensò subito dentro di sé: – A che serve accusare i morti?... I morti son morti, e la miglior cosa che si possa fare è quella di lasciarli in pace!... -– All’arrivo delle faine sull’aia, eri sveglio o dormivi? – continuò a chiedergli il contadino. -– Dormivo, – rispose Pinocchio, – ma le faine mi hanno svegliato coi loro chiacchiericci, e una è venuta fin qui al casotto per dirmi: «Se prometti di non abbaiare e di non svegliare il padrone, noi ti regaleremo una pollastra bell’e pelata!...». Capite, eh? Avere la sfacciataggine di fare a me una simile proposta! Perché bisogna sapere che io sono un burattino, che avrò tutti i difetti di questo mondo: ma non avrò mai quello di star di balla e di reggere il sacco alla gente disonesta! -– Bravo ragazzo! – gridò il contadino, battendogli sur una spalla. – Cotesti sentimenti ti fanno onore: e per provarti la mia grande soddisfazione, ti lascio libero fin d’ora di tornare a casa. -E gli levò il collare da cane. - -XXIII Pinocchio piange la morte della bella Bambina dai capelli turchini: poi trova un Colombo che lo porta sulla riva del mare, e lì si getta nell’acqua per andare in aiuto del suo babbo Geppetto. - -Appena Pinocchio non sentì più il peso durissimo e umiliante di quel collare intorno al collo, si pose a scappare attraverso i campi, e non si fermò un solo minuto, finché non ebbe raggiunta la strada maestra, che doveva ricondurlo alla Casina della Fata. -Arrivato sulla strada maestra, si voltò in giù a guardare nella sottoposta pianura, e vide benissimo a occhio nudo il bosco, dove disgraziatamente aveva incontrato la Volpe e il Gatto: vide, fra mezzo agli alberi, inalzarsi la cima di quella Quercia grande, alla quale era stato appeso ciondoloni per il collo: ma guarda di qua, guarda di là, non gli fu possibile di vedere la piccola casa della bella Bambina dai capelli turchini. -Allora ebbe una specie di tristo presentimento e datosi a correre con quanta forza gli rimaneva nelle gambe, si trovò in pochi minuti sul prato, dove sorgeva una volta la Casina bianca. Ma la Casina bianca non c’era più. C’era, invece, una piccola pietra di marmo sulla quale si leggevano in carattere stampatello queste dolorose parole: -QUI GIACE -LA BAMBINA DAI CAPELLI TURCHINI -MORTA DI DOLORE PER ESSERE STATA ABBANDONATA DAL SUO FRATELLINO PINOCCHIO -Come rimanesse il burattino, quand’ebbe compitate alla peggio quelle parole, lo lascio pensare a voi. Cadde bocconi a terra e coprendo di mille baci quel marmo mortuario, dette in un grande scoppio di pianto. Pianse tutta la notte, e la mattina dopo, sul far del giorno, piangeva sempre, sebbene negli occhi non avesse più lacrime: e le sue grida e i suoi lamenti erano così strazianti e acuti, che tutte le colline all’intorno ne ripetevano l’eco. -E piangendo diceva: -– O Fatina mia, perché sei morta?... perché, invece di te, non sono morto io, che sono tanto cattivo, mentre tu eri tanto buona?... E il mio babbo, dove sarà? O Fatina mia, dimmi dove posso trovarlo, che voglio stare sempre con lui, e non lasciarlo più! più! più!... O Fatina mia, dimmi che non è vero che sei morta!... Se davvero mi vuoi bene... se vuoi bene al tuo fratellino, rivivisci... ritorna viva come prima!... Non ti dispiace a vedermi solo e abbandonato da tutti? Se arrivano gli assassini. mi attaccheranno daccapo al ramo dell’albero... e allora morirò per sempre. Che vuoi che faccia qui, solo in questo mondo? Ora che ho perduto te e il mio babbo, chi mi darà da mangiare? Dove anderò a dormire la notte? Chi mi farà la giacchettina nuova? Oh! sarebbe meglio, cento volte meglio, che morissi anch’io! Sì, voglio morire!... ih! ih! ih!... -E mentre si disperava a questo modo, fece l’atto di volersi strappare i capelli: ma i suoi capelli, essendo di legno, non poté nemmeno levarsi il gusto di ficcarci dentro le dita. -Intanto passò su per aria un grosso Colombo, il quale soffermatosi, a ali distese, gli gridò da una grande altezza: -– Dimmi, bambino, che cosa fai costaggiù? -– Non lo vedi? piango! – disse Pinocchio alzando il capo verso quella voce e strofinandosi gli occhi colla manica della giacchetta. -– Dimmi, – soggiunse allora il Colombo – non conosci per caso fra i tuoi compagni, un burattino, che ha nome Pinocchio? -– Pinocchio?... Hai detto Pinocchio? – ripeté il burattino saltando subito in piedi. – Pinocchio sono io! -Il Colombo, a questa risposta, si calò velocemente e venne a posarsi a terra. Era più grosso di un tacchino. -– Conoscerai dunque anche Geppetto? – domandò al burattino. -– Se lo conosco? È il mio povero babbo! Ti ha forse parlato di me? Mi conduci da lui? Ma è sempre vivo? Rispondimi per carità: è sempre vivo? -– L’ho lasciato tre giorni fa sulla spiaggia del mare. -– Che cosa faceva? -– Si fabbricava da sé una piccola barchetta per traversare l’Oceano. Quel pover’uomo sono più di quattro mesi che gira per il mondo in cerca di te: e non avendoti potuto trovare, ora si è messo in capo di cercarti nei paesi lontani del nuovo mondo. -– Quanto c’è di qui alla spiaggia? – domandò Pinocchio con ansia affannosa. -– Più di mille chilometri. -– Mille chilometri? O Colombo mio, che bella cosa potessi avere le tue ali!... -– Se vuoi venire, ti ci porto io. -– Come? -– A cavallo sulla mia groppa. Sei peso di molto?... -– Peso? tutt’altro! Son leggiero come una foglia. -E lì, senza stare a dir altro, Pinocchio saltò sulla groppa al Colombo e messa una gamba di qua e l’altra di là, come fanno i cavallerizzi, gridò tutto contento: – Galoppa, galoppa, cavallino, ché mi preme di arrivar presto!... -Il Colombo prese l’aire e in pochi minuti arrivò col volo tanto in alto, che toccava quasi le nuvole. Giunto a quell’altezza straordinaria, il burattino ebbe la curiosità di voltarsi in giù a guardare: e fu preso da tanta paura e da tali giracapi che, per evitare il pericolo di venir disotto, si avviticchiò colle braccia, stretto stretto, al collo della sua piumata cavalcatura. -Volarono tutto il giorno. Sul far della sera, il Colombo disse: -– Ho una gran sete! -– E io una gran fame! – soggiunse Pinocchio. -– Fermiamoci a questa colombaia pochi minuti; e dopo ci rimetteremo in viaggio, per essere domattina all’alba sulla spiaggia del mare. -Entrarono in una colombaia deserta, dove c’era soltanto una catinella piena d’acqua e un cestino ricolmo di veccie. -Il burattino, in tempo di vita sua, non aveva mai potuto patire le veccie: a sentir lui, gli facevano nausea, gli rivoltavano lo stomaco: ma quella sera ne mangiò a strippapelle, e quando l’ebbe quasi finite, si voltò al Colombo e gli disse: -– Non avrei mai creduto che le veccie fossero così buone! -– Bisogna persuadersi, ragazzo mio, – replicò il Colombo, – che quando la fame dice davvero e non c’è altro da mangiare, anche le veccie diventano squisite! La fame non ha capricci né ghiottonerie! -Fatto alla svelta un piccolo spuntino, si riposero in viaggio, e via! La mattina dopo arrivarono sulla spiaggia del mare. -Il Colombo posò a terra Pinocchio, e non volendo nemmeno la seccatura di sentirsi ringraziare per aver fatto una buona azione, riprese subito il volo e sparì. -La spiaggia era piena di gente che urlava e gesticolava guardando il mare. -– Che cos’è accaduto? – domandò Pinocchio a una vecchina. -– Gli è accaduto che un povero babbo, avendo perduto il figliolo, gli è voluto entrare in una barchetta per andare a cercarlo di là dal mare; e il mare oggi è molto cattivo e la barchetta sta per andare sott’acqua... -– Dov’è la barchetta? -– Eccola laggiù, diritta al mio dito, – disse la vecchia, accennando una piccola barca che, veduta in quella distanza, pareva un guscio di noce con dentro un omino piccino piccino. -Pinocchio appuntò gli occhi da quella parte, e dopo aver guardato attentamente, cacciò un urlo acutissimo gridando: -– Gli è il mi’ babbo! gli è il mi’ babbo! -Intanto la barchetta, sbattuta dall’infuriare dell’onde, ora spariva fra i grossi cavalloni, ora tornava a galleggiare: e Pinocchio ritto sulla punta di un alto scoglio non finiva più dal chiamare il suo babbo per nome e dal fargli molti segnali colle mani e col moccichino da naso e perfino col berretto che aveva in capo. -E parve che Geppetto, sebbene fosse molto lontano dalla spiaggia, riconoscesse il figliuolo, perché si levò il berretto anche lui e lo salutò e, a furia di gesti, gli fece capire che sarebbe tornato volentieri indietro, ma il mare era tanto grosso, che gl’impediva di lavorare col remo e di potersi avvicinare alla terra. -Tutt’a un tratto, venne una terribile ondata, e la barca sparì. -Aspettarono che la barca tornasse a galla: ma la barca non si vide più tornare. -– Pover’omo! – dissero allora i pescatori, che erano raccolti sulla spiaggia: e brontolando sottovoce una preghiera si mossero per tornarsene alle loro case. -Quand’ecco che udirono un urlo disperato, e, voltandosi indietro, videro un ragazzetto che, di vetta a uno scoglio, si gettava in mare gridando: -– Voglio salvare il mio babbo! -Pinocchio, essendo tutto di legno, galleggiava facilmente e nuotava come un pesce. Ora si vedeva sparire sott’acqua, portato dall’impeto dei flutti, ora riappariva fuori con una gamba o con un braccio, a grandissima distanza dalla terra. Alla fine lo persero d’occhio e non lo videro più. -– Povero ragazzo! - dissero allora i pescatori, che erano raccolti sulla spiaggia: e brontolando sottovoce una preghiera tornarono alle loro case. - -XXIV Pinocchio arriva all’isola delle Api industriose e ritrova la Fata. - -Pinocchio, animato dalla speranza di arrivare in tempo a dare aiuto al suo povero babbo, nuotò tutta quanta la notte. -E che orribile nottata fu quella! Diluviò, grandinò, tuonò spaventosamente, e con certi lampi che pareva di giorno. -Sul far del mattino, gli riuscì di vedere poco distante una lunga striscia di terra. Era un’isola in mezzo al mare. -Allora fece di tutto per arrivare a quella spiaggia: ma inutilmente. Le onde, rincorrendosi e accavallandosi, se lo abballottavano fra di loro, come se fosse stato un fuscello o un filo di paglia. Alla fine, e per sua buona fortuna, venne un’ondata tanto prepotente e impetuosa, che lo scaraventò di peso sulla rena del lido. -Il colpo fu così forte che, battendo in terra, gli crocchiarono tutte le costole e tutte le congiunture: ma si consolò subito col dire: -– Anche per questa volta l’ho proprio scampata bella! -Intanto a poco a poco il cielo si rasserenò; il sole apparve fuori in tutto il suo splendore e il mare diventò tranquillissimo e buono come un olio. -Allora il burattino distese i suoi panni al sole per rasciugarli e si pose a guardare di qua e di là se per caso avesse potuto scorgere su quella immensa spianata d’acqua una piccola barchetta con un omino dentro. Ma dopo aver guardato ben bene, non vide altro dinanzi a sé che cielo, mare e qualche vela di bastimento, ma così lontana, che pareva una mosca. -– Sapessi almeno come si chiama quest’isola! – andava dicendo. – Sapessi almeno se quest’isola è abitata da gente di garbo, voglio dire da gente che non abbia il vizio di attaccare i ragazzi ai rami degli alberi; ma a chi mai posso domandarlo? A chi, se non c’è nessuno?... -Quest’idea di trovarsi solo, solo, solo in mezzo a quel gran paese disabitato, gli messe addosso tanta malinconia, che stava lì lì per piangere; quando tutt’a un tratto vide passare, a poca distanza dalla riva, un grosso pesce, che se ne andava tranquillamente per i fatti suoi, con tutta la testa fuori dell’acqua. -Non sapendo come chiamarlo per nome, il burattino gli gridò a voce alta, per farsi sentire: -– Ehi, signor pesce, che mi permetterebbe una parola? -– Anche due, – rispose il pesce, il quale era un Delfino così garbato, come se ne trovano pochi in tutti i mari del mondo. -– Mi farebbe il piacere di dirmi se in quest’isola vi sono dei paesi dove si possa mangiare, senza pericolo d’esser mangiati? -– Ve ne sono sicuro, – rispose il Delfino. – Anzi, ne troverai uno poco lontano di qui. -– E che strada si fa per andarvi? -– Devi prendere quella viottola là, a mancina, e camminare sempre diritto al naso. Non puoi sbagliare. -– Mi dica un’altra cosa. Lei che passeggia tutto il giorno e tutta la notte per il mare, non avrebbe incontrato per caso una piccola barchettina con dentro il mi’ babbo? -– E chi è il tuo babbo? -– Gli è il babbo più buono del mondo, come io sono il figliuolo più cattivo che si possa dare. -– Colla burrasca che ha fatto questa notte, – rispose il delfino, – la barchettina sarà andata sott’acqua. -– E il mio babbo? -– A quest’ora l’avrà inghiottito il terribile Pesce-cane, che da qualche giorno è venuto a spargere lo sterminio e la desolazione nelle nostre acque. -– Che è grosso di molto questo Pesce-cane? – domandò Pinocchio, che digià cominciava a tremare dalla paura. -– Se gli è grosso!... – replicò il Delfino. – Perché tu possa fartene un’idea, ti dirò che è più grosso di un casamento di cinque piani, ed ha una boccaccia così larga e profonda, che ci passerebbe comodamente tutto il treno della strada ferrata colla macchina accesa. -– Mamma mia! – gridò spaventato il burattino: e rivestitosi in fretta e furia, si voltò al delfino e gli disse: – Arrivedella, signor pesce: scusi tanto l’incomodo e mille grazie della sua garbatezza. -Detto ciò, prese subito la viottola e cominciò a camminare di un passo svelto; tanto svelto, che pareva quasi che corresse. E a ogni più piccolo rumore che sentiva, si voltava subito a guardare indietro, per la paura di vedersi inseguire da quel terribile pesce-cane grosso come una casa di cinque piani e con un treno della strada ferrata in bocca. -Dopo mezz’ora di strada, arrivò a un piccolo paese detto «Il paese delle Api industriose». Le strade formicolavano di persone che correvano di qua e di là per le loro faccende: tutti lavoravano, tutti avevano qualche cosa da fare. Non si trovava un ozioso o un vagabondo nemmeno a cercarlo col lumicino. -– Ho capito, – disse subito quello svogliato di Pinocchio, – questo paese non è fatto per me! Io non son nato per lavorare! -Intanto la fame lo tormentava, perché erano oramai passate ventiquattr’ore che non aveva mangiato più nulla; nemmeno una pietanza di veccie. -Che fare? -Non gli restavano che due modi per potersi sdigiunare: o chiedere un po’ di lavoro, o chiedere in elemosina un soldo o un boccone di pane. -A chiedere l’elemosina si vergognava: perché il suo babbo gli aveva predicato sempre che l’elemosina hanno il diritto di chiederla solamente i vecchi e gl’infermi. I veri poveri, in questo mondo, meritevoli di assistenza e di compassione, non sono altro che quelli che, per ragione d’età o di malattia, si trovano condannati a non potersi più guadagnare il pane col lavoro delle proprie mani. Tutti gli altri hanno l’obbligo di lavorare: e se non lavorano e patiscono la fame, tanto peggio per loro. -In quel frattempo, passò per la strada un uomo tutto sudato e trafelato, il quale da sé tirava con gran fatica due carretti carichi di carbone. -Pinocchio, giudicandolo dalla fisonomia per un buon uomo, gli si accostò e, abbassando gli occhi dalla vergogna, gli disse sottovoce: -– Mi fareste la carità di darmi un soldo, perché mi sento morir dalla fame? -– Non un soldo solo, – rispose il carbonaio, – ma te ne do quattro, a patto che tu m’aiuti a tirare fino a casa questi due carretti di carbone. -– Mi meraviglio! – rispose il burattino quasi offeso, – per vostra regola io non ho fatto mai il somaro: io non ho mai tirato il carretto!... -– Meglio per te! – rispose il carbonaio. – Allora, ragazzo mio, se ti senti davvero morir dalla fame, mangia due belle fette della tua superbia e bada di non prendere un’indigestione. -Dopo pochi minuti passò per la via un muratore, che portava sulle spalle un corbello di calcina. -– Fareste, galantuomo, la carità d’un soldo a un povero ragazzo, che sbadiglia dall’appetito? -– Volentieri; vieni con me a portar calcina, – rispose il muratore, – e invece d’un soldo, te ne darò cinque. -– Ma la calcina è pesa, – replicò Pinocchio, – e io non voglio durar fatica. -– Se non vuoi durar fatica, allora, ragazzo mio, – divertiti a sbadigliare, e buon pro ti faccia. -In men di mezz’ora passarono altre venti persone, e a tutte Pinocchio chiese un po’ d’elemosina, ma tutte gli risposero: -– Non ti vergogni? Invece di fare il bighellone per la strada, và piuttosto a cercarti un po’ di lavoro, e impara a guadagnarti il pane! -Finalmente passò una buona donnina che portava due brocche d’acqua. -– Vi contentate, buona donna, che io beva una sorsata d’acqua alla vostra brocca? – disse Pinocchio, che bruciava dall’arsione della sete. -– Bevi pure, ragazzo mio! – disse la donnina, posando le due brocche in terra. -Quando Pinocchio ebbe bevuto come una spugna, borbottò a mezza voce, asciugandosi la bocca: -– La sete me la sono levata! Così mi potessi levar la fame!... -La buona donnina, sentendo queste parole, soggiunse subito: -– Se mi aiuti a portare a casa una di queste brocche d’acqua, ti darò un bel pezzo di pane. -Pinocchio guardò la brocca, e non rispose né sì né no. -– E insieme col pane ti darò un bel piatto di cavolfiore condito coll’olio e coll’aceto, – soggiunse la buona donna. -Pinocchio dette un’altra occhiata alla brocca, e non rispose né sì né no. -– E dopo il cavolfiore ti darò un bel confetto ripieno di rosolio. -Alle seduzioni di quest’ultima ghiottoneria, Pinocchio non seppe più resistere e, fatto un animo risoluto, disse: -– Pazienza! Vi porterò la brocca fino a casa! -La brocca era molto pesa, e il burattino, non avendo forza da portarla colle mani, si rassegnò a portarla in capo. -Arrivati a casa, la buona donnina fece sedere Pinocchio a una piccola tavola apparecchiata e gli pose davanti il pane, il cavolfiore condito e il confetto. -Pinocchio non mangiò, ma diluviò. Il suo stomaco pareva un quartiere rimasto vuoto e disabitato da cinque mesi. -Calmati a poco a poco i morsi rabbiosi della fame, allora alzò il capo per ringraziare la sua benefattrice; ma non aveva ancora finito di fissarla in volto, che cacciò un lunghissimo ohhh!... di maraviglia e rimase là incantato, cogli occhi spalancati, colla forchetta per aria e colla bocca piena di pane e di cavolfiore. -– Che cos’è mai tutta questa maraviglia? – disse ridendo la buona donna. -– Egli è... – rispose balbettando Pinocchio, – egli è... egli è... che voi somigliate... voi mi rammentate... sì, sì, sì, la stessa voce... gli stessi occhi.. gli stessi capelli... sì, sì, sì... anche voi avete i capelli turchini... come lei!... O Fatina mia!... O Fatina mia!... ditemi che siete voi, proprio voi!... Non mi fate più piangere! Se sapeste!... Ho pianto tanto, ho patito tanto.. -E nel dir così, Pinocchio piangeva dirottamente, e gettandosi ginocchioni per terra, abbracciava i ginocchi di quella donnina misteriosa. - -XXV Pinocchio promette alla Fata di essere buono e di studiare, perché è stufo di fare il burattino e vuol diventare un bravo ragazzo. - -In sulle prime la buona donnina cominciò col dire che lei non era la piccola Fata dai capelli turchini: ma poi, vedendosi oramai scoperta e non volendo mandare più a lungo la commedia, fini col farsi riconoscere, e disse a Pinocchio: -– Birba d’un burattino! Come mai ti sei accorto che ero io? -– Gli è il gran bene che vi voglio quello che me l’ha detto. -– Ti ricordi? Mi lasciasti bambina e ora mi ritrovi donna; tanto donna, che potrei quasi farti da mamma. -– L’ho caro dimolto, perché così, invece di sorellina, vi chiamerò la mia mamma. Gli è tanto tempo che mi struggo di avere una mamma come tutti gli altri ragazzi!... Ma come avete fatto a crescere così presto? -– È un segreto. -– Insegnatemelo: vorrei crescere un poco anch’io. Non lo vedete? Sono sempre rimasto alto come un soldo di cacio. -– Ma tu non puoi crescere, – replicò la Fata. -– Perché? -– Perché i burattini non crescono mai. Nascono burattini, vivono burattini e muoiono burattini. -– Oh! sono stufo di far sempre il burattino! – gridò Pinocchio, dandosi uno scappellotto. – Sarebbe ora che diventassi anch’io un uomo come tutti gli altri. -– E lo diventerai, se saprai meritartelo... -– Davvero? E che posso fare per meritarmelo? -– Una cosa facilissima: avvezzarti a essere un ragazzino perbene. -– O che forse non sono? -– Tutt’altro! I ragazzi perbene sono ubbidienti, e tu invece... -– E io non ubbidisco mai. -– I ragazzi perbene prendono amore allo studio e al lavoro, e tu... -– E io, invece, faccio il bighellone e il vagabondo tutto l’anno. -– I ragazzi perbene dicono sempre la verità... -– E io sempre le bugie. -– I ragazzi perbene vanno volentieri alla scuola... -– E a me la scuola mi fa venire i dolori di corpo. Ma da oggi in poi voglio mutar vita. -– Me lo prometti? -– Lo prometto. Voglio diventare un ragazzino perbene e voglio essere la consolazione del mio babbo... Dove sarà il mio povero babbo a quest’ora? -– Non lo so. -– Avrò mai la fortuna di poterlo rivedere e abbracciare? -– Credo di sì: anzi ne sono sicura. -A questa risposta fu tale e tanta la contentezza di Pinocchio, che prese le mani alla Fata e cominciò a baciargliele con tanta foga, che pareva quasi fuori di sé. Poi, alzando il viso e guardandola amorosamente, le domandò: -– Dimmi, mammina: dunque non è vero che tu sia morta? -– Par di no, – rispose sorridendo la Fata. -– Se tu sapessi, che dolore e che serratura alla gola che provai, quando lessi qui giace... -– Lo so: ed è per questo che ti ho perdonato. La sincerità del tuo dolore mi fece conoscere che tu avevi il cuore buono: e dai ragazzi buoni di cuore, anche se sono un po’ monelli e avvezzati male, c’è sempre da sperar qualcosa: ossia, c’è sempre da sperare che rientrino sulla vera strada. Ecco perché son venuta a cercarti fin qui. Io sarò la tua mamma... -– Oh! che bella cosa! – gridò Pinocchio saltando dall’allegrezza. -– Tu mi ubbidirai e farai sempre quello che ti dirò io. -– Volentieri, volentieri, volentieri! -– Fino da domani, – soggiunse la Fata, – tu comincerai coll’andare a scuola. -Pinocchio diventò subito un po’ meno allegro. -– Poi sceglierai a tuo piacere un’arte o un mestiere... -Pinocchio diventò serio. -– Che cosa brontoli fra i denti? – domandò la Fata con accento risentito. -– Dicevo... – mugolò il burattino a mezza voce, – che oramai per andare a scuola mi pare un po’ tardi... -– Nossignore. Tieni a mente che per istruirsi e per imparare non è mai tardi. -– Ma io non voglio fare né arti né mestieri... -– Perché? -– Perché a lavorare mi par fatica. -– Ragazzo mio, – disse la Fata, – quelli che dicono così, finiscono quasi sempre o in carcere o all’ospedale. L’uomo, per tua regola, nasca ricco o povero, è obbligato in questo mondo a far qualcosa, a occuparsi, a lavorare. Guai a lasciarsi prendere dall’ozio! L’ozio è una bruttissima malattia, e bisogna guarirla subito, fin da ragazzi: se no, quando siamo grandi, non si guarisce più. -Queste parole toccarono l’animo di Pinocchio, il quale rialzando vivacemente la testa disse alla Fata: -– Io studierò, io lavorerò, io farò tutto quello che mi dirai, perché, insomma, la vita del burattino mi è venuta a noia, e voglio diventare un ragazzo a tutti i costi. Me l’hai promesso, non è vero? -– Te l’ho promesso, e ora dipende da te. - -XXVI Pinocchio va co’ suoi compagni di scuola in riva al mare, per vedere il terribile Pescecane. - -Il giorno dopo Pinocchio andò alla scuola comunale. -Figuratevi quelle birbe di ragazzi, quando videro entrare nella loro scuola un burattino! Fu una risata, che non finiva più. Chi gli faceva uno scherzo, chi un altro; chi gli levava il berretto di mano; chi gli tirava il giubbettino di dietro; chi si provava a fargli coll’inchiostro due grandi baffi sotto il naso; e chi si attentava perfino a legargli dei fili ai piedi e alle mani per farlo ballare. -Per un poco Pinocchio usò disinvoltura e tirò via; ma finalmente, sentendosi scappar la pazienza, si rivolse a quelli, che più lo tafanavano e si pigliavano gioco di lui, e disse loro a muso duro: -– Badate, ragazzi: io non son venuto qui per essere il vostro buffone. Io rispetto gli altri e voglio essere rispettato. -– Bravo berlicche! Hai parlato come un libro stampato! – urlarono quei monelli, buttandosi via dalle matte risate: e uno di loro, più impertinente degli altri allungò la mano coll’idea di prendere il burattino per la punta del naso. -Ma non fece a tempo: perché Pinocchio stese la gamba sotto la tavola e gli consegnò una pedata negli stinchi. -– Ohi! che piedi duri! – urlò il ragazzo stropicciandosi il livido che gli aveva fatto il burattino. -– E che gomiti!... anche più duri dei piedi! – disse un altro che, per i suoi scherzi sguaiati, s’era beccata una gomitata nello stomaco. -Fatto sta che dopo quel calcio e quella gomitata Pinocchio acquistò subito la stima e la simpatia di tutti i ragazzi di scuola: e tutti gli facevano mille carezze e tutti gli volevano un bene dell’anima. -E anche il maestro se ne lodava, perché lo vedeva attento, studioso, intelligente, sempre il primo a entrare nella scuola, sempre l’ultimo a rizzarsi in piedi, a scuola finita. -Il solo difetto che avesse era quello di bazzicare troppi compagni: e fra questi, c’erano molti monelli conosciutissimi per la loro poca voglia di studiare e di farsi onore. -Il maestro lo avvertiva tutti i giorni, e anche la buona Fata non mancava di dirgli e di ripetergli più volte: -– Bada, Pinocchio! Quei tuoi compagnacci di scuola finiranno prima o poi col farti perdere l’amore allo studio e, forse forse, col tirarti addosso qualche grossa disgrazia. -– Non c’è pericolo! – rispondeva il burattino, facendo una spallucciata e toccandosi coll’indice in mezzo alla fronte, come per dire: «C’è tanto giudizio qui dentro!». -Ora avvenne che un bel giorno, mentre camminava verso scuola, incontrò un branco dei soliti compagni, che andandogli incontro, gli dissero: -– Sai la gran notizia? -– No. -– Qui nel mare vicino è arrivato un Pesce-cane, grosso come una montagna. -– Davvero?... Che sia quel medesimo Pesce-cane di quando affogò il mio povero babbo? -– Noi andiamo alla spiaggia per vederlo. Vieni anche tu? -– Io, no: voglio andare a scuola. -– Che t’importa della scuola? Alla scuola ci anderemo domani. Con una lezione di più o con una di meno, si rimane sempre gli stessi somari. -– E il maestro che dirà? -– Il maestro si lascia dire. È pagato apposta per brontolare tutto il giorno. -– E la mia mamma?... -– Le mamme non sanno mai nulla, – risposero quei malanni. -– Sapete che cosa farò? – disse Pinocchio. – Il Pesce-cane voglio vederlo per certe mie ragioni... ma anderò a vederlo dopo la scuola. -– Povero giucco! – ribatté uno del branco. – Che credi che un pesce di quella grossezza voglia star lì a fare il comodo tuo? Appena s’è annoiato, piglia il dirizzone per un’altra parte, e allora chi s’è visto s’è visto. -– Quanto tempo ci vuole di qui alla spiaggia? – domandò il burattino. -– Fra un’ora, siamo bell’e andati e tornati. -– Dunque, via! e chi più corre, è più bravo! – gridò Pinocchio. -Dato così il segnale della partenza, quel branco di monelli, coi loro libri e i loro quaderni sotto il braccio, si messero a correre attraverso ai campi; e Pinocchio era sempre avanti a tutti: pareva che avesse le ali ai piedi. -Di tanto in tanto, voltandosi indietro, canzonava i suoi compagni rimasti a una bella distanza, e nel vederli, ansanti, trafelati, polverosi e con tanto di lingua fuori, se la rideva proprio di cuore. Lo sciagurato in quel momento non sapeva a quali paure e a quali orribili disgrazie andava incontro!... - -XXVII Gran combattimento fra Pinocchio e i suoi compagni: uno de’ quali essendo rimasto ferito, Pinocchio viene arrestato dai carabinieri. - -Giunto che fu sulla spiaggia, Pinocchio dette subito una grande occhiata sul mare; ma non vide nessun Pesce-cane. -Il mare era tutto liscio come un gran cristallo da specchio. -– O il Pesce-cane dov’è? – domandò, voltandosi ai compagni. -– Sarà andato a far colazione, – rispose uno di loro, ridendo. -– O si sarà buttato sul letto per far un sonnellino, – soggiunse un altro, ridendo più forte che mai. -Da quelle risposte sconclusionate e da quelle risatacce grulle, Pinocchio capì che i suoi compagni gli avevano fatto una brutta celia, dandogli ad intendere una cosa che non era vera; e pigliandosela a male, disse a loro con voce di bizza: -– E ora? Che sugo ci avete trovato a darmi ad intendere la storiella del Pesce-cane? -– Il sugo c’è sicuro!... – risposero in coro quei monelli. -– E sarebbe?... -– Quello di farti perdere la scuola e di farti venire con noi. Non ti vergogni a mostrarti tutti i giorni così preciso e così diligente alle lezioni? Non ti vergogni a studiar tanto, come fai? -– E se io studio, che cosa ve ne importa? -– A noi ce ne importa moltissimo perché ci costringi a fare una brutta figura col maestro... -– Perché? -– Perché gli scolari che studiano fanno sempre scomparire quelli, come noi, che non hanno voglia di studiare. E noi non vogliamo scomparire! Anche noi abbiamo il nostro amor proprio!... -– E allora che cosa devo fare per contentarvi? -– Devi prendere a noia, anche tu, la scuola, la lezione e il maestro, che sono i nostri tre grandi nemici. -– E se io volessi seguitare a studiare? -– Noi non ti guarderemo più in faccia, e alla prima occasione ce la pagherai!... -– In verità mi fate quasi ridere, – disse il burattino con una scrollatina di capo. -– Ehi, Pinocchio! – gridò allora il più grande di quei ragazzi, andandogli sul viso. – Non venir qui a fare lo smargiasso: non venir qui a far tanto il galletto!... Perché se tu non hai paura di noi, noi non abbiamo paura di te! Ricordati che tu sei solo e noi siamo in sette. -– Sette come i peccati mortali, – disse Pinocchio con una gran risata. -– Avete sentito? Ci ha insultati tutti! Ci ha chiamati col nome di peccati mortali!... -– Pinocchio! chiedici scusa dell’offesa... se no, guai a te!... -– Cucù! – fece il burattino, battendosi coll’indice sulla punta del naso, in segno di canzonatura. -– Pinocchio! la finisce male!... -– Cucù! -– Ne toccherai quanto un somaro!... -– Cucù! -– Ritornerai a casa col naso rotto!... -– Cucù! -– Ora il cucù te lo darò io! – gridò il più ardito di quei monelli. – Prendi intanto quest’acconto e serbalo per la cena di stasera. -E nel dir così gli appiccicò un pugno sul capo. -Ma fu, come si suol dire, botta e risposta; perché il burattino, come c’era da aspettarselo, rispose con un altro pugno: e lì, da un momento all’altro, il combattimento diventò generale e accanito. -Pinocchio, sebbene fosse solo, si difendeva come un eroe. Con quei suoi piedi di legno durissimo lavorava così bene, da tener sempre i suoi nemici a rispettosa distanza. Dove i suoi piedi potevano arrivare e toccare, ci lasciavano sempre un livido per ricordo. -Allora i ragazzi, indispettiti di non potersi misurare col burattino a corpo a corpo, pensarono bene di metter mano ai proiettili, e sciolti i fagotti de’ loro libri di scuola, cominciarono a scagliare contro di lui i Sillabari, le Grammatiche, i Giannettini, i Minuzzoli, i Racconti del Thouar, il Pulcino della Baccini e altri libri scolastici: ma il burattino, che era d’occhio svelto e ammalizzito, faceva sempre civetta a tempo, sicché i volumi, passandogli di sopra al capo, andavano tutti a cascare nel mare. -Figuratevi i pesci! I pesci, credendo che quei libri fossero roba da mangiare, correvano a frotte a fior d’acqua; ma dopo avere abboccata qualche pagina o qualche frontespizio, la risputavano subito facendo con la bocca una certa smorfia, che pareva volesse dire: «Non è roba per noi: noi siamo avvezzi a cibarci molto meglio!» -Intanto il combattimento s’inferociva sempre più, quand’ecco che un grosso Granchio, che era uscito fuori dell’acqua e s’era adagio adagio arrampicato fin sulla spiaggia, gridò con una vociaccia di trombone infreddato: -– Smettetela, birichini che non siete altro! Queste guerre manesche fra ragazzi e ragazzi raramente vanno a finir bene. Qualche disgrazia accade sempre!... -Povero Granchio! Fu lo stesso che avesse predicato al vento. Anzi quella birba di Pinocchio, voltandosi indietro a guardarlo in cagnesco, gli disse sgarbatamente: -– Chétati, Granchio dell’uggia!... Faresti meglio a succiare due pasticche di lichene per guarire da codesta infreddatura di gola. Vai piuttosto a letto e cerca di sudare! -In quel frattempo i ragazzi, che avevano finito oramai di tirare tutti i loro libri, occhiarono lì a poca distanza il fagotto dei libri del burattino, e se ne impadronirono in men che non si dice. -Fra questi libri, v’era un volume rilegato in cartoncino grosso, colla costola e colle punte di cartapecora. Era un Trattato di Aritmetica. Vi lascio immaginare se era peso dimolto! -Uno di quei monelli agguantò quel volume e, presa di mira la testa di Pinocchio, lo scagliò con quanta forza aveva nel braccio: ma invece di cogliere il burattino, colse nella testa uno dei compagni; il quale diventò bianco come un panno lavato, e non disse altro che queste parole: -– O mamma mia, aiutatemi... perché muoio! -Poi cadde disteso sulla rena del lido. -Alla vista di quel morticino, i ragazzi spaventati si dettero a scappare a gambe e in pochi minuti non si videro più. -Ma Pinocchio rimase lì, e sebbene per il dolore e per lo spavento, anche lui fosse più morto che vivo, nondimeno corse a inzuppare il suo fazzoletto nell’acqua del mare e si pose a bagnare la tempia del suo povero compagno di scuola. E intanto piangendo dirottamente e disperandosi, lo chiamava per nome e gli diceva: -– Eugenio!... povero Eugenio mio!... apri gli occhi, e guardami!... Perché non mi rispondi? Non sono stato io, sai, che ti ho fatto tanto male! Credilo, non sono stato io!... Apri gli occhi, Eugenio... Se tieni gli occhi chiusi, mi farai morire anche me... O Dio mio! come farò ora a tornare a casa?... Con che coraggio potrò presentarmi alla mia buona mamma? Che sarà di me?... Dove fuggirò?... Dove andrò a nascondermi?... Oh! quant’era meglio, mille volte meglio che fossi andato a scuola!... Perché ho dato retta a questi compagni, che sono la mia dannazione?... E il maestro me l’aveva detto!... e la mia mamma me lo aveva ripetuto: «Guàrdati dai cattivi compagni!». Ma io sono un testardo... un caparbiaccio... lascio dir tutti, e poi fo sempre a modo mio!... E dopo mi tocca a scontarle... E così, da che sono al mondo, non ho mai avuto un quarto d’ora di bene. Dio mio! Che sarà di me, che sarà di me, che sarà di me?... -E Pinocchio continuava a piangere, e berciare, a darsi pugni nel capo e a chiamar per nome il povero Eugenio: quando sentì a un tratto un rumore sordo di passi che si avvicinavano. -Si voltò: erano due carabinieri -– Che cosa fai così sdraiato per terra? – domandarono a Pinocchio. -– Assisto questo mio compagno di scuola. -– Che gli è venuto male? -– Par di sì!.. -– Altro che male! – disse uno dei carabinieri, chinandosi e osservando Eugenio da vicino. – Questo ragazzo è stato ferito in una tempia: chi è che l’ha ferito? -– Io no, – balbettò il burattino che non aveva più fiato in corpo. -– Se non sei stato tu, chi è stato dunque che l’ha ferito? -– Io no, – ripeté Pinocchio. -– E con che cosa è stato ferito? -– Con questo libro. – E il burattino raccattò di terra il Trattato di Aritmetica, rilegato in cartone e cartapecora, per mostrarlo al carabiniere. -– E questo libro di chi è? -– Mio. -– Basta così: non occorre altro. Rìzzati subito e vieni via con noi. -– Ma io... -– Via con noi! -– Ma io sono innocente... -– Via con noi! -Prima di partire, i carabinieri chiamarono alcuni pescatori, che in quel momento passavano per l’appunto colla loro barca vicino alla spiaggia, e dissero loro: -– Vi affidiamo questo ragazzetto ferito nel capo. Portatelo a casa vostra e assistetelo. Domani torneremo a vederlo. -Quindi si volsero a Pinocchio, e dopo averlo messo in mezzo a loro due, gl’intimarono con accento soldatesco: -– Avanti! e cammina spedito! se no, peggio per te! -Senza farselo ripetere, il burattino cominciò a camminare per quella viottola, che conduceva al paese. Ma il povero diavolo non sapeva più nemmeno lui in che mondo si fosse. Gli pareva di sognare, e che brutto sogno! Era fuori di sé. I suoi occhi vedevano tutto doppio: le gambe gli tremavano: la lingua gli era rimasta attaccata al palato e non poteva più spiccicare una sola parola. Eppure, in mezzo a quella specie di stupidità e di rintontimento, una spina acutissima gli bucava il cuore: il pensiero, cioè, di dover passare sotto le finestre di casa della sua buona Fata, in mezzo ai carabinieri. Avrebbe preferito piuttosto di morire. -Erano già arrivati e stavano per entrare in paese, quando una folata di vento strapazzone levò di testa a Pinocchio il berretto, portandoglielo lontano una decina di passi. -– Si contentano, – disse il burattino ai carabinieri, – che vada a riprendere il mio berretto? -– Vai pure: ma facciamo una cosa lesta. -Il burattino andò, raccattò il berretto... ma invece di metterselo in capo, se lo mise in bocca fra i denti, e poi cominciò a correre di gran carriera verso la spiaggia del mare. Andava via come una palla di fucile. -I carabinieri, giudicando che fosse difficile raggiungerlo, gli aizzarono dietro un grosso cane mastino, che aveva guadagnato il primo premio in tutte le corse dei cani. Pinocchio correva, e il cane correva più di lui: per cui tutta la gente si affacciava alle finestre e si affollava in mezzo alla strada, ansiosa di veder la fine di questo palio feroce. -Ma non poté levarsi questa voglia, perché il cane mastino e Pinocchio sollevarono lungo la strada un tal polverone, che dopo pochi minuti non fu più possibile di veder nulla. - -XXVIII Pinocchio corre pericolo di essere fritto in padella come un pesce. - -Durante quella corsa disperata, vi fu un momento terribile, un momento in cui Pinocchio si credé perduto: perché bisogna sapere che Alidoro (era questo il nome del can-mastino) a furia di correre e correre, l’aveva quasi raggiunto. -Basti dire che il burattino sentiva dietro di sé, alla distanza d’un palmo, l’ansare affannoso di quella bestiaccia e ne sentiva perfino la vampa calda delle fiatate. -Per buona fortuna la spiaggia era oramai vicina e il mare si vedeva lì a pochi passi. -Appena fu sulla spiaggia, il burattino spiccò un bellissimo salto, come avrebbe potuto fare un ranocchio, e andò a cascare in mezzo all’acqua. Alidoro invece voleva fermarsi; ma trasportato dall’impeto della corsa, entrò nell’acqua anche lui. E quel disgraziato non sapeva nuotare; per cui cominciò subito ad annaspare colle zampe per reggersi a galla: ma più annaspava e più andava col capo sott’acqua. -Quando torno a rimettere il capo fuori, il povero cane aveva gli occhi impauriti e stralunati, e, abbaiando, gridava. -– Affogo! Affogo! -– Crepa! – gli rispose Pinocchio da lontano, il quale si vedeva oramai sicuro da ogni pericolo. -– Aiutami, Pinocchio mio!... salvami dalla morte!... -A quelle grida strazianti, il burattino, che in fondo aveva un cuore eccellente, si mosse a compassione, e voltosi al cane gli disse: -– Ma se io ti aiuto a salvarti, mi prometti di non darmi più noia e di non corrermi dietro? -– Te lo prometto! Te lo prometto! Spicciati per carità, perché se indugi un altro mezzo minuto, son bell’e morto. -Pinocchio esitò un poco: ma poi ricordandosi che il suo babbo gli aveva detto tante volte che a fare una buona azione non ci si scapita mai, andò nuotando a raggiungere Alidoro, e, presolo per la coda con tutte e due le mani, lo portò sano e salvo sulla rena asciutta del lido. -Il povero cane non si reggeva più in piedi. Aveva bevuto, senza volerlo, tant’acqua salata, che era gonfiato come un pallone. Per altro il burattino, non volendo fare a fidarsi troppo, stimò cosa prudente di gettarsi novamente in mare; e, allontanandosi dalla spiaggia, gridò all’amico salvato: -– Addio, Alidoro, fai buon viaggio e tanti saluti a casa. -– Addio, Pinocchio, – rispose il cane; – mille grazie di avermi liberato dalla morte. Tu mi hai fatto un gran servizio: e in questo mondo quel che è fatto è reso. Se capita l’occasione, ci riparleremo. -Pinocchio seguitò a nuotare, tenendosi sempre vicino alla terra. Finalmente gli parve di esser giunto in un luogo sicuro; e dando un’ occhiata alla spiaggia, vide sugli scogli una specie di grotta, dalla quale usciva un lunghissimo pennacchio di fumo. -– In quella grotta, – disse allora fra sé, – ci deve essere del fuoco. Tanto meglio! Anderò a rasciugarmi e a riscaldarmi, e poi?... E poi sarà quel che sarà. -Presa questa risoluzione, si avvicinò alla scogliera; ma quando fu lì per arrampicarsi, sentì qualche cosa sotto l’acqua che saliva, saliva, saliva e lo portava per aria. Tentò subito di fuggire, ma oramai era tardi, perché con sua grandissima maraviglia si trovò rinchiuso dentro a una grossa rete in mezzo a un brulichio di pesci d’ogni forma e grandezza, che scodinzolando si dibattevano come tant’anime disperate. -E nel tempo stesso vide uscire dalla grotta un pescatore così brutto, ma tanto brutto, che pareva un mostro marino. Invece di capelli aveva sulla testa un cespuglio foltissimo di erba verde; verde era la pelle del suo corpo, verdi gli occhi, verde la barba lunghissima, che gli scendeva fin quaggiù. Pareva un grosso ramarro ritto su i piedi di dietro. -Quando il pescatore ebbe tirata fuori la rete dal mare, gridò tutto contento: -– Provvidenza benedetta! Anch’oggi potrò fare una bella scorpacciata di pesce! -– Manco male, che io non sono un pesce! – disse Pinocchio dentro di sé, ripigliando un po’ di coraggio. -La rete piena di pesci fu portata dentro la grotta, una grotta buia e affumicata, in mezzo alla quale friggeva una gran padella d’olio, che mandava un odorino di moccolaia da mozzare il respiro. -– Ora vediamo un po’ che pesci abbiamo presi! – disse il pescatore verde; e ficcando nella rete una manona così spropositata, che pareva una pala da fornai, tirò fuori una manciata di triglie. -– Buone queste triglie! – disse, guardandole e annusandole con compiacenza. E dopo averle annusate, le scaraventò in una conca senz’acqua. -Poi ripeté più volte la solita operazione; e via via che cavava fuori gli altri pesci, sentiva venirsi l’acquolina in bocca e gongolando diceva: -– Buoni questi naselli!... -– Squisiti questi muggini!... -– Deliziose queste sogliole!... -– Prelibati questi ragnotti!... -– Carine queste acciughe col capo!... -Come potete immaginarvelo, i naselli, i muggini, le sogliole, i ragnotti e le acciughe, andarono tutti alla rinfusa nella conca, a tener compagnia alle triglie. -L’ultimo che restò nella rete fu Pinocchio. -Appena il pescatore l’ebbe cavato fuori, sgranò dalla maraviglia i suoi occhioni verdi, gridando quasi impaurito: -– Che razza di pesce è questo? Dei pesci fatti a questo modo non mi ricordo di averne mai mangiati! -E tornò a guardarlo attentamente, e dopo averlo guardato ben bene per ogni verso, finì col dire: -– Ho già capito: dev’essere un granchio di mare. -Allora Pinocchio mortificato di sentirsi scambiare per un granchio, disse con accento risentito: -– Ma che granchio e non granchio? Guardi come lei mi tratta! Io per sua regola sono un burattino. -– Un burattino? – replicò il pescatore. – Dico la verità, il pesce burattino è per me un pesce nuovo! Meglio così! Ti mangerò più volentieri. -– Mangiarmi? Ma la vuol capire che io non sono un pesce? O non sente che parlo, e ragiono come lei? -– È verissimo, – soggiunse il pescatore, – e siccome vedo che sei un pesce, che hai la fortuna di parlare e di ragionare, come me, così voglio usarti anch’io i dovuti riguardi. -– E questi riguardi sarebbero?... -– In segno di amicizia e di stima particolare, lascerò a te la scelta del come vuoi essere cucinato. Desideri essere fritto in padella, oppure preferisci di essere cotto nel tegame colla salsa di pomidoro? -– A dir la verità, – rispose Pinocchio, – se io debbo scegliere, preferisco piuttosto di essere lasciato libero, per potermene tornare a casa mia. -– Tu scherzi? Ti pare che io voglia perdere l’occasione di assaggiare un pesce così raro? Non capita mica tutti i giorni un pesce burattino in questi mari. Lascia fare a me: ti friggerò in padella assieme a tutti gli altri pesci, e te ne troverai contento. L’esser fritto in compagnia è sempre una consolazione. -L’infelice Pinocchio, a quest’antifona, cominciò a piangere, a strillare, a raccomandarsi e piangendo diceva: – Quant’era meglio, che fossi andato a scuola!... Ho voluto dar retta ai compagni, e ora la pago! Ih!... Ih!... Ih!... -E perché si divincolava come un anguilla e faceva sforzi incredibili, per isgusciare dalle grinfie del pescatore verde, questi prese una bella buccia di giunco, e dopo averlo legato per le mani e per i piedi, come un salame, lo gettò in fondo alla conca cogli altri. -Poi, tirato fuori un vassoiaccio di legno, pieno di farina, si dette a infarinare tutti quei pesci; e man mano che li aveva infarinati, li buttava a friggere dentro la padella. -I primi a ballare nell’olio bollente furono i poveri naselli: poi toccò ai ragnotti, poi ai muggini, poi alle sogliole e alle acciughe, e poi venne la volta di Pinocchio. Il quale a vedersi così vicino alla morte (e che brutta morte!) fu preso da tanto tremito e da tanto spavento, che non aveva più né voce né fiato per raccomandarsi. -Il povero figliuolo si raccomandava cogli occhi! Ma il pescatore verde, senza badarlo neppure, lo avvoltolò cinque o sei volte nella farina, infarinandolo così bene dal capo ai piedi, che pareva diventato un burattino di gesso. -Poi lo prese per il capo, e... - -XXIX Ritorna a casa della Fata, la quale gli promette che il giorno dopo non sarà più un burattino, ma diventerà un ragazzo. Gran colazione di caffè-e-latte per festeggiare questo grande avvenimento. - -Mentre il pescatore era proprio sul punto di buttar Pinocchio nella padella, entrò nella grotta un grosso cane condotto là dall’odore acutissimo e ghiotto della frittura. -– Passa via! – gli gridò il pescatore minacciandolo e tenendo sempre in mano il burattino infarinato. -Ma il povero cane aveva una fame per quattro, e mugolando e dimenando la coda, pareva che dicesse: «Dammi un boccon di frittura e ti lascio in pace». -– Passa via, ti dico! – gli ripeté il pescatore; e allungò la gamba per tirargli una pedata. -Allora il cane che, quando aveva fame davvero, non era avvezzo a lasciarsi posar mosche sul naso, si rivoltò ringhioso al pescatore, mostrandogli le sue terribili zanne. -In quel mentre si udì nella grotta una vocina fioca fioca, che disse: -– Salvami, Alidoro!... Se non mi salvi, son fritto! -Il cane riconobbe subito la voce di Pinocchio e si accorse con sua grandissima maraviglia che la vocina era uscita da quel fagotto infarinato che il pescatore teneva in mano. -Allora che cosa fa? Spicca un gran lancio da terra, abbocca quel fagotto infarinato e tenendolo leggermente coi denti, esce correndo dalla grotta, e via come un baleno! -Il pescatore, arrabbiatissimo di vedersi strappar di mano un pesce, che egli avrebbe mangiato tanto volentieri, si provò a rincorrere il cane; ma fatti pochi passi, gli venne un nodo di tosse e dové tornarsene indietro. -Intanto Alidoro, ritrovata che ebbe la viottola che conduceva al paese, si fermò e posò delicatamente in terra l’amico Pinocchio. -– Quanto ti debbo ringraziare! – disse il burattino. -– Non c’è bisogno, – replicò il cane. – Tu salvasti me, e quel che è fatto, è reso. Si sa: in questo mondo bisogna tutti aiutarsi l’uno coll’altro. -– Ma come mai sei capitato in quella grotta? -– Ero sempre qui disteso sulla spiaggia più morto che vivo, quando il vento mi ha portato da lontano un odorino di frittura. Quell’odorino mi ha stuzzicato l’appetito, e io gli sono andato dietro. Se arrivavo un minuto più tardi!... -– Non me lo dire! – urlò Pinocchio che tremava ancora dalla paura. – Non me lo dire! Se tu arrivavi un minuto più tardi, a quest’ora io ero bell’e fritto, mangiato e digerito. Brrr!... mi vengono i brividi soltanto a pensarvi!... -Alidoro, ridendo, stese la zampa destra verso il burattino, il quale gliela strinse forte forte in segno di grande amicizia: e dopo si lasciarono. -Il cane riprese la strada di casa: e Pinocchio, rimasto solo, andò a una capanna lì poco distante, e domandò a un vecchietto che stava sulla porta a scaldarsi al sole: -– Dite, galantuomo, sapete nulla di un povero ragazzo ferito nel capo e che si chiamava Eugenio?... -– Il ragazzo è stato portato da alcuni pescatori in questa capanna, e ora... -Ora sarà morto!... – interruppe Pinocchio con gran dolore. -– No: ora è vivo, ed è già ritornato a casa sua. -– Davvero, davvero? – gridò il burattino, saltando dall’allegrezza. – Dunque la ferita non era grave? -– Ma poteva riuscire gravissima e anche mortale, – rispose il vecchietto, – perché gli tirarono sul capo un grosso libro rilegato in cartone. -– E chi glielo tirò? -– Un suo compagno di scuola: un certo Pinocchio... -– E chi è questo Pinocchio? – domandò il burattino facendo lo gnorri. -– Dicono che sia un ragazzaccio, un vagabondo, un vero rompicollo... -– Calunnie! Tutte calunnie! -– Lo conosci tu questo Pinocchio? -– Di vista! – rispose il burattino. -– E tu che concetto ne hai? – gli chiese il vecchietto. -– A me mi pare un gran buon figliuolo, pieno di voglia di studiare, ubbidiente, affezionato al suo babbo e alla sua famiglia... -Mentre il burattino sfilava a faccia fresca tutte queste bugie, si toccò il naso e si accorse che il naso gli s’era allungato più d’un palmo. Allora tutto impaurito cominciò a gridare: -– Non date retta, galantuomo, a tutto il bene che ve ne ho detto: perché conosco benissimo Pinocchio e posso assicurarvi anch’io che è davvero un ragazzaccio, un disubbidiente e uno svogliato, che invece di andare a scuola, va coi compagni a fare lo sbarazzino! -Appena ebbe pronunziate queste parole, il suo naso raccorcì e tornò della grandezza naturale, come era prima. -– E perché sei tutto bianco a codesto modo? – gli domandò a un tratto il vecchietto. -– Vi dirò... senza avvedermene, mi sono strofinato a un muro, che era imbiancato di fresco, – rispose il burattino, vergognandosi a confessare che lo avevano infarinato come un pesce, per poi friggerlo in padella. -– O della tua giacchetta, de’ tuoi calzoncini e del tuo berretto che cosa ne hai fatto? -– Ho incontrato i ladri e mi hanno spogliato. Dite, buon vecchio, non avreste per caso da darmi un po’ di vestituccio, tanto perché io possa ritornare a casa? -– Ragazzo mio, in fatto di vestiti, io non ho che un piccolo sacchetto, dove ci tengo i lupini. Se vuoi, piglialo: eccolo là. -E Pinocchio non se lo fece dire due volte: prese subito il sacchetto dei lupini che era vuoto, e dopo averci fatto colle forbici una piccola buca nel fondo e due buche dalle parti, se lo infilò a uso camicia. E vestito leggerino a quel modo, si avviò verso il paese. -Ma, lungo la strada, non si sentiva punto tranquillo; tant’è vero che faceva un passo avanti e uno indietro e, discorrendo da se solo, andava dicendo: -– Come farò a presentarmi alla mia buona Fatina? Che dirà quando mi vedrà?... Vorrà perdonarmi questa seconda birichinata?... Scommetto che non me la perdona!... Oh! Non me la perdona di certo... E mi sta il dovere: perché io sono un monello che prometto sempre di correggermi, e non mantengo mai!... -Arrivò al paese che era già notte buia, e perché faceva tempaccio e l’acqua veniva giù a catinelle, andò diritto diritto alla casa della Fata coll’animo risoluto di bussare alla porta e di farsi aprire. -Ma, quando fu lì, sentì mancarsi il coraggio, e invece di bussare si allontanò, correndo, una ventina di passi. Si avvicinò una seconda volta alla porta, e non concluse nulla: si avvicinò una terza volta, e nulla: la quarta volta prese, tremando, il battente di ferro in mano, e bussò un piccolo colpettino. -Aspetta, aspetta, finalmente dopo mezz’ora si aprì una finestra dell’ultimo piano (la casa era di quattro piani) e Pinocchio vide affacciarsi una grossa Lumaca, che aveva un lumicino acceso sul capo, la quale disse: -– Chi è a quest’ora? -– La Fata è in casa? – domandò il burattino. -– La Fata dorme e non vuol essere svegliata: ma tu chi sei? -– Sono io! -– Chi io? -– Pinocchio. -– Chi Pinocchio? -– Il burattino, quello che sta in casa colla Fata. -– Ah! ho capito, – disse la Lumaca. – Aspettami costì, che ora scendo giù e ti apro subito. -– Spicciatevi, per carità, perché io muoio dal freddo. -– Ragazzo mio, io sono una lumaca, e le lumache non hanno mai fretta. -Intanto passò un’ora, ne passarono due, e la porta non si apriva: per cui Pinocchio, che tremava dal freddo, dalla paura e dall’acqua che aveva addosso, si fece cuore e bussò una seconda volta, e bussò più forte. A quel secondo colpo si aprì una finestra del piano di sotto e si affacciò la solita Lumaca. -– Lumachina bella, – gridò Pinocchio dalla strada, – sono due ore che aspetto! E due ore, a questa serataccia, diventano più lunghe di due anni. Spicciatevi, per carità. -– Ragazzo mio – gli rispose dalla finestra quella bestiola tutta pace e tutta flemma, – ragazzo mio, io sono una lumaca, e le lumache non hanno mai fretta. -E la finestra si richiuse. -Di lì a poco suonò la mezzanotte: poi il tocco, poi le due dopo mezzanotte, e la porta era sempre chiusa. -Allora Pinocchio, perduta la pazienza, afferrò con rabbia il battente della porta per bussare un gran colpo da far rintronare tutto il casamento: ma il battente che era di ferro, diventò a un tratto un’anguilla viva, che sgusciandogli dalle mani sparì nel rigagnolo d’acqua in mezzo alla strada. -– Ah, sì? – gridò Pinocchio sempre più accecato dalla collera. – Se il battente è sparito, io seguiterò a bussare a furia di calci. -E tiratosi un poco indietro, lasciò andare una solennissima pedata nell’uscio della casa. Il colpo fu così forte, che il piede penetrò nel legno fino a mezzo: e quando il burattino si provò a ricavarlo fuori, fu tutta fatica inutile: perché il piede c’era rimasto conficcato dentro, come un chiodo ribadito. -Figuratevi il povero Pinocchio! Dové passare tutto il resto della notte con un piede in terra e con quell’altro per aria. -La mattina, sul far del giorno, finalmente la porta si aprì. -Quella brava bestiola della Lumaca, a scendere dal quarto piano fino all’uscio di strada, ci aveva messo solamente nove ore. Bisogna proprio dire che avesse fatto una sudata! -– Che cosa fate con codesto piede conficcato nell’uscio? – domandò ridendo al burattino. -– È stata una disgrazia. Vedete un po’, Lumachina bella, se vi riesce di liberarmi da questo supplizio. -– Ragazzo mio, così ci vuole un legnaiolo, e io non ho mai fatto la legnaiola. -– Pregate la Fata da parte mia!... -– La Fata dorme e non vuol essere svegliata. -– Ma che cosa volete che io faccia inchiodato tutto il giorno a questa porta? -– Divèrtiti a contare le formicole che passano per la strada. -– Portatemi almeno qualche cosa da mangiare, perché mi sento rifinito. -– Subito! – disse la Lumaca. -Difatti dopo tre ore e mezzo Pinocchio la vide tornare con un vassoio d’argento in capo. Nel vassoio c’era un pane, un pollastro arrosto e quattro albicocche mature. -– Ecco la colazione che vi manda la Fata, – disse la Lumaca. -Alla vista di quella grazia di Dio, il burattino sentì consolarsi tutto. -Ma quale fu il suo disinganno, quando incominciando a mangiare, si dové accorgere che il pane era di gesso, il pollastro di cartone e le quattro albicocche di alabastro, colorite al naturale. -Voleva piangere, voleva darsi alla disperazione, voleva buttar via il vassoio e quel che c’era dentro: ma invece, o fosse il gran dolore o la gran languidezza di stomaco, fatto sta che cadde svenuto. -Quando si riebbe, si trovò disteso sopra un sofà, e la Fata era accanto a lui. -– Anche per questa volta ti perdono, – gli disse la Fata, – ma guai a te se me ne fai un’altra delle tue!... -Pinocchio promise e giurò che avrebbe studiato, e che si sarebbe condotto sempre bene. E mantenne la parola per tutto il resto dell’anno. Difatti, agli esami delle vacanze, ebbe l’onore di essere il più bravo della scuola; e i suoi portamenti, in generale, furono giudicati così lodevoli e soddisfacenti, che la Fata, tutta contenta, gli disse: -– Domani finalmente il tuo desiderio sarà appagato! -– Cioè? -– Domani finirai di essere un burattino di legno, e diventerai un ragazzo perbene. -Chi non ha veduto la gioia di Pinocchio, a questa notizia tanto sospirata, non potrà mai figurarsela. Tutti i suoi amici e compagni di scuola dovevano essere invitati per il giorno dopo a una gran colazione in casa della Fata, per festeggiare insieme il grande avvenimento: e la Fata aveva fatto preparare dugento tazze di caffè-e-latte e quattrocento panini imburrati di sotto e di sopra. Quella giornata prometteva d’essere molto bella e molto allegra, ma... -Disgraziatamente, nella vita dei burattini c’è sempre un ma, che sciupa ogni cosa. - -XXX Pinocchio, invece di diventare un ragazzo, parte di nascosto col suo amico Lucignolo per il Paese dei Balocchi. - -Com’è naturale, Pinocchio chiese subito alla Fata il permesso di andare in giro per la città a fare gli inviti: e la Fata gli disse: -– Vai pure a invitare i tuoi compagni per la colazione di domani: ma ricordati di tornare a casa prima che faccia notte. Hai capito? -– Fra un’ora prometto di essere bell’e ritornato, – replicò il burattino. -– Bada, Pinocchio! I ragazzi fanno presto a promettere: ma il più delle volte, fanno tardi a mantenere. -– Ma io non sono come gli altri: io, quando dico una cosa, la mantengo. -– Vedremo. Caso poi tu disubbidissi, tanto peggio per te. -– Perché? -– Perché i ragazzi che non danno retta ai consigli di chi ne sa più di loro, vanno sempre incontro a qualche disgrazia. -– E io l’ho provato! – disse Pinocchio. – Ma ora non ci ricasco più! -– Vedremo se dici il vero. -Senza aggiungere altre parole, il burattino salutò la sua buona Fata, che era per lui una specie di mamma, e cantando e ballando uscì fuori della porta di casa. -In poco più d’un’ora, tutti i suoi amici furono invitati. Alcuni accettarono subito e di gran cuore: altri da principio si fecero un po’ pregare; ma quando seppero che i panini da inzuppare nel caffè-e-latte sarebbero stati imburrati anche dalla parte di fuori, finirono tutti col dire: «Verremo anche noi, per farti piacere». -Ora bisogna sapere che Pinocchio, fra i suoi amici e compagni di scuola, ne aveva uno prediletto e carissimo, il quale si chiamava di nome Romeo: ma tutti lo chiamavano col soprannome di Lucignolo, per via del suo personalino asciutto, secco e allampanato, tale e quale come il lucignolo nuovo di un lumino da notte. -Lucignolo era il ragazzo più svogliato e più birichino di tutta la scuola: ma Pinocchio gli voleva un gran bene. Difatti andò subito a cercarlo a casa, per invitarlo alla colazione, e non lo trovò: tornò una seconda volta, e Lucignolo non c’era: tornò una terza volta, e fece la strada invano. -Dove poterlo ripescare? Cerca di qua, cerca di là, finalmente lo vide nascosto sotto il portico di una casa di contadini. -– Che cosa fai costì? – gli domandò Pinocchio, avvicinandosi. -– Aspetto la mezzanotte, per partire... -– Dove vai? -– Lontano, lontano, lontano! -– E io che son venuto a cercarti a casa tre volte!... -– Che cosa volevi da me? -– Non sai il grande avvenimento? Non sai la fortuna che mi è toccata? -– Quale? -– Domani finisco di essere un burattino e divento un ragazzo come te, e come tutti gli altri. -– Buon pro ti faccia. -– Domani, dunque, ti aspetto a colazione a casa mia. -– Ma se ti dico che parto questa sera. -– A che ora? -– Fra poco. -– E dove vai? -– Vado ad abitare in un paese... che è il più bel paese di questo mondo: una vera cuccagna!... -– E come si chiama? -– Si chiama il Paese dei Balocchi. Perché non vieni anche tu? -– Io? no davvero! -– Hai torto, Pinocchio! Credilo a me che, se non vieni, te ne pentirai. Dove vuoi trovare un paese più salubre per noialtri ragazzi? Lì non vi sono scuole: lì non vi sono maestri: lì non vi sono libri. In quel paese benedetto non si studia mai. Il giovedì non si fa scuola: e ogni settimana è composta di sei giovedì e di una domenica. Figùrati che le vacanze dell’autunno cominciano col primo di gennaio e finiscono coll’ultimo di dicembre. Ecco un paese, come piace veramente a me! Ecco come dovrebbero essere tutti i paesi civili!... -– Ma come si passano le giornate nel Paese dei Balocchi? -– Si passano baloccandosi e divertendosi dalla mattina alla sera. La sera poi si va a letto, e la mattina dopo si ricomincia daccapo. Che te ne pare? -– Uhm!... – fece Pinocchio: e tentennò leggermente il capo, come dire: «È una vita che farei volentieri anch’io!». -– Dunque, vuoi partire con me? Sì o no? Risolviti. -– No, no, no e poi no. Oramai ho promesso alla mia buona Fata di diventare un ragazzo perbene, e voglio mantenere la promessa. Anzi, siccome vedo che il sole va sotto, così ti lascio subito e scappo via. Dunque addio e buon viaggio. -– Dove corri con tanta furia? -– A casa. La mia buona Fata vuole che ritorni prima di notte. -– Aspetta altri due minuti. -– Faccio troppo tardi. -– Due minuti soli. -– E se poi la Fata mi grida? -– Lasciala gridare. Quando avrà gridato ben bene, si cheterà, – disse quella birba di Lucignolo. -– E come fai? Parti solo o in compagnia? -– Solo? Saremo più di cento ragazzi. -– E il viaggio lo fate a piedi? -– A mezzanotte passerà di qui il carro che ci deve prendere e condurre fin dentro ai confini di quel fortunatissimo paese. -– Che cosa pagherei che ora fosse mezzanotte!... -– Perché? -– Per vedervi partire tutti insieme. -– Rimani qui un altro poco e ci vedrai. -– No, no: voglio ritornare a casa. -– Aspetta altri due minuti. -– Ho indugiato anche troppo. La Fata starà in pensiero per me. -– Povera Fata! Che ha paura forse che ti mangino i pipistrelli? -– Ma dunque, – soggiunse Pinocchio, – tu sei veramente sicuro che in quel paese non ci sono punte scuole?... -– Neanche l’ombra. -– E nemmeno maestri?... -– Nemmen’uno. -– E non c’è mai l’obbligo di studiare? -– Mai, mai, mai! -– Che bel paese! – disse Pinocchio, sentendo venirsi l’acquolina in bocca. – Che bel paese! Io non ci sono stato mai, ma me lo figuro!... -– Perché non vieni anche tu? -– È inutile che tu mi tenti! Oramai ho promesso alla mia buona Fata di diventare un ragazzo di giudizio, e non voglio mancare alla parola. -– Dunque addio, e salutami tanto le scuole ginnasiali!... E anche quelle liceali, se le incontri per la strada. -– Addio, Lucignolo: fai buon viaggio, divertiti e rammentati qualche volta degli amici. -Ciò detto, il burattino fece due passi in atto di andarsene: ma poi, fermandosi e voltandosi all’amico, gli domandò: -– Ma sei proprio sicuro che in quel paese tutte le settimane sieno composte di sei giovedì e di una domenica? -– Sicurissimo. -– Ma lo sai di certo che le vacanze abbiano principio col primo di gennaio e finiscano coll’ultimo di dicembre? -– Di certissimo! -– Che bel paese! – ripeté Pinocchio, sputando dalla soverchia consolazione. -Poi, fatto un animo risoluto, soggiunse in fretta e furia: -– Dunque, addio davvero: e buon viaggio. -– Addio. -– Fra quanto partirete? -– Fra due ore! -– Peccato! Se alla partenza mancasse un’ora sola, sarei quasi quasi capace di aspettare. -– E la Fata?... -– Oramai ho fatto tardi!... E tornare a casa un’ora prima o un’ora dopo, è lo stesso. -– Povero Pinocchio! E se la Fata ti grida? -– Pazienza! La lascerò gridare. Quando avrà gridato ben bene, si cheterà. -Intanto si era già fatta notte e notte buia: quando a un tratto videro muoversi in lontananza un lumicino... e sentirono un suono di bubboli e uno squillo di trombetta, così piccolino e soffocato, che pareva il sibilo di una zanzara! -– Eccolo! – gridò Lucignolo, rizzandosi in piedi. -– Chi è? – domandò sottovoce Pinocchio. -– È il carro che viene a prendermi. Dunque, vuoi venire, sì o no? -– Ma è proprio vero, – domandò il burattino, – che in quel paese i ragazzi non hanno mai l’obbligo di studiare? -– Mai, mai, mai! -– Che bel paese!... che bel paese!... che bel paese!... - -XXXI Dopo cinque mesi di cuccagna, Pinocchio, con sua grande maraviglia, sente spuntarsi un bel paio d’orecchie asinine e diventa un ciuchino, con la coda e tutto. - -Finalmente il carro arrivò: e arrivò senza fare il più piccolo rumore, perché le sue ruote erano fasciate di stoppa e di cenci. -Lo tiravano dodici pariglie di ciuchini, tutti della medesima grandezza, ma di diverso pelame. -Alcuni erano bigi, altri bianchi, altri brizzolati a uso pepe e sale, e altri rigati a grandi strisce gialle e turchine. Ma la cosa più singolare era questa: che quelle dodici pariglie, ossia quei ventiquattro ciuchini, invece di essere ferrati come tutti le altre bestie da tiro o da soma, avevano ai piedi degli stivali da uomo di vacchetta bianca. -E il conduttore del carro?... -Figuratevi un omino più largo che lungo, tenero e untuoso come una palla di burro, con un visino di melarosa, una bocchina che rideva sempre e una voce sottile e carezzevole, come quella d’un gatto che si raccomanda al buon cuore della padrona di casa. -Tutti i ragazzi, appena lo vedevano, ne restavano innamorati e facevano a gara nel montare sul suo carro, per essere condotti da lui in quella vera cuccagna conosciuta nella carta geografica col seducente nome di Paese dei Balocchi. -Difatti il carro era già tutto pieno di ragazzetti fra gli otto e i dodici anni, ammonticchiati gli uni sugli altri, come tante acciughe nella salamoia. Stavano male, stavano pigiati, non potevano quasi respirare: ma nessuno diceva ohi!, nessuno si lamentava. La consolazione di sapere che fra poche ore sarebbero giunti in un paese, dove non c’erano né libri, né scuole, né maestri, li rendeva così contenti e rassegnati, che non sentivano né i disagi, né gli strapazzi, né la fame, né la sete, né il sonno. -Appena che il carro si fu fermato, l’omino si volse a Lucignolo e con mille smorfie e mille manierine, gli domandò sorridendo: -– Dimmi, mio bel ragazzo, vuoi venire anche tu in quel fortunato paese? -– Sicuro che ci voglio venire. -– Ma ti avverto, carino mio, che nel carro non c’è più posto. Come vedi, è tutto pieno!... -– Pazienza! – replicò Lucignolo, – se non c’è posto dentro, io mi adatterò a star seduto sulle stanghe del carro. -E spiccato un salto, montò a cavalcioni sulle stanghe. -– E tu, amor mio?... – disse l’omino volgendosi tutto complimentoso a Pinocchio. – Che intendi fare? Vieni con noi, o rimani?... -– Io rimango, – rispose Pinocchio. – Io voglio tornarmene a casa mia: voglio studiare e voglio farmi onore alla scuola, come fanno tutti i ragazzi perbene. -– Buon pro ti faccia! -– Pinocchio! – disse allora Lucignolo. – Dai retta a me: vieni via con noi e staremo allegri. -– No, no, no! -– Vieni via con noi e staremo allegri, – gridarono altre quattro voci di dentro al carro. -– Vieni via con noi e staremo allegri, – urlarono tutte insieme un centinaio di voci di dentro al carro. -– E se vengo con voi, che cosa dirà la mia buona Fata? – disse il burattino che cominciava a intenerirsi e a ciurlar nel manico. -– Non ti fasciare il capo con tante melanconie. Pensa che andiamo in un paese dove saremo padroni di fare il chiasso dalla mattina alla sera! -Pinocchio non rispose: ma fece un sospiro: poi fece un altro sospiro: poi un terzo sospiro; finalmente disse: -– Fatemi un po’ di posto: voglio venire anch’io!... -– I posti son tutti pieni, – replicò l’omino, – ma per mostrarti quanto sei gradito, posso cederti il mio posto a cassetta... -– E voi?... -– E io farò la strada a piedi. -– No, davvero, che non lo permetto. Preferisco piuttosto di salire in groppa a qualcuno di questi ciuchini! – gridò Pinocchio. -Detto fatto, si avvicinò al ciuchino manritto della prima pariglia e fece l’atto di volerlo cavalcare: ma la bestiola, voltandosi a secco, gli dette una gran musata nello stomaco e lo gettò a gambe all’aria. -Figuratevi la risatona impertinente e sgangherata di tutti quei ragazzi presenti alla scena. -Ma l’omino non rise. Si accostò pieno di amorevolezza al ciuchino ribelle, e, facendo finta di dargli un bacio, gli staccò con un morso la metà dell’orecchio destro. -Intanto Pinocchio, rizzatosi da terra tutto infuriato, schizzò con un salto sulla groppa di quel povero animale. E il salto fu così bello, che i ragazzi, smesso di ridere, cominciarono a urlare: «Viva Pinocchio!» e a fare una smanacciata di applausi, che non finivano più. -Quand’ecco che all’improvviso il ciuchino alzò tutt’e due le gambe di dietro, e dando una fortissima sgropponata, scaraventò il povero burattino in mezzo alla strada sopra un monte di ghiaia. -Allora grandi risate daccapo: ma l’omino, invece di ridere, si sentì preso da tanto amore per quell’irrequieto asinello, che, con un bacio, gli portò via di netto la metà di quell’altro orecchio. Poi disse al burattino: -– Rimonta pure a cavallo e non aver paura. Quel ciuchino aveva qualche grillo per il capo: ma io gli ho detto due paroline negli orecchi e spero di averlo reso mansueto e ragionevole. -Pinocchio montò: e il carro cominciò a muoversi: ma nel tempo che i ciuchini galoppavano e che il carro correva sui ciotoli della via maestra, gli parve al burattino di sentire una voce sommessa e appena intelligibile, che gli disse: -– Povero gonzo! Hai voluto fare a modo tuo, ma te ne pentirai! -Pinocchio, quasi impaurito, guardò di qua e di là, per conoscere da qual parte venissero queste parole; ma non vide nessuno: i ciuchini galoppavano, il carro correva, i ragazzi dentro al carro dormivano, Lucignolo russava come un ghiro e l’omino seduto a cassetta, canterellava fra i denti: -Tutti la notte dormono -E io non dormo mai... -Fatto un altro mezzo chilometro, Pinocchio sentì la solita vocina fioca che gli disse: -– Tienlo a mente, grullerello! I ragazzi che smettono di studiare e voltano le spalle ai libri, alle scuole e ai maestri, per darsi interamente ai balocchi e ai divertimenti, non possono far altro che una fine disgraziata!... Io lo so per prova!... E te lo posso dire! Verrà un giorno che piangerai anche tu, come oggi piango io... ma allora sarà tardi!... -A queste parole bisbigliate sommessamente, il burattino, spaventato più che mai, saltò giù dalla groppa della cavalcatura e andò a prendere il suo ciuchino per il muso. -E immaginatevi come restò, quando s’accorse che il suo ciuchino piangeva... e piangeva proprio come un ragazzo! -– Ehi, signor omino, – gridò allora Pinocchio al padrone del carro, – sapete che cosa c’è di nuovo? Questo ciuchino piange. -– Lascialo piangere: riderà quando sarà sposo -– Ma che forse gli avete insegnato anche a parlare ? -– No: ha imparato da sé a borbottare qualche parola, essendo stato tre anni in una compagnia di cani ammaestrati. -– Povera bestia!... -– Via, via, – disse l’omino, – non perdiamo il nostro tempo a veder piangere un ciuco. Rimonta a cavallo, e andiamo: la notte è fresca e la strada è lunga. -Pinocchio obbedì senza rifiatare. Il carro riprese la sua corsa: e la mattina, sul far dell’alba, arrivarono felicemente nel Paese dei Balocchi. -Questo paese non somigliava a nessun altro paese del mondo. La sua popolazione era tutta composta di ragazzi. I più vecchi avevano quattordici anni: i più giovani ne avevano otto appena. Nelle strade, un’allegria, un chiasso, uno strillìo da levar di cervello! Branchi di monelli dappertutto. Chi giocava alle noci, chi alle piastrelle, chi alla palla, chi andava in velocipede, chi sopra a un cavallino di legno; questi facevano a mosca-cieca, quegli altri si rincorrevano; altri, vestiti da pagliacci, mangiavano la stoppa accesa: chi recitava, chi cantava, chi faceva i salti mortali, chi si divertiva a camminare colle mani in terra e colle gambe in aria; chi mandava il cerchio, chi passeggiava vestito da generale coll’elmo di foglio e lo squadrone di cartapesta; chi rideva, chi urlava, chi chiamava, chi batteva le mani, chi fischiava, chi rifaceva il verso alla gallina quando ha fatto l’ovo; insomma un tal pandemonio, un tal passeraio, un tal baccano indiavolato, da doversi mettere il cotone negli orecchi per non rimanere assorditi. Su tutte le piazze si vedevano teatrini di tela, affollati di ragazzi dalla mattina alla sera, e su tutti i muri delle case si leggevano scritte col carbone delle bellissime cose come queste: Viva i balocci (invece di balocchi): non voglamo più schole (invece di non vogliamo più scuole): abbasso Larin Metica (invece di l’aritmetica) e altri fiori consimili. -Pinocchio, Lucignolo e tutti gli altri ragazzi, che avevano fatto il viaggio coll’omino, appena ebbero messo il piede dentro la città, si ficcarono subito in mezzo alla gran baraonda, e in pochi minuti, come è facile immaginarselo, diventarono gli amici di tutti. Chi più felice, chi più contento di loro? -In mezzo ai continui spassi e agli svariati divertimenti, le ore, i giorni, le settimane, passavano come tanti baleni. -– Oh! che bella vita! – diceva Pinocchio tutte le volte che per caso s’imbatteva in Lucignolo. -– Vedi, dunque, se avevo ragione?... – ripigliava quest’ultimo. – E dire che tu non volevi partire! E pensare che t’eri messo in capo di tornartene a casa dalla tua Fata, per perdere il tempo a studiare!.... Se oggi ti sei liberato dalla noia dei libri e delle scuole, lo devi a me, ai miei consigli, alle mie premure, ne convieni? Non vi sono che i veri amici che sappiano rendere di questi grandi favori. -– È vero, Lucignolo! Se oggi io sono un ragazzo veramente contento, è tutto merito tuo. E il maestro, invece, sai che cosa mi diceva, parlando di te? Mi diceva sempre: «Non praticare quella birba di Lucignolo perché Lucignolo è un cattivo compagno e non può consigliarti altro che a far del male!...». -– Povero maestro! – replicò l’altro tentennando il capo. – Lo so purtroppo che mi aveva a noia e che si divertiva sempre a calunniarmi, ma io sono generoso e gli perdono! -– Anima grande! – disse Pinocchio, abbracciando affettuosamente l’amico e dandogli un bacio in mezzo agli occhi. -Intanto era già da cinque mesi che durava questa bella cuccagna di baloccarsi e di divertirsi le giornate intere, senza mai vedere in faccia né un libro, né una scuola, quando una mattina Pinocchio, svegliandosi, ebbe, come si suol dire, una gran brutta sorpresa che lo messe proprio di malumore. - -XXXII A Pinocchio gli vengono gli orecchi di ciuco, e poi diventa un ciuchino vero e comincia a ragliare. - -E questa sorpresa quale fu? -Ve lo dirò io, miei cari e piccoli lettori: la sorpresa fu che Pinocchio, svegliandosi, gli venne fatto naturalmente di grattarsi il capo; e nel grattarsi il capo si accorse... -Indovinate un po’ di che cosa si accorse? -Si accorse con sua grandissima maraviglia che gli orecchi gli erano cresciuti più d’un palmo. -Voi sapete che il burattino, fin dalla nascita, aveva gli orecchi piccini piccini: tanto piccini che, a occhio nudo, non si vedevano neppure! Immaginatevi dunque come restò, quando si poté scorgere che i suoi orecchi, durante la notte, erano così allungati, che parevano due spazzole di padule. -Andò subito in cerca di uno specchio, per potersi vedere: ma non trovando uno specchio, empì d’acqua la catinella del lavamano, e specchiandovisi dentro, vide quel che non avrebbe mai voluto vedere: vide, cioè, la sua immagine abbellita di un magnifico paio di orecchi asinini. -Lascio pensare a voi il dolore, la vergogna e la disperazione del povero Pinocchio! -Cominciò a piangere, a strillare, a battere la testa nel muro: ma quanto più si disperava, e più i suoi orecchi crescevano, crescevano e diventavano pelosi verso la cima. Al rumore di quelle grida acutissime, entrò nella stanza una bella Marmottina, che abitava il piano di sopra: la quale, vedendo il burattino in così grandi smanie, gli domandò premurosamente: -– Che cos’hai, mio caro casigliano? -– Sono malato, Marmottina mia, molto malato... e malato d’una malattia che mi fa paura! Te ne intendi tu del polso? -– Un pochino. -– Senti dunque se per caso avessi la febbre. -La Marmottina alzò la zampa destra davanti: e dopo aver tastato il polso di Pinocchio gli disse sospirando: -– Amico mio, mi dispiace doverti dare una cattiva notizia!... -– Cioè? -– Tu hai una gran brutta febbre!... -– E che febbre sarebbe? -– È la febbre del somaro. -– Non la capisco questa febbre! – rispose il burattino, che l’aveva pur troppo capita. -– Allora te la spiegherò io, – soggiunse la Marmottina. – Sappi dunque che fra due o tre ore tu non sarai più burattino, né un ragazzo... -– E che cosa sarò? -– Fra due o tre ore, tu diventerai un ciuchino vero e proprio, come quelli che tirano il carretto e che portano i cavoli e l’insalata al mercato. -– Oh! Povero me! Povero me! – gridò Pinocchio pigliandosi con le mani tutt’e due gli orecchi, e tirandoli e strapazzandoli rabbiosamente, come se fossero gli orecchi di un altro. -– Caro mio, – replicò la Marmottina per consolarlo, – che cosa ci vuoi tu fare? Oramai è destino. Oramai è scritto nei decreti della sapienza, che tutti quei ragazzi svogliati che, pigliando a noia i libri, le scuole e i maestri, passano le loro giornate in balocchi, in giochi e in divertimenti, debbano finire prima o poi col trasformarsi in tanti piccoli somari. -– Ma davvero è proprio così? – domandò singhiozzando il burattino. -– Purtroppo è così! E ora i pianti sono inutili. Bisognava pensarci prima! -– Ma la colpa non è mia: la colpa, credilo, Marmottina, è tutta di Lucignolo!... -– E chi è questo Lucignolo!... -– Un mio compagno di scuola. Io volevo tornare a casa: io volevo essere ubbidiente: io volevo seguitare a studiare e a farmi onore... ma Lucignolo mi disse: «Perché vuoi annoiarti a studiare? Perché vuoi andare alla scuola? Vieni piuttosto con me, nel Paese dei Balocchi: lì non studieremo più: lì ci divertiremo dalla mattina alla sera e staremo sempre allegri». -– E perché seguisti il consiglio di quel falso amico? di quel cattivo compagno? -– Perché?... Perché, Marmottina mia, io sono un burattino senza giudizio... e senza cuore. Oh! se avessi avuto un zinzino di cuore, non avrei mai abbandonato quella buona Fata, che mi voleva bene come una mamma e che aveva fatto tanto per me!... E a quest’ora non sarei più un burattino... ma sarei invece un ragazzino a modo, come ce n’è tanti! Oh!... ma se incontro Lucignolo, guai a lui! Gliene voglio dire un sacco e una sporta! -E fece l’atto di volere uscire. Ma quando fu sulla porta, si ricordò che aveva gli orecchi d’asino, e vergognandosi di mostrarli al pubblico, che cosa inventò?... Prese un gran berretto di cotone, e, ficcatoselo in testa, se lo ingozzò fin sotto la punta del naso. -Poi uscì: e si dette a cercar Lucignolo dappertutto. Lo cercò nelle strade, nelle piazze, nei teatrini, in ogni luogo: ma non lo trovò. Ne chiese notizia a quanti incontrò per la via, ma nessuno l’aveva veduto. -Allora andò a cercarlo a casa: e arrivato alla porta bussò. -– Chi è? – domandò Lucignolo di dentro. -– Sono io! – rispose il burattino. -– Aspetta un poco, e ti aprirò. -Dopo mezz’ora la porta si aprì: e figuratevi come restò Pinocchio quando, entrando nella stanza, vide il suo amico Lucignolo con un gran berretto di cotone in testa, che gli scendeva fin sotto il naso. -Alla vista di quel berretto, Pinocchio sentì quasi consolarsi e pensò subito dentro di sé: -«Che l’amico sia malato della mia medesima malattia? Che abbia anche lui la febbre del ciuchino?...» -E facendo finta di non essersi accorto di nulla, gli domandò sorridendo: -– Come stai, mio caro Lucignolo? -– Benissimo: come un topo in una forma di cacio parmigiano. -– Lo dici proprio sul serio? -– E perché dovrei dirti una bugia? -– Scusami, amico: e allora perché tieni in capo codesto berretto di cotone che ti cuopre tutti gli orecchi? -– Me l’ha ordinato il medico, perché mi sono fatto male a questo ginocchio. E tu, caro burattino, perché porti codesto berretto di cotone ingozzato fin sotto il naso? -– Me l’ha ordinato il medico, perché mi sono sbucciato un piede. -– Oh! povero Pinocchio!... -– Oh! povero Lucignolo!... -A queste parole tenne dietro un lunghissimo silenzio, durante il quale i due amici non fecero altro che guardarsi fra loro in atto di canzonatura. -Finalmente il burattino, con una vocina melliflua e flautata, disse al suo compagno: -– Levami una curiosità, mio caro Lucignolo: hai mai sofferto di malattia agli orecchi? -– Mai!... E tu? -– Mai! Per altro da questa mattina in poi ho un orecchio, che mi fa spasimare. -– Ho lo stesso male anch’io. -– Anche tu?... E qual è l’orecchio che ti duole? -– Tutt’e due. E tu? -– Tutt’e due. Che sia la medesima malattia? -– Ho paura di sì? -– Vuoi farmi un piacere, Lucignolo? -– Volentieri! Con tutto il cuore. -– Mi fai vedere i tuoi orecchi? -– Perché no? Ma prima voglio vedere i tuoi, caro Pinocchio. -– No: il primo devi essere tu. -– No, carino! Prima tu, e dopo io! -– Ebbene, – disse allora il burattino, – facciamo un patto da buoni amici. -– Sentiamo il patto. -– Leviamoci tutt’e due il berretto nello stesso tempo: accetti? -– Accetto. -– Dunque attenti! -E Pinocchio cominciò a contare a voce alta: -– Uno! Due! Tre! -Alla parola tre! i due ragazzi presero i loro berretti di capo e li gettarono in aria. -E allora avvenne una scena, che parrebbe incredibile, se non fosse vera. Avvenne, cioè, che Pinocchio e Lucignolo, quando si videro colpiti tutt’e due dalla medesima disgrazia, invece di restar mortificati e dolenti, cominciarono ad ammiccarsi i loro orecchi smisuratamente cresciuti, e dopo mille sguaiataggini finirono col dare in una bella risata. -E risero, risero, risero da doversi reggere il corpo: se non che, sul più bello del ridere, Lucignolo tutt’a un tratto si chetò, e barcollando e cambiando colore, disse all’amico: -– Aiuto, aiuto, Pinocchio! -– Che cos’hai? -– Ohimè. Non mi riesce più di star ritto sulle gambe. -– Non mi riesce più neanche a me, – gridò Pinocchio, piangendo e traballando. -E mentre dicevano così, si piegarono tutt’e due carponi a terra e, camminando con le mani e coi piedi, cominciarono a girare e a correre per la stanza. E intanto che correvano, i loro bracci diventarono zampe, i loro visi si allungarono e diventarono musi e le loro schiene si coprirono di un pelame grigiolino chiaro, brizzolato di nero. -Ma il momento più brutto per que’ due sciagurati sapete quando fu? Il momento più brutto e più umiliante fu quello quando sentirono spuntarsi di dietro la coda. Vinti allora dalla vergogna e dal dolore, si provarono a piangere e a lamentarsi del loro destino. -Non l’avessero mai fatto! Invece di gemiti e di lamenti, mandavano fuori dei ragli asinini: e ragliando sonoramente, facevano tutt’e due coro: j-a, j-a, j-a. -In quel frattempo fu bussato alla porta, e una voce di fuori disse: -– Aprite! Sono l’Omino, sono il conduttore del carro che vi portò in questo paese. Aprite subito, o guai a voi! - -XXXIII Diventato un ciuchino vero, è portato a vendere, e lo compra il direttore di una compagnia di pagliacci per insegnargli a ballare e a saltare i cerchi; ma una sera azzoppisce e allora lo ricompra un altro, per far con la sua pelle un tamburo. - -Vedendo che la porta non si apriva, l’Omino la spalancò con un violentissimo calcio: ed entrato che fu nella stanza, disse col suo solito risolino a Pinocchio e a Lucignolo: -– Bravi ragazzi! Avete ragliato bene, e io vi ho subito riconosciuti alla voce. E per questo eccomi qui. -A tali parole, i due ciuchini rimasero mogi mogi, colla testa giù, con gli orecchi bassi e con la coda fra le gambe. -Da principio l’Omino li lisciò, li accarezzò, li palpeggiò: poi, tirata fuori la striglia, cominciò a strigliarli perbene. -E quando a furia di strigliarli, li ebbe fatti lustri come due specchi, allora messe loro la cavezza e li condusse sulla piazza del mercato, con la speranza di venderli e di beccarsi un discreto guadagno. -E i compratori, difatti, non si fecero aspettare. -Lucignolo fu comprato da un contadino, a cui era morto il somaro il giorno avanti, e Pinocchio fu venduto al direttore di una compagnia di pagliacci e di saltatori di corda, il quale lo comprò per ammaestrarlo e per farlo poi saltare e ballare insieme con le altre bestie della compagnia. -E ora avete capito, miei piccoli lettori, qual era il bel mestiere che faceva l’Omino? Questo brutto mostriciattolo, che aveva una fisionomia tutta latte e miele, andava di tanto in tanto con un carro a girare per il mondo: strada facendo raccoglieva con promesse e con moine tutti i ragazzi svogliati, che avevano a noia i libri e le scuole: e dopo averli caricati sul suo carro, li conduceva nel Paese dei Balocchi, perché passassero tutto il loro tempo in giochi, in chiassate e in divertimenti. Quando poi quei poveri ragazzi illusi, a furia di baloccarsi sempre e di non studiare mai, diventavano tanti ciuchini, allora tutto allegro e contento s’impadroniva di loro e li portava a vendere sulle fiere e sui mercati. E così in pochi anni aveva fatto fior di quattrini ed era diventato milionario. -Quel che accadesse di Lucignolo, non lo so: so, per altro, che Pinocchio andò incontro fin dai primi giorni a una vita durissima e strapazzata. -Quando fu condotto nella stalla, il nuovo padrone gli empì la greppia di paglia: ma Pinocchio, dopo averne assaggiata una boccata, la risputò. -Allora il padrone, brontolando, gli empì la greppia di fieno: ma neppure il fieno gli piacque. -– Ah! non ti piace neppure il fieno? – gridò il padrone imbizzito. – Lascia fare, ciuchino bello, che se hai dei capricci per il capo, penserò io a levarteli!... -E a titolo di correzione, gli affibbiò subito una frustata nelle gambe. -Pinocchio dal gran dolore, cominciò a piangere e a ragliare, e ragliando, disse: -– J-a, j-a, la paglia non la posso digerire!... -– Allora mangia il fieno! – replicò il padrone che intendeva benissimo il dialetto asinino. -– J-a, j-a, il fieno mi fa dolere il corpo!... -– Pretenderesti, dunque, che un somaro, par tuo, lo dovessi mantenere a petti di pollo e cappone in galantina? – soggiunse il padrone arrabbiandosi sempre più e affibbiandogli una seconda frustata. -A quella seconda frustata Pinocchio, per prudenza, si chetò subito e non disse altro. -Intanto la stalla fu chiusa e Pinocchio rimase solo: e perché erano molte ore che non aveva mangiato cominciò a sbadigliare dal grande appetito. E, sbadigliando, spalancava una bocca che pareva un forno. -Alla fine, non trovando altro nella greppia, si rassegnò a masticare un po’ di fieno: e dopo averlo masticato ben bene, chiuse gli occhi e lo tirò giù. -– Questo fieno non è cattivo, – poi disse dentro di sé, – ma quanto sarebbe stato meglio che avessi continuato a studiare!... A quest’ora, invece di fieno, potrei mangiare un cantuccio di pan fresco e una bella fetta di salame!... Pazienza! -La mattina dopo, svegliandosi, cercò subito nella greppia un altro po’ di fieno; ma non lo trovò perché l’aveva mangiato tutto nella notte. -Allora prese una boccata di paglia tritata: ma in quel mentre che la masticava si dové accorgere che il sapore della paglia tritata non somigliava punto né al risotto alla milanese né ai maccheroni alla napoletana. -– Pazienza! – ripeté, continuando a masticare. – Che almeno la mia disgrazia possa servire di lezione a tutti i ragazzi disobbedienti e che non hanno voglia di studiare. Pazienza!... pazienza! -– Pazienza un corno! – urlò il padrone, entrando in quel momento nella stalla. – Credi forse, mio bel ciuchino, ch’io ti abbia comprato unicamente per darti da bere e da mangiare? Io ti ho comprato perché tu lavori e perché tu mi faccia guadagnare molti quattrini. Su, dunque, da bravo! Vieni con me nel Circo, e là ti insegnerà a saltare i cerchi, a rompere col capo le botti di foglio e a ballare il valzer e la polca, stando ritto sulle gambe di dietro. -Il povero Pinocchio, per amore o per forza, dové imparare tutte queste bellissime cose; ma, per impararle, gli ci vollero tre mesi di lezioni, e molte frustate da levare il pelo. -Venne finalmente il giorno, in cui il suo padrone poté annunziare uno spettacolo veramente straordinario. I cartelloni di vario colore, attaccati alle cantonate delle strade, dicevano così: -GRANDE -SPETTACOLO DI GALA - -PER QUESTA SERA - -AVRANNO LUOGO I SOLITI SALTI ED ESERCIZI SORPRENDENTI ESEGUITI DA TUTTI GLI ARTISTI E DA TUTTI I CAVALLI D’AMBO I SESSI DELLA COMPAGNIA - -E PIÙ SARÀ PRESENTATO PER LA PRIMA VOLTA IL FAMOSO - -CIUCHINO -PINOCCHIO -DETTO -LA STELLA DELLA DANZA - -IL TEATRO SARÀ ILLUMINATO A GIORNO -Quella sera, come potete figurarvelo, un’ora prima che cominciasse lo spettacolo, il teatro era pieno stipato. -Non si trovava più né un posto distinto, né un palco, nemmeno a pagarlo a peso d’oro. -Le gradinate del Circo formicolavano di bambini, di bambine e di ragazzi di tutte le età, che avevano la febbre addosso per la smania di veder ballare il famoso ciuchino Pinocchio. -Finita la prima parte dello spettacolo, il direttore della compagnia, vestito in giubba nera, calzoni bianchi a coscia e stivaloni di pelle fin sopra ai ginocchi, si presentò all’affollatissimo pubblico, e, fatto un grande inchino, recitò con molta solennità il seguente spropositato discorso: -«Rispettabile pubblico, cavalieri e dame!» -«L’umile sottoscritto essendo di passaggio per questa illustre metropolitana, ho voluto procrearmi l’onore nonché il piacere di presentare a questo intelligente e cospicuo uditorio un celebre ciuchino, che ebbe già l’onore di ballare al cospetto di Sua Maestà l’Imperatore di tutte le Corti principali d’Europa.» -«E col ringraziandoli, aiutateci della vostra animatrice presenza e compatiteci!” -Questo discorso fu accolto da molte risate e da molti applausi: ma gli applausi raddoppiarono e diventarono una specie di uragano alla comparsa del ciuchino Pinocchio in mezzo al Circo. Egli era tutto agghindato a festa. Aveva una briglia nuova di pelle lustra, con fibbie e borchie d’ottone; due camelie bianche agli orecchi; la criniera divisa in tanti riccioli legati con fiocchettini d’argento attraverso alla vita, e la coda tutta intrecciata con nastri di velluto amaranto e celeste. Era, insomma, un ciuchino da innamorare! -Il direttore, nel presentarlo al pubblico, aggiunse queste parole: -«Miei rispettabili auditori! Non starò qui a farvi menzogne delle grandi difficoltà da me soppressate per comprendere e soggiogare questo mammifero, mentre pascolava liberamente di montagna in montagna nelle pianure della zona torrida. Osservate, vi prego, quanta selvaggina trasudi dà suoi occhi, conciossiaché essendo riusciti vanitosi tutti i mezzi per addomesticarlo al vivere dei quadrupedi civili, ho dovuto più volte ricorrere all’affabile dialetto della frusta. Ma ogni mia gentilezza invece di farmi da lui benvolere, me ne ha maggiormente cattivato l’animo. Io però, seguendo il sistema di Galles, trovai nel suo cranio una piccola cartagine ossea che la stessa Facoltà Medicea di Parigi riconobbe essere quello il bulbo rigeneratore dei capelli e della danza pirrica. E per questo io lo volli ammaestrare nel ballo nonché nei relativi salti dei cerchi e delle botti foderate di foglio. Ammiratelo, e poi giudicatelo! Prima però di prendere cognato da voi, permettete, o signori, che io v’inviti al diurno spettacolo di domani sera: ma nell’apoteosi che il tempo piovoso minacciasse acqua, allora lo spettacolo invece di domani sera, sarà posticipato a domattina, alle ore undici antimeridiane del pomeriggio». -E qui il direttore fece un’altra profondissima riverenza: quindi rivolgendosi a Pinocchio, gli disse: -– Animo, Pinocchio!... Avanti di dar principio ai vostri esercizi, salutate questo rispettabile pubblico, cavalieri, dame e ragazzi! -Pinocchio, ubbidiente, piegò subito i due ginocchi davanti, fino a terra, e rimase inginocchiato fino a tanto che il direttore, schioccando la frusta, non gli gridò: -– Al passo! -Allora il ciuchino si rizzò sulle quattro gambe, e cominciò a girare intorno al Circo, camminando sempre di passo. -Dopo un poco il direttore grido: -– Al trotto! – e Pinocchio, ubbidiente al comando, cambiò il passo in trotto. -– Al galoppo!... – e Pinocchio staccò il galoppo. -– Alla carriera! – e Pinocchio si dette a correre di gran carriera. -Ma in quella che correva come un barbero, il direttore, alzando il braccio in aria, scaricò un colpo di pistola. -A quel colpo il ciuchino, fingendosi ferito, cadde disteso nel Circo, come se fosse moribondo davvero. -Rizzatosi da terra, in mezzo a uno scoppio di applausi, d’urli e di battimani, che andavano alle stelle, gli venne naturalmente di alzare la testa e di guardare in su... e guardando, vide in un palco una bella signora, che aveva al collo una grossa collana d’oro, dalla quale pendeva un medaglione. -Nel medaglione c’era dipinto il ritratto d’un burattino. -– Quel ritratto è il mio!... quella signora è la Fata! – disse dentro di sé Pinocchio, riconoscendola subito: e lasciandosi vincere dalla gran contentezza, si provò a gridare: -– Oh Fatina mia! oh Fatina mia! -Ma invece di queste parole, gli uscì dalla gola un raglio così sonoro e prolungato, che fece ridere tutti gli spettatori, e segnatamente tutti i ragazzi che erano in teatro. -Allora il direttore, per insegnargli e per fargli intendere che non è buona creanza mettersi a ragliare in faccia al pubblico, gli diè col manico della frusta una bacchettata sul naso. -Il povero ciuchino, tirato fuori un palmo di lingua, durò a leccarsi il naso almeno cinque minuti, credendo forse così di rasciugarsi il dolore che aveva sentito. -Ma quale fu la sua disperazione quando, voltandosi in su una seconda volta, vide che il palco era vuoto e che la Fata era sparita!... -Si sentì come morire: gli occhi gli si empirono di lacrime e cominciò a piangere dirottamente. Nessuno però se ne accorse e, meno degli altri, il direttore, il quale, anzi, schioccando la frusta, gridò: -– Da bravo, Pinocchio! Ora farete vedere a questi signori con quanta grazia sapete saltare i cerchi. -Pinocchio si provò due o tre volte: ma ogni volta che arrivava davanti al cerchio, invece di attraversarlo, ci passava più comodamente di sotto. Alla fine spiccò un salto e l’attraversò: ma le gambe di dietro gli rimasero disgraziatamente impigliate nel cerchio: motivo per cui ricadde in terra dall’altra parte tutto in un fascio. -Quando si rizzò, era azzoppito, e a malapena poté ritornare alla scuderia. -– Fuori Pinocchio! Vogliamo il ciuchino! Fuori il ciuchino! – gridavano i ragazzi dalla platea, impietositi e commossi al tristissimo caso. -Ma il ciuchino per quella sera non si fece rivedere. -La mattina dopo il veterinario, ossia il medico delle bestie, quando l’ebbe visitato, dichiarò che sarebbe rimasto zoppo per tutta la vita. -Allora il direttore disse al suo garzone di stalla: -– Che vuoi tu che mi faccia d’un somaro zoppo? Sarebbe un mangiapane a ufo. Portalo dunque in piazza e rivendilo. -Arrivati in piazza, trovarono subito il compratore, il quale domandò al garzone di stalla: -– Quanto vuoi di cotesto ciuchino zoppo? -– Venti lire. -– Io ti do venti soldi. Non credere che io lo compri per servirmene: lo compro unicamente per la sua pelle. Vedo che ha la pelle molto dura, e con la sua pelle voglio fare un tamburo per la banda musicale del mio paese. -Lascio pensare a voi, ragazzi, il bel piacere che fu per il povero Pinocchio, quando sentì che era destinato a diventare un tamburo! -Fatto sta che il compratore, appena pagati i venti soldi, condusse il ciuchino sopra uno scoglio ch’era sulla riva del mare; e messogli un sasso al collo e legatolo per una zampa con una fune che teneva in mano, gli diè improvvisamente uno spintone e lo gettò nell’acqua. -Pinocchio, con quel macigno al collo, andò subito a fondo; e il compratore, tenendo sempre stretta in mano la fune, si pose a sedere sullo scoglio, aspettando che il ciuchino avesse tutto il tempo di morire affogato, per poi levargli la pelle. - -XXXIV Pinocchio, gettato in mare, è mangiato dai pesci e ritorna ad essere un burattino come prima; ma mentre nuota per salvarsi, è ingoiato dal terribile Pesce-cane. - -Dopo cinquanta minuti che il ciuchino era sott’acqua, il compratore disse, discorrendo da sé solo: -– A quest’ora il mio povero ciuchino zoppo deve essere bell’affogato. Ritiriamolo dunque su, e facciamo con la sua pelle questo bel tamburo. -E cominciò a tirare la fune, con la quale lo aveva legato per una gamba: e tira, tira, tira, alla fine vide apparire a fior d’acqua... indovinate? Invece di un ciuchino morto, vide apparire a fior d’acqua un burattino vivo che scodinzolava come un’anguilla. -Vedendo quel burattino di legno, il pover’uomo credé di sognare e rimase lì intontito, a bocca aperta e con gli occhi fuori della testa. -Riavutosi un poco dal suo primo stupore, disse piangendo e balbettando: -– E il ciuchino che ho gettato in mare dov’è? -– Quel ciuchino son io! – rispose il burattino, ridendo. -– Tu? -– Io. -– Ah! mariuolo! Pretenderesti forse burlarti di me? -– Burlarmi di voi? Tutt’altro, caro padrone: io vi parlo sul serio. -– Ma come mai tu, che poco fa eri un ciuchino, ora, stando nell’acqua sei diventato un burattino di legno?... -– Sarà effetto dell’acqua del mare. Il mare ne fa di questi scherzi. -– Bada, burattino, bada!... Non credere di divertirti alle mie spalle. Guai a te, se mi scappa la pazienza. -– Ebbene, padrone: volete sapere tutta la vera storia? Scioglietemi questa gamba e io ve la racconterò. -Quel buon pasticcione del compratore, curioso di conoscere la vera storia, gli sciolse subito il nodo della fune, che lo teneva legato: e allora Pinocchio, trovandosi libero come un uccello nell’aria prese a dirgli così: -– Sappiate dunque che io ero un burattino di legno come sono oggi: ma mi trovavo a tocco e non tocco di diventare un ragazzo, come in questo mondo ce n’è tanti: se non che per la mia poca voglia di studiare e per dar retta ai cattivi compagni, scappai di casa... e un bel giorno, svegliandomi, mi trovai cambiato in un somaro con tanto di orecchi... e con tanto di coda!... Che vergogna fu quella per me!... Una vergogna, caro padrone, che Sant’Antonio benedetto non la faccia provare neppure a voi! Portato a vendere sul mercato degli asini, fui comprato dal Direttore di una compagnia equestre, il quale si messe in capo di far di me un gran ballerino e un gran saltatore di cerchi; ma una sera durante lo spettacolo, feci in teatro una brutta cascata, e rimasi zoppo da tutt’e due le gambe. Allora il direttore non sapendo che cosa farsi d’un asino zoppo, mi mandò a rivendere, e voi mi avete comprato! -– Pur troppo! E ti ho pagato venti soldi. E ora chi mi rende i miei poveri venti soldi? -– E perché mi avete comprato? Voi mi avete comprato per fare con la mia pelle un tamburo!... un tamburo!... -– Pur troppo!... E ora dove troverò un’altra pelle? -– Non vi date alla disperazione, padrone. Dei ciuchini ce n’è tanti, in questo mondo! -– Dimmi, monello impertinente: e la tua storia finisce qui? -– No, – rispose il burattino, – ci sono altre due parole, e poi è finita. Dopo avermi comprato, mi avete condotto in questo luogo per uccidermi; ma poi, cedendo a un sentimento pietoso d’umanità, avete preferito di legarmi un sasso al collo e di gettarmi in fondo al mare. Questo sentimento di delicatezza vi onora moltissimo, e io ve ne serberò eterna riconoscenza. Per altro, caro padrone, questa volta avete fatto i vostri conti senza la Fata... -– E chi è questa Fata? -– È la mia mamma, la quale somiglia a tutte quelle buone mamme, che vogliono un gran bene ai loro ragazzi e non li perdono mai d’occhio, e li assistono amorosamente in ogni disgrazia, anche quando questi ragazzi, per le loro scapataggini e per i loro cattivi portamenti, meriterebbero di essere abbandonati e lasciati in balia a se stessi. Dicevo, dunque, che la buona Fata, appena mi vide in pericolo di affogare, mandò subito intorno a me un branco infinito di pesci, i quali credendomi davvero un ciuchino bell’e morto, cominciarono a mangiarmi! E che bocconi che facevano! Non avrei mai creduto che i pesci fossero più ghiotti anche dei ragazzi! Chi mi mangiò gli orecchi, chi mi mangiò il muso, chi il collo e la criniera, chi la pelle delle zampe, chi la pelliccia della schiena... e fra gli altri, vi fu un pesciolino così garbato, che si degnò perfino di mangiarmi la coda. -– Da oggi in poi, – disse il compratore inorridito, – faccio giuro di non assaggiar più carne di pesce. Mi dispiacerebbe troppo di aprire una triglia o un nasello fritto e di trovargli in corpo una coda di ciuco! -– Io la penso come voi, – replicò il burattino, ridendo. – Del resto, dovete sapere che quando i pesci ebbero finito di mangiarmi tutta quella buccia asinina, che mi copriva dalla testa ai piedi, arrivarono, – com’è naturale, all’osso... o per dir meglio, arrivarono al legno, perché, come vedete, io son fatto di legno durissimo. Ma dopo dati i primi morsi, quei pesci ghiottoni si accorsero subito che il legno non era ciccia per i loro denti, e nauseati da questo cibo indigesto se ne andarono chi in qua chi in là, senza voltarsi nemmeno a dirmi grazie... Ed eccovi raccontato come qualmente voi, tirando su la fune, avete trovato un burattino vivo, invece d’un ciuchino morto. -– Io mi rido della tua storia, – gridò il compratore imbestialito. – Io so che ho speso venti soldi per comprarti, e rivoglio i miei quattrini. Sai che cosa farò? Ti porterò daccapo al mercato, e ti rivenderò a peso di legno stagionato per accendere il fuoco nel caminetto. -– Rivendetemi pure: io sono contento, – disse Pinocchio. -Ma nel dir così, fece un bel salto e schizzò in mezzo all’acqua. E nuotando allegramente e allontanandosi dalla spiaggia, gridava al povero compratore: -– Addio, padrone; se avete bisogno di una pelle per fare un tamburo, ricordatevi di me. -E poi rideva e seguitava a nuotare: e dopo un poco, rivoltandosi indietro, urlava più forte: -– Addio, padrone: se avete bisogno di un po’ di legno stagionato, per accendere il caminetto, ricordatevi di me. -Fatto sta che in un batter d’occhio si era tanto allontanato, che non si vedeva quasi più: ossia, si vedeva solamente sulla superficie del mare un puntolino nero, che di tanto in tanto rizzava le gambe fuori dell’acqua e faceva capriole e salti, come un delfino in vena di buonumore. -Intanto che Pinocchio nuotava alla ventura, vide in mezzo al mare uno scoglio che pareva di marmo bianco: e su in cima allo scoglio, una bella Caprettina che belava amorosamente e gli faceva segno di avvicinarsi. -La cosa più singolare era questa: che la lana della Caprettina, invece di esser bianca, o nera, o pallata di due colori, come quella delle altre capre, era invece turchina, ma d’un color turchino sfolgorante, che rammentava moltissimo i capelli della bella Bambina. -Lascio pensare a voi se il cuore del povero Pinocchio cominciò a battere più forte! Raddoppiando di forza e di energia si diè a nuotare verso lo scoglio bianco: ed era già a mezza strada, quando ecco uscir fuori dall’acqua e venirgli incontro una orribile testa di mostro marino, con la bocca spalancata, come una voragine, e tre filari di zanne che avrebbero fatto paura anche a vederle dipinte. -E sapete chi era quel mostro marino? -Quel mostro marino era né più né meno quel gigantesco Pesce-cane, ricordato più volte in questa storia, e che per le sue stragi e per la sua insaziabile voracità, veniva soprannominato «l’Attila dei pesci e dei pescatori». -Immaginatevi lo spavento del povero Pinocchio alla vista del mostro. Cercò di scansarlo, di cambiare strada: cercò di fuggire: ma quella immensa bocca spalancata gli veniva sempre incontro con la velocità di una saetta. -– Affréttati, Pinocchio, per carità! – gridava belando la bella Caprettina. -E Pinocchio nuotava disperatamente con le braccia, col petto, con le gambe e coi piedi. -– Corri, Pinocchio, perché il mostro si avvicina! -E Pinocchio, raccogliendo tutte le sue forze, raddoppiava di lena nella corsa. -– Bada, Pinocchio!... il mostro ti raggiunge!... Eccolo!... Eccolo!... Affréttati per carità, o sei perduto!... -E Pinocchio a nuotar più lesto che mai, e via, e via, e via, come andrebbe una palla di fucile. E già era presso lo scoglio, e già la Caprettina, spenzolandosi tutta sul mare, gli porgeva le sue zampine davanti per aiutarlo a uscire dall’acqua! -Ma oramai era tardi! Il mostro lo aveva raggiunto: il mostro, tirando il fiato a sé, si bevve il povero burattino, come avrebbe bevuto un uovo di gallina: e lo inghiottì con tanta violenza e con tanta avidità, che Pinocchio, cascando giù in corpo al Pesce-cane, batté un colpo così screanzato, da restarne sbalordito per un quarto d’ora. -Quando ritornò in sé da quello sbigottimento, non sapeva raccapezzarsi, nemmeno lui, in che mondo si fosse. Intorno a sé c’era da ogni parte un gran buio: ma un buio così nero e profondo, che gli pareva di essere entrato col capo in un calamaio pieno d’inchiostro. Stette in ascolto e non senti nessun rumore: solamente di tanto in tanto sentiva battersi nel viso alcune grandi buffate di vento. Da principio non sapeva intendere da dove quel vento uscisse: ma poi capì che usciva dai polmoni del mostro. Perché bisogna sapere che il Pesce-cane soffriva moltissimo d’asma, e quando respirava, pareva proprio che tirasse la tramontana. -Pinocchio, sulle prime, s’ingegnò di farsi un poco di coraggio: ma quand’ebbe la prova e la riprova di trovarsi chiuso in corpo al mostro marino allora cominciò a piangere e a strillare: e piangendo diceva: -– Aiuto! aiuto! Oh povero me! Non c’è nessuno che venga a salvarmi? -– Chi vuoi che ti salvi, disgraziato?... – disse in quel buio una vociaccia fessa di chitarra scordata. -– Chi è che parla così? – domandò Pinocchio, sentendosi gelare dallo spavento. -– Sono io! sono un povero Tonno, inghiottito dal Pesce-cane insieme con te. E tu che pesce sei? -– Io non ho che vedere nulla coi pesci. Io sono un burattino. -– E allora, se non sei un pesce, perché ti sei fatto inghiottire dal mostro? -– Non son io, che mi son fatto inghiottire: gli è lui che mi ha inghiottito! Ed ora che cosa dobbiamo fare qui al buio?... -– Rassegnarsi e aspettare che il Pesce-cane ci abbia digeriti tutt’e due!... -– Ma io non voglio esser digerito! – urlò Pinocchio, ricominciando a piangere. -– Neppure io vorrei esser digerito, – soggiunse il Tonno, – ma io sono abbastanza filosofo e mi consolo pensando che, quando si nasce Tonni, c’è più dignità a morir sott’acqua che sott’olio!... -– Scioccherie! – gridò Pinocchio. -– La mia è un’opinione, – replicò il Tonno, – e le opinioni, come dicono i Tonni politici, vanno rispettate! -– Insomma... io voglio andarmene di qui... io voglio fuggire... -– Fuggi, se ti riesce!... -– È molto grosso questo Pesce-cane che ci ha inghiottiti? – domandò il burattino. -– Figùrati che il suo corpo è più lungo di un chilometro, senza contare la coda. -Nel tempo che facevano questa conversazione al buio, parve a Pinocchio di veder lontan lontano una specie di chiarore. -– Che cosa sarà mai quel lumicino lontano lontano? – disse Pinocchio. -– Sarà qualche nostro compagno di sventura, che aspetterà come noi il momento di esser digerito!.... -– Voglio andare a trovarlo. Non potrebbe darsi il caso che fosse qualche vecchio pesce capace di insegnarmi la strada per fuggire? -– Io te l’auguro di cuore, caro burattino. -– Addio, Tonno. -– Addio, burattino; e buona fortuna. -– Dove ci rivedremo?... -– Chi lo sa?... è meglio non pensarci neppure! - -XXXV Pinocchio ritrova in corpo al Pesce-cane... Chi ritrova? Leggete questo capitolo e lo saprete. - -Pinocchio, appena che ebbe detto addio al suo buon amico Tonno, si mosse brancolando in mezzo a quel buio, e cominciò a camminare a tastoni dentro il corpo del Pesce-cane, avviandosi un passo dietro l’altro verso quel piccolo chiarore che vedeva baluginare lontano lontano. -E nel camminare sentì che i suoi piedi sguazzavano in una pozzanghera d’acqua grassa e sdrucciolona, e quell’acqua sapeva di un odore così acuto di pesce fritto che gli pareva di essere a mezza quaresima. -E più andava avanti, e più il chiarore si faceva rilucente e distinto: finché, cammina cammina, alla fine arrivò: e quando fu arrivato... che cosa trovò? Ve lo do a indovinare in mille: trovò una piccola tavola apparecchiata, con sopra una candela accesa infilata in una bottiglia di cristallo verde, e seduto a tavola un vecchiettino tutto bianco, come se fosse di neve o di panna montata, il quale se ne stava lì biascicando alcuni pesciolini vivi, ma tanto vivi, che alle volte mentre li mangiava, gli scappavano perfino di bocca. -A quella vista il povero Pinocchio ebbe un’allegrezza così grande e così inaspettata, che ci mancò un ette non cadesse in delirio. Voleva ridere, voleva piangere, voleva dire un monte di cose; e invece mugolava confusamente e balbettava delle parole tronche e sconclusionate. Finalmente gli riuscì di cacciar fuori un grido di gioia e spalancando le braccia e gettandosi al collo del vecchietto, cominciò a urlare: -– Oh! babbino mio! finalmente vi ho ritrovato! Ora poi non vi lascio più, mai più, mai più! -– Dunque gli occhi mi dicono il vero? – replicò il vecchietto stropicciandosi gli occhi, – Dunque tu sé proprio il mi’ caro Pinocchio? -– Sì, sì, sono io, proprio io! E voi mi avete digià perdonato, non è vero? Oh! babbino mio, come siete buono!... e pensare che io, invece... Oh! ma se sapeste quante disgrazie mi son piovute sul capo e quante cose mi son andate per traverso! Figuratevi che il giorno che voi, povero babbino, col vendere la vostra casacca mi compraste l’Abbecedario per andare a scuola, io scappai a vedere i burattini, e il burattinaio mi voleva mettere sul fuoco perché gli cocessi il montone arrosto, che fu quello poi che mi dette cinque monete d’oro, perché le portassi a voi, ma io trovai la Volpe e il Gatto, che mi condussero all’osteria del Gambero Rosso dove mangiarono come lupi, e partito solo di notte incontrai gli assassini che si messero a corrermi dietro, e io via, e loro dietro, e io via e loro sempre dietro, e io via, finché m’impiccarono a un ramo della Quercia grande, dovecché la bella Bambina dai capelli turchini mi mandò a prendere con una carrozzina, e i medici, quando m’ebbero visitato, dissero subito: «Se non è morto, è segno che è sempre vivo», e allora mi scappò detto una bugia, e il naso cominciò a crescermi e non mi passava più dalla porta di camera, motivo per cui andai con la Volpe e col Gatto a sotterrare le quattro monete d’oro, che una l’avevo spesa all’osteria, e il pappagallo si messe a ridere, e viceversa di duemila monete non trovai più nulla, la quale il giudice quando seppe che ero stato derubato, mi fece subito mettere in prigione, per dare una soddisfazione ai ladri, di dove, col venir via, vidi un bel grappolo d’uva in un campo, che rimasi preso alla tagliola e il contadino di santa ragione mi messe il collare da cane perché facessi la guardia al pollaio, che riconobbe la mia innocenza e mi lasciò andare, e il Serpente, colla coda che gli fumava, cominciò a ridere e gli si strappò una vena sul petto e così ritornai alla Casa della bella Bambina, che era morta, e il Colombo vedendo che piangevo mi disse: «Ho visto il tu’ babbo che si fabbricava una barchettina per venirti a cercare», e io gli dissi: «Oh! se avessi l’ali anch’io», e lui mi disse: «Vuoi venire dal tuo babbo?», e io gli dissi: «Magari! ma chi mi ci porta», e lui mi disse: «Ti ci porto io», e io gli dissi: «Come?», e lui mi disse: «Montami sulla groppa», e così abbiamo volato tutta la notte, e poi la mattina tutti i pescatori che guardavano verso il mare mi dissero: «C’è un pover’uomo in una barchetta che sta per affogare», e io da lontano vi riconobbi subito, perché me lo diceva il core, e vi feci cenno di tornare alla spiaggia... -– Ti riconobbi anch’io, – disse Geppetto, – e sarei volentieri tornato alla spiaggia: ma come fare? Il mare era grosso e un cavallone m’arrovesciò la barchetta. Allora un orribile Pesce-cane che era lì vicino, appena m’ebbe visto nell’acqua corse subito verso di me, e tirata fuori la lingua, mi prese pari pari, e m’inghiottì come un tortellino di Bologna. -– E quant’è che siete chiuso qui dentro? – domandò Pinocchio. -– Da quel giorno in poi, saranno oramai due anni: due anni, Pinocchio mio, che mi son parsi due secoli! -– E come avete fatto a campare? E dove avete trovata la candela? E i fiammiferi per accenderla, chi ve li ha dati? -– Ora ti racconterò tutto. Devi dunque sapere che quella medesima burrasca, che rovesciò la mia barchetta, fece anche affondare un bastimento mercantile. I marinai si salvarono tutti, ma il bastimento colò a fondo e il solito Pesce-cane, che quel giorno aveva un appetito eccellente, dopo aver inghiottito me, inghiottì anche il bastimento... -– Come? Lo inghiottì tutto in un boccone?... – domandò Pinocchio maravigliato. -– Tutto in un boccone: e risputò solamente l’albero maestro, perché gli era rimasto fra i denti come una lisca. Per mia gran fortuna, quel bastimento era carico di carne conservata in cassette di stagno, di biscotto, ossia di pane abbrostolito, di bottiglie di vino, d’uva secca, di cacio, di caffè, di zucchero, di candele steariche e di scatole di fiammiferi di cera. Con tutta questa grazia di Dio ho potuto campare due anni: ma oggi sono agli ultimi sgoccioli: oggi nella dispensa non c’è più nulla, e questa candela, che vedi accesa, è l’ultima candela che mi sia rimasta... -– E dopo?... -– E dopo, caro mio, rimarremo tutt’e due al buio. -– Allora, babbino mio, – disse Pinocchio, – non c’è tempo da perdere. Bisogna pensar subito a fuggire... -– A fuggire?... e come? -– Scappando dalla bocca del Pesce-cane e gettandosi a nuoto in mare. -– Tu parli bene: ma io, caro Pinocchio, non so nuotare. -– E che importa?... Voi mi monterete a cavalluccio sulle spalle e io, che sono un buon nuotatore, vi porterò sano e salvo fino alla spiaggia. -– Illusioni, ragazzo mio! – replicò Geppetto, scotendo il capo e sorridendo malinconicamente. – Ti par egli possibile che un burattino, alto appena un metro, come sei tu, possa aver tanta forza da portarmi a nuoto sulle spalle? -– Provatevi e vedrete! A ogni modo, se sarà scritto in cielo che dobbiamo morire, avremo almeno la gran consolazione di morire abbracciati insieme. -E senza dir altro, Pinocchio prese in mano la candela, e andando avanti per far lume, disse al suo babbo: -– Venite dietro a me, e non abbiate paura. E così camminarono un bel pezzo, e traversarono tutto il corpo e tutto lo stomaco del Pesce-cane. Ma giunti che furono al punto dove cominciava la gran gola del mostro, pensarono bene di fermarsi per dare un’occhiata e cogliere il momento opportuno alla fuga. -Ora bisogna sapere che il Pesce-cane, essendo molto vecchio e soffrendo d’asma e di palpitazione di cuore, era costretto a dormir a bocca aperta: per cui Pinocchio, affacciandosi al principio della gola e guardando in su, poté vedere al di fuori di quell’enorme bocca spalancata un bel pezzo di cielo stellato e un bellissimo lume di luna. -– Questo è il vero momento di scappare, – bisbigliò allora voltandosi al suo babbo. – Il Pescecane dorme come un ghiro: il mare è tranquillo e ci si vede come di giorno. Venite dunque, babbino, dietro a me e fra poco saremo salvi. -Detto fatto, salirono su per la gola del mostro marino, e arrivati in quell’immensa bocca cominciarono a camminare in punta di piedi sulla lingua; una lingua così larga e così lunga, che pareva il viottolone d’un giardino. E già stavano lì lì per fare il gran salto e per gettarsi a nuoto nel mare, quando, sul più bello, il Pesce-cane starnutì, e nello starnutire, dette uno scossone così violento, che Pinocchio e Geppetto si trovarono rimbalzati all’indietro e scaraventati novamente in fondo allo stomaco del mostro. -Nel grand’urto della caduta la candela si spense, e padre e figliuolo rimasero al buio. -– E ora?... – domandò Pinocchio facendosi serio. -– Ora ragazzo mio, siamo bell’e perduti. -– Perché perduti? Datemi la mano, babbino, e badate di non sdrucciolare!... -– Dove mi conduci? -– Dobbiamo ritentare la fuga. Venite con me e non abbiate paura. -Ciò detto, Pinocchio prese il suo babbo per la mano: e camminando sempre in punta di piedi, risalirono insieme su per la gola del mostro: poi traversarono tutta la lingua e scavalcarono i tre filari di denti. Prima però di fare il gran salto, il burattino disse al suo babbo: -– Montatemi a cavalluccio sulle spalle e abbracciatemi forte forte. Al resto ci penso io. -Appena Geppetto si fu accomodato per bene sulle spalle del figliuolo, Pinocchio, sicurissimo del fatto suo, si gettò nell’acqua e cominciò a nuotare. Il mare era tranquillo come un olio: la luna splendeva in tutto il suo chiarore e il Pesce-cane seguitava a dormire di un sonno così profondo, che non l’avrebbe svegliato nemmeno una cannonata. - -XXXVI Finalmente Pinocchio cessa d’essere un burattino e diventa un ragazzo. - -Mentre Pinocchio nuotava alla svelta per raggiungere la spiaggia, si accorse che il suo babbo, il quale gli stava a cavalluccio sulle spalle e aveva le gambe mezze nell’acqua, tremava fitto fitto, come se al pover’uomo gli battesse la febbre terzana. -Tremava di freddo o di paura? Chi lo sa? Forse un po’ dell’uno e un po’ dell’altro. Ma Pinocchio, credendo che quel tremito fosse di paura, gli disse per confortarlo: -– Coraggio babbo! Fra pochi minuti arriveremo a terra e saremo salvi. -– Ma dov’è questa spiaggia benedetta? – domandò il vecchietto diventando sempre più inquieto, e appuntando gli occhi, come fanno i sarti quando infilano l’ago. – Eccomi qui, che guardo da tutte le parti, e non vedo altro che cielo e mare. -– Ma io vedo anche la spiaggia, – disse il burattino. – Per vostra regola io sono come i gatti: ci vedo meglio di notte che di giorno. -Il povero Pinocchio faceva finta di essere di buonumore: ma invece... Invece cominciava a scoraggiarsi: le forze gli scemavano, il suo respiro diventava grosso e affannoso... insomma non ne poteva più, la spiaggia era sempre lontana. -Nuotò finché ebbe fiato: poi si voltò col capo verso Geppetto, e disse con parole interrotte: -– Babbo mio, aiutatemi... perché io muoio! -E il padre e il figliuolo erano oramai sul punto di affogare, quando udirono una voce di chitarra scordata che disse: -– Chi è che muore? -– Sono io e il mio povero babbo!... -– Questa voce la riconosco! Tu sei Pinocchio!... -– Preciso: e tu? -– Io sono il Tonno, il tuo compagno di prigionia in corpo al Pesce-cane. -– E come hai fatto a scappare? -– Ho imitato il tuo esempio. Tu sei quello che mi hai insegnato la strada, e dopo te, sono fuggito anch’io. -– Tonno mio, tu càpiti proprio a tempo! Ti prego per l’amor che porti ai Tonnini tuoi figliuoli: aiutaci, o siamo perduti. -– Volentieri e con tutto il cuore. Attaccatevi tutt’e due alla mia coda, e lasciatevi guidare. In quattro minuti vi condurrò alla riva. -Geppetto e Pinocchio, come potete immaginarvelo accettarono subito l’invito: ma invece di attaccarsi alla coda, giudicarono più comodo di mettersi addirittura a sedere sulla groppa del Tonno. -– Siamo troppo pesi?... – gli domandò Pinocchio. -– Pesi? Neanche per ombra; mi par di avere addosso due gusci di conchiglia, – rispose il Tonno, il quale era di una corporatura così grossa e robusta, da parere un vitello di due anni. -Giunti alla riva, Pinocchio saltò a terra il primo, per aiutare il suo babbo a fare altrettanto; poi si voltò al Tonno, e con voce commossa gli disse: -– Amico mio, tu hai salvato il mio babbo! Dunque non ho parole per ringraziarti abbastanza! Permetti almeno che ti dia un bacio in segno di riconoscenza eterna!... -Il Tonno cacciò il muso fuori dall’acqua, e Pinocchio, piegandosi coi ginocchi a terra, gli posò un affettuosissimo bacio sulla bocca. A questo tratto di spontanea e vivissima tenerezza, il povero Tonno, che non c’era avvezzo, si sentì talmente commosso, che vergognandosi a farsi veder piangere come un bambino, ricacciò il capo sott’acqua e sparì. -Intanto s’era fatto giorno. -Allora Pinocchio, offrendo il suo braccio a Geppetto, che aveva appena il fiato di reggersi in piedi, gli disse: -– Appoggiatevi pure al mio braccio, caro babbino, e andiamo. Cammineremo pian pianino come le formicole, e quando saremo stanchi ci riposeremo lungo la via. -– E dove dobbiamo andare? – domandò Geppetto. -– In cerca di una casa o d’una capanna, dove ci diano per carità un boccon di pane e un po’ di paglia che ci serva da letto. -Non avevano ancora fatti cento passi, che videro seduti sul ciglione della strada due brutti ceffi, i quali stavano lì in atto di chiedere l’elemosina. -Erano il Gatto e la Volpe: ma non si riconoscevano più da quelli d’una volta. Figuratevi che il Gatto, a furia di fingersi cieco, aveva finito coll’accecare davvero: e la Volpe invecchiata, intignata e tutta perduta da una parte, non aveva più nemmeno la coda. Così è. Quella trista ladracchiola, caduta nella più squallida miseria, si trovò costretta un bel giorno a vendere perfino la sua bellissima coda a un merciaio ambulante, che la comprò per farsene uno scacciamosche. -– O Pinocchio, – gridò la Volpe con voce di piagnisteo, – fai un po’ di carità a questi due poveri infermi. -– Infermi! – ripeté il Gatto. -– Addio, mascherine! – rispose il burattino. – Mi avete ingannato una volta, e ora non mi ripigliate più. -– Credilo, Pinocchio, che oggi siamo poveri e disgraziati davvero! -– Davvero! – ripeté il Gatto. -– Se siete poveri, ve lo meritate. Ricordatevi del proverbio che dice: «I quattrini rubati non fanno mai frutto». Addio, mascherine! -– Abbi compassione di noi!... -– Di noi!... -– Addio, mascherine! Ricordatevi del proverbio che dice: «La farina del diavolo va tutta in crusca». -– Non ci abbandonare!... -– ...are! - ripeté il Gatto. -– Addio, mascherine! Ricordatevi del proverbio che dice: «Chi ruba il mantello al suo prossimo, per il solito muore senza camicia». -E così dicendo, Pinocchio e Geppetto seguitarono tranquillamente per la loro strada: finché, fatti altri cento passi, videro in fondo a una viottola in mezzo ai campi una bella capanna tutta di paglia, e col tetto coperto d’embrici e di mattoni. -– Quella capanna dev’essere abitata da qualcuno, – disse Pinocchio. – Andiamo là e bussiamo. -Difatti andarono, e bussarono alla porta. -– Chi è? – disse una vocina di dentro. -– Siamo un povero babbo e un povero figliuolo, senza pane e senza tetto, – rispose il burattino. -– Girate la chiave, e la porta si aprirà, – disse la solita vocina. -Pinocchio girò la chiave, e la porta si apri. Appena entrati dentro, guardarono di qua, guardarono di là, e non videro nessuno. -– O il padrone della capanna dov’è? – disse Pinocchio maravigliato. -– Eccomi quassù! -Babbo e figliuolo si voltarono subito verso il soffitto, e videro sopra un travicello il Grillo-parlante: -– Oh! mio caro Grillino, – disse Pinocchio salutandolo garbatamente. -– Ora mi chiami il «tuo caro Grillino», non è vero? Ma ti rammenti di quando, per scacciarmi di casa tua, mi tirasti un martello di legno?... -– Hai ragione, Grillino! Scaccia anche me... tira anche a me un martello di legno: ma abbi pietà del mio povero babbo... -– Io avrò pietà del babbo e anche del figliuolo: ma ho voluto rammentarti il brutto garbo ricevuto, per insegnarti che in questo mondo, quando si può, bisogna mostrarsi cortesi con tutti, se vogliamo esser ricambiati con pari cortesia nei giorni del bisogno. -– Hai ragione, Grillino, hai ragione da vendere e io terrò a mente la lezione che mi hai data. Ma mi dici come hai fatto a comprarti questa bella capanna? -– Questa capanna mi è stata regalata ieri da una graziosa capra, che aveva la lana d’un bellissimo colore turchino. -– E la capra dov’è andata? – domandò Pinocchio con vivissima curiosità. -– Non lo so. -– E quando ritornerà?... -– Non ritornerà mai. Ieri è partita tutta afflitta, e, belando, pareva che dicesse: “Povero Pinocchio... oramai non lo rivedrò più... il Pesce-cane a quest’ora l’avrà bell’e divorato!...”. -– Ha detto proprio così?... Dunque era lei!... Era lei!... era la mia cara Fatina!... – cominciò a urlare Pinocchio, singhiozzando e piangendo dirottamente. -Quand’ebbe pianto ben bene, si rasciugò gli occhi e, preparato un buon lettino di paglia, vi distese sopra il vecchio Geppetto. Poi domandò al Grillo-parlante: -– Dimmi, Grillino: dove potrei trovare un bicchiere di latte per il mio povero babbo? -– Tre campi distante di qui c’è l’ortolano Giangio, che tiene le mucche. Và da lui e troverai il latte, che cerchi. -Pinocchio andò di corsa a casa dell’ortolano Giangio; ma l’ortolano gli disse: -– Quanto ne vuoi del latte? -– Ne voglio un bicchiere pieno. -– Un bicchiere di latte costa un soldo. Comincia intanto dal darmi il soldo. -– Non ho nemmeno un centesimo, – rispose Pinocchio tutto mortificato e dolente. -– Male, burattino mio, – replicò l’ortolano. – Se tu non hai nemmeno un centesimo, io non ho nemmeno un dito di latte. -– Pazienza! – disse Pinocchio e fece l’atto di andarsene. -– Aspetta un po’, – disse Giangio. – Fra te e me ci possiamo accomodare. Vuoi adattarti a girare il bindolo? -– Che cos’è il bindolo? -– Gli è quell’ordigno di legno, che serve a tirar su l’acqua dalla cisterna, per annaffiare gli ortaggi. -– Mi proverò... -– Dunque, tirami su cento secchie d’acqua e io ti regalerò in compenso un bicchiere di latte. -– Sta bene. -Giangio condusse il burattino nell’orto e gl’insegnò la maniera di girare il bindolo. Pinocchio si pose subito al lavoro; ma prima di aver tirato su le cento secchie d’acqua, era tutto grondante di sudore dalla testa ai piedi. Una fatica a quel modo non l’aveva durata mai. -– Finora questa fatica di girare il bindolo, – disse l’ortolano, – l’ho fatta fare al mio ciuchino: ma oggi quel povero animale è in fin di vita. -– Mi menate a vederlo? – disse Pinocchio. -– Volentieri. -Appena che Pinocchio fu entrato nella stalla vide un bel ciuchino disteso sulla paglia, rifinito dalla fame e dal troppo lavoro. -Quando l’ebbe guardato fisso fisso, disse dentro di sé, turbandosi: -– Eppure quel ciuchino lo conosco! Non mi è fisonomia nuova! -E chinatosi fino a lui, gli domandò in dialetto asinino: -– Chi sei? -A questa domanda, il ciuchino apri gli occhi moribondi, e rispose balbettando nel medesimo dialetto: -– Sono Lu...ci...gno...lo. -E dopo richiuse gli occhi e spirò. -– Oh! povero Lucignolo! – disse Pinocchio a mezza voce: e presa una manciata di paglia, si rasciugò una lacrima che gli colava giù per il viso. -– Ti commovi tanto per un asino che non ti costa nulla? – disse l’ortolano. – Che cosa dovrei far io che lo comprai a quattrini contanti? -– Vi dirò... era un mio amico!... -– Tuo amico? -– Un mio compagno di scuola!... -– Come?! – urlò Giangio dando in una gran risata. – Come?! avevi dei somari per compagni di scuola!... Figuriamoci i belli studi che devi aver fatto!... -Il burattino, sentendosi mortificato da quelle parole, non rispose: ma prese il suo bicchiere di latte quasi caldo, e se ne tornò alla capanna. -E da quel giorno in poi, continuò più di cinque mesi a levarsi ogni mattina, prima dell’alba, per andare a girare il bindolo, e guadagnare così quel bicchiere di latte, che faceva tanto bene alla salute cagionosa del suo babbo. Né si contentò di questo: perché a tempo avanzato, imparò a fabbricare anche i canestri e i panieri di giunco: e coi quattrini che ne ricavava, provvedeva con moltissimo giudizio a tutte le spese giornaliere. Fra le altre cose, costruì da sé stesso un elegante carrettino per condurre a spasso il suo babbo alle belle giornate, e per fargli prendere una boccata d’aria. -Nelle veglie poi della sera, si esercitava a leggere e a scrivere. Aveva comprato nel vicino paese per pochi centesimi un grosso libro, al quale mancavano il frontespizio e l’indice, e con quello faceva la sua lettura. Quanto allo scrivere, si serviva di un fuscello temperato a uso penna; e non avendo né calamaio né inchiostro, lo intingeva in una boccettina ripiena di sugo di more e di ciliege. -Fatto sta, che con la sua buona volontà d’ingegnarsi, di lavorare e di tirarsi avanti, non solo era riuscito a mantenere quasi agiatamente il suo genitore sempre malaticcio, ma per di più aveva potuto mettere da parte anche quaranta soldi per comprarsi un vestitino nuovo. -Una mattina disse a suo padre: -– Vado qui al mercato vicino, a comprarmi una giacchettina, un berrettino e un paio di scarpe. Quando tornerò a casa, – soggiunse ridendo, – sarò vestito così bene, che mi scambierete per un gran signore. -E uscito di casa, cominciò a correre tutto allegro e contento. Quando a un tratto sentì chiamarsi per nome: e voltandosi, vide una bella Lumaca che sbucava fuori della siepe. -– Non mi riconosci? – disse la Lumaca. -– Mi pare e non mi pare... -– Non ti ricordi di quella Lumaca, che stava per cameriera con la Fata dai capelli turchini? Non ti rammenti di quella volta, quando scesi a farti lume e che tu rimanesti con un piede confitto nell’uscio di casa? -– Mi rammento di tutto, – gridò Pinocchio. – Rispondimi subito, Lumachina bella: dove hai lasciato la mia buona Fata? Che fa? Mi ha perdonato? Si ricorda sempre di me? Mi vuol sempre bene? È molto lontana da qui? Potrei andare a trovarla? -A tutte queste domande fatte precipitosamente e senza ripigliar fiato, la Lumaca rispose con la sua solita flemma: -– Pinocchio mio! La povera Fata giace in un fondo di letto allo spedale!... -– Allo spedale?... -– Pur troppo! Colpita da mille disgrazie, si è gravemente ammalata e non ha più da comprarsi un boccon di pane. -– Davvero?... Oh! Che gran dolore che mi hai dato! Oh! povera Fatina! Povera Fatina! Povera Fatina!... Se avessi un milione, correrei a portarglielo... Ma io non ho che quaranta soldi... eccoli qui: andavo giusto a comprarmi un vestito nuovo. Prendili, Lumaca, e và a portarli subito alla mia buona Fata. -– E il tuo vestito nuovo?... -– Che m’importa del vestito nuovo? Venderei anche questi cenci che ho addosso, per poterla aiutare! Và, Lumaca, spìcciati: e fra due giorni ritorna qui, che spero di poterti dare qualche altro soldo. Finora ho lavorato per mantenere il mio babbo: da oggi in là, lavorerò cinque ore di più per mantenere anche la mia buona mamma. Addio, Lumaca, e fra due giorni ti aspetto. -La Lumaca, contro il suo costume, cominciò a correre come una lucertola nei grandi solleoni d’agosto. -Quando Pinocchio tornò a casa, il suo babbo gli domandò: -– E il vestito nuovo? -– Non m’è stato possibile di trovarne uno che mi tornasse bene. Pazienza!... Lo comprerò un’altra volta. -Quella sera Pinocchio, invece di vegliare fino alle dieci, vegliò fino alla mezzanotte suonata; e invece di far otto canestre di giunco ne fece sedici. -Poi andò a letto e si addormentò. E nel dormire, gli parve di vedere in sogno la Fata, tutta bella e sorridente, la quale, dopo avergli dato un bacio, gli disse così. -– Bravo Pinocchio! In grazia del tuo buon cuore, io ti perdono tutte le monellerie che hai fatto fino a oggi. I ragazzi che assistono amorosamente i propri genitori nelle loro miserie e nelle loro infermità, meritano sempre gran lode e grande affetto, anche se non possono esser citati come modelli d’ubbidienza e di buona condotta. Metti giudizio per l’avvenire, e sarai felice. -A questo punto il sogno finì, e Pinocchio si svegliò con tanto d’occhi spalancati. -Ora immaginatevi voi quale fu la sua maraviglia quando, svegliandosi, si accorse che non era più un burattino di legno: ma che era diventato, invece, un ragazzo come tutti gli altri. Dette un’occhiata all’intorno e invece delle solite pareti di paglia della capanna, vide una bella camerina ammobiliata e agghindata con una semplicità quasi elegante. Saltando giù dal letto, trovò preparato un bel vestiario nuovo, un berretto nuovo e un paio di stivaletti di pelle, che gli tornavano una vera pittura. -Appena si fu vestito gli venne fatto naturalmente di mettere la mani nelle tasche e tirò fuori un piccolo portamonete d’avorio, sul quale erano scritte queste parole: «La Fata dai capelli turchini restituisce al suo caro Pinocchio i quaranta soldi e lo ringrazia tanto del suo buon cuore». Aperto il portamonete, invece dei quaranta soldi di rame, vi luccicavano quaranta zecchini d’oro, tutti nuovi di zecca. -Dopo andò a guardarsi allo specchio, e gli parve d’essere un altro. Non vide più riflessa la solita immagine della marionetta di legno, ma vide l’immagine vispa e intelligente di un bel fanciullo coi capelli castagni, cogli occhi celesti e con un’aria allegra e festosa come una pasqua di rose. -In mezzo a tutte queste meraviglie, che si succedevano le une alle altre, Pinocchio non sapeva più nemmeno lui se era desto davvero o se sognava sempre a occhi aperti. -– E il mio babbo dov’è? – gridò tutt’a un tratto: ed entrato nella stanza accanto trovò il vecchio Geppetto sano, arzillo e di buonumore, come una volta, il quale, avendo ripreso subito la sua professione d’intagliatore in legno, stava appunto disegnando una bellissima cornice ricca di fogliami, di fiori e di testine di diversi animali. -– Levatemi una curiosità, babbino: ma come si spiega tutto questo cambiamento improvviso? – gli domandò Pinocchio saltandogli al collo e coprendolo di baci. -– Questo improvviso cambiamento in casa nostra è tutto merito tuo, – disse Geppetto. -– Perché merito mio?... -– Perché quando i ragazzi, di cattivi diventano buoni, hanno la virtù di far prendere un aspetto nuovo e sorridente anche all’interno delle loro famiglie. -– E il vecchio Pinocchio di legno dove si sarà nascosto? -– Eccolo là, – rispose Geppetto; e gli accennò un grosso burattino appoggiato a una seggiola, col capo girato sur una parte, con le braccia ciondoloni e con le gambe incrocicchiate e ripiegate a mezzo, da parere un miracolo se stava ritto. -Pinocchio si voltò a guardarlo; e dopo che l’ebbe guardato un poco, disse dentro di sé con grandissima compiacenza: -– Com’ero buffo, quand’ero un burattino!... e come ora son contento di essere diventato un ragazzino perbene!... -Fine. +I. + + +Era la notte dal 12 al 13 di gennaio 1857, e per la via Assarotti, a +Genova, soffiava un vento come suole soffiare in quest'ampia via, +quando Eolo scatena uno de' suoi sudditi sulla regina del Tirreno. + +È tramontana? è scirocco? è libeccio? Non ne sapete nulla. Esce, non +si sa da dove, e v'investe da tutte le parti. Guai allo scribacchino +municipale che si lascia cogliere ad occhi aperti, perchè risica di +andare a palazzo Tursi colla polvere negli occhi, di non veder più lo +scrittoio e di dover chiedere una licenza di ventiquattr'ore, che il +capo uffizio non è sempre disposto a concedere! Guai alla signora, che +non sta attenta a raccogliersi la veste dattorno, perchè il vento è +curioso di segreti e, quel che è peggio, ama troppo di propalarli ai +viandanti. + +Ma perchè sto io a discorrervi del vento? La storia che vi racconto +non occorre in mezzo alla strada, ma in un elegante quartierino al +terzo piano del secondo palazzo a sinistra. + +Abita colassù, cioè, dico male, abitava nel gennaio 1857 il +protagonista del mio racconto, uomo sui trentaquattro, laureato in +leggi, scapolo, non brutto, nè antipatico, e con ventimila lire +d'entrata. + +Trentaquattro anni son forse troppi; la laurea in leggi non è nulla; +ma l'essere scapolo, non brutto nè antipatico, e l'avere ventimila +lire d'entrata, è già molto per esser felici, quando si abbiano +desiderii modesti. + +Pure, Roberto Fenoglio non era felice; si annoiava da mattina a sera, +da sera a mattina. Aveva buoni e gioviali amici, ai quali imprestava +spesso del denaro, e che qualche volta glielo restituivano; una +vecchia governante che non gli dava molestia; un cuoco che non lo +derubava; un cavallo proverbiale per la dolcezza del suo trotto; uno +scanno a teatro senza noiosi vicini; e tuttavia non era felice, e si +annoiava maledettamente. + +Aveva provato a fare qualcosa, ad occuparsi; ma nessuna occupazione +gli andava a' versi, e a breve andare se n'era stancato. Ma queste +cose le mie belle lettrici le udranno dalla sua bocca, imperocchè io +lo presento loro nel primo salotto del suo quartierino, alle tre dopo +mezzanotte, vestito da cinese, in atto di congedare uno sciame di +giovinotti e di allegre mascherine. + +Perchè vestito da cinese? perchè quelle mascherine? + +Roberto Fenoglio aveva raccolto in casa sua quella sera tutti i suoi +amici, tanto per passar la noia in compagnia. S'era suonato, ballato e +cenato, colla massima libertà ed allegrezza. Le dame non erano severe, +nè contegnose. Il rispettabile corpo di ballo del teatro Carlo Felice +aveva dato il suo meglio a quella festa; le mammine erano sazie e +contente; le silfidi, contente e non sazie, domandavano un'altra festa +come quella che Roberto Fenoglio aveva dato loro, con tanta +splendidezza di mandarino annoiato. + +Le allegre mascherine se ne andavano, accompagnate dai fidi cavalieri, +ben chiuse nei loro accappatoi, per custodirsi dal vento, che si udia +zufolare di fuori; se ne andavano giù per le scale, ridendo e +cinguettando come uno stuolo di passere, o di cingallegre, e destando +tutto il pacifico vicinato. + +Il tranquillo berretto di cotone si rizzava commosso dalla +rimboccatura del letto matrimoniale, e chiedeva: + +--Che cos'è quest'allegro rumore? Ah, capisco; si balla dall'avvocato +Fenoglio. + +E un sospiro mal represso chiudeva la frase. E lì, una cuffia lavorata +all'uncinetto si rizzava a sua volta, per soggiungere: + +--Ma come fa l'avvocato Fenoglio a dar delle feste da ballo, egli che +non è ammogliato? Quali signore possono andare in casa sua? + +Domanda, questa, a cui il berretto di cotone non rispondeva, e si +voltava dall'altro lato, tirandosi la rimboccatura del lenzuolo fin +sopra il becchetto. + +La cuffia intanto pensava, pensava.... che cosa pensava? forse, che il +berretto di cotone non era la più bella cosa del mondo. E il berretto +di cotone, dal canto suo, fantasticava una serie di variazioni su +questo tema: «beato Fenoglio! egli l'ha indovinata davvero!» + +Lasciamo pensare, fantasticare e riaddormentarsi da capo questi due +malinconici simboli dell'Imeneo, e torniamo al nostro protagonista, +che, ritto nel salotto, si volgeva a Felice Magnasco, ultimo rimasto +de' suoi convitati, per dirgli, con piglio di burlesca cerimonia +cinese: + +--_A-ing-fo-hi_! + +Felice Magnasco, un giovinotto elegante ed attillato, come ogni figlio +d'Adamo che usi farsi vestire (o spogliare) da un sarto di grido, +diede una crollata di spalle, che fece far due grinze al suo abito +nero, e rispose: + +--Orvia! Gli è così che tu accomiati il tuo amico migliore? + +--Sto in carattere,--soggiunse Fenoglio.--Non ti pare che io sia un +bel mandarino cinese? + +--Al diavolo la Cina!--proruppe l'altro,--io preferisco la tua cena. + +--Oh bello, bello, stupendo! Ripetilo, Felice, te ne prego. + +--Che cosa? + +--Il tuo bisticcio. Sai che amo i bisticci, come tu le bistecche.... +Ah, ah! che te ne pare del mio? Gli è un po' stiracchiato, come le mie +braccia, tutta questa sera, per effetto della noia. + +--Tu sei dunque annoiato? + +--Sì, Felicino, pur troppo; il figlio della luna, il cugino del sole, +s'è maledettamente annoiato. + +--Male! io mi son divertito. È vero che le spese non le ho fatte io, e +piacere che non sente il rame è pretto piacere. Che ottima cena! Viva +te, Roberto primo ed unico della tua dinastia! Viva il tuo vino, i +tuoi tartufi! e le tue _bajadere_. Che vispe ragazze! Oh non sai tu, +che, se non era il pensiero della mia bella cugina, io questa sera ne +sposavo una, senza tanti preamboli? + +--Ti ringrazio per lei della tua buona intenzione,--rispose, +spalancando le fauci e tendendo le braccia, il buon mandarino,--e ti +ringrazio per me, se non sei costretto a sbadigliare, come io faccio +in questo punto per la millesima volta. + +--Ma che diamine ti saltò in mente di vestirti a quel modo e di +costringerti a non metter fuori che cinque o sei monosillabi? + +--Compatiscimi, Felicino! Ho pensato che, essendo i cinesi il popolo +più cerimonioso del mondo, io, come cerimoniere di casa mia, non +potevo fare a meno di vestirmi da mandarino. Ora tu m'hai veduto ed +udito; non ho fatto altro che dire _A-ing-fo-hi_, che in cinese, io +credo, significa: son molto lieto di vedervi. + +--E i tuoi convitati,--soggiunse ridendo Felice,--ti hanno trovato +compitissimo.-- + +Roberto Fenoglio si lasciò cadere con aria stanca sul canapè. + +--Tu mi consoli, amico!--diss'egli, dopo un lungo sospiro.--Morrò +almeno contento dell'altrui contentezza. + +--Che diamine dici? Sei tu pazzo ora? + +--No, parlo da senno e del miglior ch'io m'abbia. Sentimi, Felice; io +non posso più tirare innanzi questa monotona vita. Io non faccio un +passo senza che il piede medesimo si annoi d'esser mosso. + +--Ecco una variante del _Malade imaginaire_!--esclamò Felice, in +quella che andava a sedersi comodamente in una poltrona, di rincontro +a Roberto Fenoglio. + +Questi non badò all'atto di Felice, intento com'era a rispondergli. + +--Ah sì, in tal guisa parlano i sani agli infermi. Anch'io, al +capezzale di un tisico, gli ho detto un giorno: ma che diamine parlate +voi di morire? Avete le guancie colorite come una mela. E dieci giorni +dopo era morto. + +--Dilla su dunque una volta, questa tua malattia, ed io farò di +trovarti un buon medico. + +--Ah ci vuol altro che un medico! La scienza non conosce il mio male, +non lo ha classificato ancora ne' suoi libri; ma esso esiste, esso è +là dentro. + +--Dove? + +--In quell'orologio a pendolo. Esso ne è il simbolo parlante, esso il +complice infame. Non odi? tran.... tran.... tran.... Maledetto! È lui +che ci misura la vita e ce la fa mandar giù in ventiquattro pillole al +giorno; è lui l'omeopatico che ci tiene a bada con sessantesimi d'ora, +con sessantesimi di minuto, e ci fa morire con dosi infinitesime; è +lui.... Insomma, che ti dirò? Io odio gli orologi. Giovinetto ancora, +io già presentivo la guerra che m'avrebbero mossa questi nemici +dell'umanità, e mi vendicavo, anticipatamente, mandandoli, l'un dopo +l'altro, al Monte di pietà. Adesso, si è uomini sodi, padroni di sè e +delle sue ventimila lire d'entrata, e queste vendette bisogna +lasciarle in disparte. Ma io troverò pure uno spediente; metterò, non +foss'altro, un premio di mille lire per colui che scriverà un libro +contro gli orologi, da camera e da tasca, pendoli, cronometri, +ripetizioni, cilindri, saponette, áncore, castelli, ecc., ecc., e +proverà che il loro inventore è stato un cattivo arnese.... un +briccone.-- + +In quella che l'avvocato Fenoglio tirava giù con burlesca gravità +contro i poveri orologi, Felice aveva cavato il suo dalla tasca del +pianciotto e ne faceva scattare il coperchio d'oro. + +--O il tuo va male, o il mio;--disse egli.--Son già le tre e mezzo del +mattino, e debbo ancora chiederti un servizio innanzi di andarmene.-- + +Ma Fenoglio non gli dava retta; aveva veduto l'oriuolo di Felice e +volea rompergli una lancia addosso. + +--Ah, _tu quoque, Brute_? E tu sei un uomo che si diverte? col nemico +in saccoccia? + +--Che vuoi? è la consuetudine. E poi, non si è mica schiavi del +proprio orologio! Il mio, come quello di tutti i figli di Adamo, va +bene una volta all'anno. Io lo consulto per passatempo; egli fa a modo +suo, io al mio, e andiamo d'accordo come marito e moglie. Ma tu, +piuttosto, perchè non rompi il tuo, e non te lo levi dai piedi? + +--Bravo! e la gente di servizio? Esso è in casa un arnese necessario, +fatale, come la noia per me; il suo _tran tran_ ha dato la misura al +tran tran della mia esistenza. Rompessi anche il pendolo, la mia vita +monotona suonerebbe, io credo, le ore e i quarti d'ora in vece sua. Oh +Felice, felice te che non ti annoi! + +--E non mi avverrà mai fin ch'io viva:--rispose Magnasco;--io ho per +cotesto un segreto infallibile. + +--Dove si vende? ch'io vo subito a comperarlo, senza nemmanco levarmi +questa zimarra di dosso.... + +--Oh, non tanta furia! Tu non hai bisogno di andare dallo speziale per +questo. Fa a modo mio; abbandonati all'ignoto. Non chiedere mai a te +stesso: «che cosa debbo io fare quest'oggi, per passar mattana?» Vedi, +Fenoglio; io non mi sono mai così divertito, come un giorno che uscii +di casa nell'intento di annoiarmi. Lascia operare il caso. Passi per +una strada? Non isvoltare alla solita cantonata; va innanzi. Là +troverai quell'amico che andavi cercando al caffè, e che, svoltando +alla cantonata anzidetta, non avresti trovato di certo. Là vedrai una +bella merciaia, che ti venderà un fazzoletto, mezzo seta e mezzo +cotone, che regalerai poscia alla cameriera della tua bella, col +risparmio di tre lire. Là vedrai una sconosciuta; la seguirai, e ti +buscherai un dolce sorriso da lei, o un duello coll'amante; le quali +cose ti condurranno in un altro ordine di pensieri e di conoscenze, +che tu non avevi, uscendo di casa, e che potranno anche mutare del +tutto il tuo sistema di vita. Insomma, non ragionare innanzi di fare, +ragiona dopo; non andar colla testa, ma coi piedi; fa conto insomma di +giuocare a mosca cieca. + +--Ma....--soggiunse Roberto Fenoglio,--e se dò del naso in qualche +spigolo?.... + +--Gli è,--rispose gravemente Magnasco,--uno tra gli sconci di questa +teorica, per altro bellissima. + +--Orbene, mi proverò;--disse Roberto. E intanto si stiracchiava sul +canapè, sbadigliando di bel nuovo. + +Felice se ne avvide e fu sollecito ad alzarsi. + +--Il tuo sbadiglio,--diss'egli,--mi prova che debbo partire. Diamine! +le quattro suonate! Ed io già avevo dimenticato lo scopo della mia +fermata! Fenoglio, sai? debbo chiederti un servigio.... + +--_In manus tuas, domine._ Ti occorre denaro? Bada che non potrei oggi +imprestarti più di duemila lire. + +--Che! non ho bisogno di denaro, sibbene di un servigio assai più +rilevante e più delicato. + +--Un duello? + +--Quasi; vo' prender moglie. + +--Ah, per tutti i diavoli! _e come e quando nacque tal fiamma in te!_ + +--La storia sarebbe troppo lunga a raccontarsi ora,--rispose +Magnasco,--ed io ho bisogno di riposare almanco tre ore, innanzi di +tornare da te. + +--Tornare! ma come? perchè? + +--Eccoti il negozio in poche parole. Io ho una cugina.... + +--La vedova? + +--Per l'appunto; la conosci forse? + +--No, in fede mia; me ne hai parlato tu stesso qualche volta, e ancora +poco fa, mi dicevi.... + +--È giusto, vedi che bestia! Or dunque, mia cugina, la vedova, è una +crudele quanto adorata beltà, e quando io le parlo di amore, ella si +mette a ridere. Io le accenno cori, ed ella mi risponde picche. + +--Che c'entro io nel vostro _tresette_? + +--Tu puoi venire da lei; le ho già parlato di te, come d'uomo a modo, +rispettabile, assennato.... + +--Ti par proprio ch'io sia tutto ciò; Felicino? + +--Io ti presento a lei,--proseguì, senza turbarsi, Magnasco,--e tu +perori la mia causa; non subito, ci s'intende, ma a poco a poco, con +delicate entrature.... mi capisci? Colla tua parlantina di Cicerone, +puoi essermi molto utile. Le fai vedere che buon partito sarebbe per +lei sposare un giovane par mio, gentile di modi, dolce di umore, e +molto avveduto in materia d'interessi.... + +--E ti par proprio d'essere tutto ciò, Felicino?--chiese Roberto +Fenoglio. + +Felicino anche qui fece orecchie da mercante, e tirò innanzi nella sua +orazione. + +--Mia cugina è ricca, e il suo fattore la deruba a man salva, la +spoglia.... + +--Ah! codesto gli è grave!--interruppe Fenoglio,--spogliarla eziandio? +Questo è un cumulare gli uffici di fattore e di cameriera, e capisco +che, se la cugina è bella, siccome m'hai detto, ti spiacerà +maledettamente che altri faccia questo uffizio presso di lei. Ah, ah, +che te ne pare di questo? + +--È stiracchiato più degli altri;--rispose Felicino.--Ma dunque, vuoi +rendermi questo servigio? + +--Ci stavo appunto pensando. Tu vuoi far di me una specie di Barbiere +di Siviglia..... + +--Potresti supporre che....? + +--Altro che supporre! lo credo, lo vedo; ma non importa. Se pensi che +i miei talenti oratorî possano giovarti presso di lei.... Ah, +Felicino! io ero nato per essere oratore! Basta, ti servirò; tu mi hai +dato il tuo specifico contro la noia, io ti son debitore del +ricambio.... se pur lo sarà! A che ora si va da lei? + +--Sul mezzogiorno; ella è mattiniera come una allodola. Io dunque +verrò da te alle dieci: ti vesti, andiamo ad asciolvere insieme, e +poi, a piccoli passi, verso il tempio della diva. Addio, dunque, e +rammenta i miei consigli.... + +--Abbandonarsi all'ignoto....--disse Fenoglio. + +--Sicuro;--soggiunse Magnasco,--lasciare operare il caso.... + +--E ragionar co' piedi;--conchiuse l'altro.--Non dubitare, Felicino, +ti imiterò fedelmente, servilmente, e comincierò a ragionare in tal +guisa, facendo il tuo elogio alla bella cugina. + +--Se' arguto, per un mandarino! + +--_A-ing-fo-hi!_--rispose con piglio di umiltà reverente Roberto +Fenoglio,--_A-ing-fo-hi._ + +--Che in cinese significa.... + +--Amico, te ne ringrazio di cuore. + +--La si tira per tutti i versi, quella tua +frase.... + +--Ah, che vuoi? la è una delle prerogative della lingua cinese.-- + +E così, giostrando a sciocchezze, si separarono. + +--Stattene a tuo bell'agio sdraiato,--disse Felicino a Roberto, che +voleva alzarsi per accompagnarlo in anticamera:--conosco la strada; +tirerò l'uscio dietro di me. + +--_Fiat voluntas tua!_--rispose Roberto, a cui in quell'ora la +posizione orizzontale era dolce come a Magnasco il pensiero di sposar +sua cugina, o, per dir meglio, le sue cinquecento mila lire. + +Alle quali cose pensando, e al soccorso che gli avrebbe prestato +Fenoglio contro la ostinata resistenza della cuginesca cittadella, +Magnasco se ne andò col cuore contento e il piè leggiero. + +E andandosene, trasse l'uscio dietro a sè, siccome aveva detto a +Fenoglio; ma non badò punto a sincerarsi se la stanghetta della toppa +a sdrucciolo, che chiudeva la porta del suo amico, avesse battuto +nell'orlo della bocchetta, per modo da cacciarvisi dentro e chiuder +davvero. + +Oh dio Caso, eccone delle tue! + + + + +II. + + +Roberto Fenoglio, come vi ho detto, era rimasto sdraiato sul suo +canapè; un soffice canapè foderato di velluto, dal quale io, se ci +fossi stato, non mi sarei mosso neanco per andare a nozze, e metto +pegno non vi sareste mosso voi, cortese lettore, neanco per mandare a +comperare il libro che mi dà modo di ragionare con voi. + +L'annoiato mandarino stava fantasticando, tra la veglia e il sonno, +intorno ai consigli di Felice Magnasco. + +--Vedete mo che ingegno ha quel capo ameno di Felicino! Egli è giunto +a sciogliere un problema, pel quale io mi vo beccando da dodici anni +il cervello. Abbandonarsi all'ignoto, lasciar operare il dio Caso, +ragionare co' piedi, equivale a sfuggire il _tran tran_ della vita. +L'equazione è perfetta, e un matematico non ci troverebbe nulla a +ridire. Applichiamola dunque!... E prima di tutto, che cosa farò io +tra dieci minuti? che bestia! cominciavo a ragionare! non debbo, non +voglio sapere, che cosa farò tra dieci minuti.... Auf! che sonno! +andiamo a dormire; sarà la miglior cosa che io possa fare. Felicino +dovrà tornare stamane per condurmi dalla sua bella cugina, e non posso +andare da lei morto dal sonno. E da capo! No, io non debbo andare a +dormire; la è cosa troppo usuale; io ricasco nella consuetudine, e +questa io debbo sfuggirla ad ogni costo. Eccomi qui, su questo +canapè... Ci sono a caso.... Chi ardirebbe asserire che io non ci sono +per mero caso? Che cosa mi accadrà egli di nuovo su questo canapè? +L'ardua sentenza ai posteri. Che sonno! andrei volontieri a letto.... +Ma via, Fenoglio, non lasciarti così vilmente sopraffare dalla +ragione! Si direbbe che hai paura dell'ignoto. Chi è questo signor +ignoto?... È brutto o bello? E la cugina di Felice, è bella davvero +come ei la dipinge? O non l'ama piuttosto per le sue ricchezze? Già, +volere o non volere, il denaro si ficca sempre dappertutto. Diciamo di +no; sacramentiamo che non è vero; ma la ricchezza comanda agli occhi +del nostro corpo, come a quelli della nostra ragione.... Ma chi sa? +potrebbe anco esser bella, questa cugina!... + +Lettrici e lettori, io vi fo grazia di tutte le altre considerazioni +scucite del mio protagonista. La pigrizia, più assai de' consigli +dell'amico, lo aveva tenuto sul canapè, dove, pochi minuti dopo, egli +era rimasto assopito. + +Non vi giurerei che le copiose libazioni dello sciampagna spumante non +c'entrassero anch'esse per una larga porzione. Roberto Fenoglio era +uomo che non disprezzava punto il bicchiere, e quella notte, poi, in +mezzo ad una brigata di capi scarichi e di gaie alunne di Tersicore, +egli aveva pensato a dare il buon esempio, bevendo allegramente per +quattro. + +Dormi, Fenoglio; dormi, mandarino annoiato; il tuo sonno non vuole +durar molto. + +Imperocchè, voi già lo avete indovinato, belle lettrici e lettori +cortesi, io non lo lascierò solo sul suo canapè, e non prolungherò la +_scena muta_ oltre i confini della vostra pazienza. + +Venite con me verso l'uscio di casa. Non udite su per le scale un +muover di passi frettolosi e leggieri? Non abbiate timore di ladri; +insieme co' passi, s'ode il fruscìo di una veste di seta. + +Chi è questa donna che sale, o, per dir meglio, che vola, sfiorando +appena del piede e del lembo della sua veste gli scalini, e si ferma, +si rannicchia spaurita, tremante, ansante, sul pianerottolo, vicino +all'uscio semichiuso di Roberto Fenoglio? + +Aspettate, e lo saprete. La bella incognita (imperocchè essa è bella, +ed io già lo so, quantunque siamo tuttavia al buio), la bella +incognita, dico, rattiene colassù la sua corsa, e raccolte intorno a +sè le larghe pieghe del suo accappatoio di seta, tende l'orecchio per +cogliere ogni più lieve rumore che possa giungere dal basso. Non ode +nulla, e le si allarga il cuore; perciò, fattasi più animosa, si +attenta di sporgere il capo sulla ringhiera.... Ma ohimè! Appunto +allora comincia ad udirsi giù in fondo alle scale uno stropiccìo di +piedi, quindi un rumore confuso a cui tien dietro lo scoppiettìo di un +zolfanello strofinato su d'una ruvida superficie, e un raggio di luce +balena dal pozzo della scala. + +La povera bella si rannicchia da capo nel suo angolo, ma non istà +ferma al suo posto neppure un minuto secondo. + +--Dio mio! come fare?--ella mormora tra sè,--dove potrò salvarmi!-- + +Tremante, confusa, ella si avanza a tentoni, brancicando verso la +parete, come per cercare le imposte di un uscio; che certo ha da +trovarsi su quel pianerottolo. Ella suonerà, domanderà soccorso.... ma +giungeranno in tempo ad aprirle? Chi sa? intanto ella va cercando +colle mani il vano di quest'uscio e la corda del campanello, ma senza +pro. La sua manina leggiadra (io lo so, quantunque siamo al buio, e la +conoscerei tra mille), la sua manina leggiadra, dico, erra un tratto +nel vuoto, quindi urta in uno dei battenti dell'uscio; ed oh +maraviglia! il battente si apre da sè, e il pianerottolo si rischiara +d'un subito, all'interna luce dell'anticamera di Roberto Fenoglio. + +Benéfici effetti della trascuratezza di Felicino Magnasco, che non +aveva badato a far scorrere la stanghetta della toppa a sdrucciolo +nella sua rispettiva bocchetta! Oh caso, caso! E i filosofi verranno +poi a sostenere che esso non è l'ordinatore, anzi l'azzeccagarbugli +delle umane vicende? + +La povera bella fu, sulle prime, come sbigottita da quello aprirsi +improvviso dell'uscio, al semplice tocco delle sue dita. Quel +quartierino aperto, e in apparenza deserto, le metteva paura. Tremò +tutta dal capo alle piante, e si ritrasse fin presso la ringhiera. Ma +di là tornava ad udire il rumore dei passi, e al rumore dei passi si +mescolava il discorso di due persone che salivano, del qual discorso +giunse fino a lei spiccatamente una frase: _andiamo su, ella non ci +sfugge di certo_. E allora la poverina si fece animo, guardò in alto +come per chieder protezione dal Cielo innanzi di commettersi +nell'antro ignoto di quel quartierino, che si schiudeva luminoso a' +suoi occhi, e si buttò perduta nell'anticamera. La sala era deserta; +imperocchè l'unico servitore di genere mascolino che fosse in quella +casa, trattandosi di una festa un tal po' scapigliata, aveva avuto +licenza di andarsene a letto dopo l'ultima versata di sciampagna, e la +licenza gli era paruta un comando. La bella sconosciuta non ardì +nemmeno richiuder l'uscio; chè le sembrava di cadere di Scilla in +Cariddi, e non voleva precludersi la ritirata da un male peggiore. Si +inoltrò guardinga fino ad una portiera di seta azzurra; stette incerta +un tratto, quindi si provò a sollevarla dolcemente, sporse la sua +testolina nel vano, e le si parò davanti agli occhi lo spettacolo del +mandarino dormente. + +--Ah? Che vuol dir ciò?--chiese tra sè, con atto di meraviglia, la +sconosciuta visitatrice. Di maraviglia, notate, non di paura! + +Un uomo che dorme non fa paura ad una donna. Giaele, Giuditta, e tante +altre donne famose di quella risma, ne fanno testimonianza non dubbia. +La nostra sconosciuta, che non aveva nè chiodi di configger nelle +tempia a Sisara, nè testa da troncare ad Oloferne, e che però ci aveva +la coscienza tranquilla, dopo quel primo atto di meraviglia, compose +le labbra ad un sorriso; un bel sorriso, in fede mia, e che +illeggiadriva di molto le sue bellissime labbra. + +Essa era bella, mio candido lettore, bella quasi come voi, mia adorata +lettrice. Qui, poichè siamo alla luce dei doppieri (parlo in poesia, +ma in umile prosa bisognerebbe dire di una lucerna Carcel), cadrebbe +in acconcio uno scampolo di descrizione della sua ammirabile bellezza. +Ma siccome non ho tempo da perdere, lascio che ve ne formiate voi un +concetto colla fervida immaginazione, mio candido lettore, e che ve la +raffiguriate voi, guardandovi nello specchio, mia adorata lettrice. + +--Un cinese?--pensò la sconosciuta, guardando Fenoglio.--O dove +diamine son capitata? E nessun altro in questa casa.... non una donna +a cui volgermi.... E quei due che salgono le scale!... Dio mio che +faccie sinistre! E come mi correvano dietro! Ah! essi sono già qui, +sul pianerottolo.... urtano nell'uscio.... Ma io non l'ho chiuso, non +l'ho chiuso! E come fare adesso? Signore! signore!-- + +Ma sì, chiamalo, Roberto Fenoglio aveva legato l'asino a buona +caviglia, e non dava segno di volersi svegliare. + +Ella ripetè, collo stesso tono di voce sommessa con cui aveva +cominciato a chiamarlo: signore! signore! + +--_A-ing-fo-hi!_--borbottò nel sonno il bravo mandarino Fenoglio. + +Cotesto non era rispondere, siccome ognun vede. La povera bella, +sgomentata dal rumore che si faceva sul pianerottolo, ebbe ricorso ad +uno stratagemma simile a quello del fagiano quando tenta di +nascondersi agli occhi del cacciatore, ficcando la testa sotto un'ala; +buttò l'accappatoio sotto una poltrona, che stava di fianco al canapè +del mandarino, e si lasciò cadere su quella poltrona, rimanendovi +supina in atto di donna dormente. + +--Ohè, Piccione! una porta aperta.... + +--Vedo bene; la sarà entrata qua dentro, la fuggitiva. + +--Impossibile! Avrebbe badato a chiudere l'uscio dietro di sè. Qui c'è +un altro negozio.... un furto consumato.... + +--Ragione di più per entrare! + +--Sicuro, entriamo! + + + + +III. + + +Questo dialogo avveniva sul pianerottolo, tra i due persecutori della +bella sconosciuta, i quali non erano altrimenti due Adoni da +quadrivio, sibbene due sergenti di Questura, il Negri e il Piccione. + +Lo strepito dei loro passi mascolini nell'anticamera e il percuoter +delle loro daghe contro le masserizie, fecero quello che non aveva +potuto ottenere la vocina della sconosciuta; vo' dire che destarono +dal sonno l'avvocato Fenoglio, il quale balzò in piedi dal suo canapè, +e vedendo alzare la portiera di seta e un braccio e una gamba +introdursi nel salotto, urlò prontamente: _ai ladri!_ e diè di piglio +ad una sedia di Chiavari, per servirsene come di una mazza ferrata +contro gl'invasori del suo domicilio. + +--Si cheti, signore, si cheti!--disse il Negri facendosi innanzi.--Noi +non siamo ladri, nè gente che le voglia far del male. Guardi alla +nostra divisa.... Ma chi vedo? il signor avvocato.... + +--Roberto Fenoglio in carne ed ossa,--rispose Fenoglio, che a sua +volta aveva riconosciuto i sergenti;--ma che cosa vogliono le signorie +loro a quest'ora, in casa dei pacifici cittadini? + +--Oh, la ci scusi, signor avvocato. Aveva l'uscio +aperto.... + +--Amico mio,--disse una vocina sottile che fece balzare due passi +indietro il mio protagonista,--gli è stato di certo quel briccone di +Battista, che va a ciaramellare di notte colla cameriera del quinto +piano. Bisogna scacciarlo dal nostro servizio, non è egli vero? + +--Si certo, lo scaccieremo!--rispose Fenoglio. + +E intanto guardava, con aria da melenso, ora i sergenti, ora la +sconosciuta, che lo aveva chiamato «amico mio.» + +--Non vorremmo aver cagionata la disgrazia di un povero +servitore....--si provò a dire il Piccione. + +--Che! che!--ripigliò la signora.--È un fannullone, un che so io; non +è egli vero, Roberto? + +--Sì, un briccone, un ladro, un assassino!--soggiunse Fenoglio, il +quale non sapeva più quello che si dicesse. + +--Oh, in tal caso,--disse il Negri,--con licenza di Vossignoria, lo +arresteremo. + +--Sì, arrestatelo.... cioè, no, lasciatelo stare, povero diavolo! Son +questi i miei modi di dire.... io non uso chiamare con altri nomi la +mia gente di servizio.... + +--Egli bisogna tuttavia che tu gli tolga questo mal vezzo, Roberto +mio!--disse la donna, mettendo con leggiadra dimestichezza il suo +braccio sotto quello di Roberto Fenoglio.--Dimmi, non è egli vero che +tu contenterai in ogni cosa tua moglie?-- + +Fenoglio aveva l'aria di cader dalle nuvole. Si lasciò mettere il +braccio di lei sotto il suo; anzi, posso giurarvi che, galante +com'era, anco nei momenti più difficili, curvò con bel garbo il +gomito, per accogliere il dolcissimo peso. Quel braccio si appoggiò +sul suo con una pressione particolare, che parea dirgli: «tenetemi +bordone, per carità!»; gli occhi della sconosciuta si volsero languidi +a cercare una buona risposta ne' suoi; la sconosciuta era bella, assai +bella; il contatto della sua aggraziata persona gli recava una +commozione subitanea per tutte le vene, insomma, il sangue non è +acqua, siamo tutti uomini, e Roberto Fenoglio rispose: + +--Si, moglie mia, farò di contentarti.-- + +Tutto ciò era avvenuto in un batter d'occhio. Ora, accettata una +condizione di cose, bisognava andare innanzi, mettere in buona vista +tutto quel garbuglio; e Roberto, comunque fosse impacciato, ci si +provò. + +--Vedete un po' che bel caso!--disse egli, voltandosi ai +sergenti.--S'era suonato e ballato.... una festicciuola tra amici.... +ai quali avevo fatto conoscere mia moglie.... + +--Ah sì!--interruppe il Negri.--Ella è ammogliato di fresco; noi nol +sapevamo neppure.... + +--Infatti,--disse Fenoglio,--io non ne avevo dato notizia a nessuno. + +--Un matrimonio _al gran destino_....--entrò a dire con aria peritosa +il Piccione. + +--Come sarebbe a dire; al gran destino? Vorrete dir clandestino? +Sicuro, ho fatto un matrimonio clandestino; ma ora l'abbiam propalato; +tutti gli amici, i parenti, Genova tutta lo ha da sapere.-- + +Così dicendo, Roberto Fenoglio si volse a guardare la sua improvvisata +metà, che lo ricompensò delle sue parole con uno sguardo d'ineffabile +tenerezza. + +--Che io possa morire, se ne capisco un'acca!--pensò egli tra sè. + +--Oh ce ne rallegriamo grandemente con Vossignoria!--disse il +Piccione, che era il più cerimonioso dei due sergenti.--E ce ne +rallegriamo anche colla sua signora.... + +--Grazie, grazie!--rispose la leggiadra donnina, accompagnando le +parole col più grazioso dei suoi divini sorrisi. + +--Suvvia, Piccione:--disse il Negri al compagno--noi adesso +disturbiamo.... + +--No, no, amici miei!--interruppe Fenoglio.--Voi non ve ne andrete +così senza aver prima bevuto un bicchiere. + +--Scusi Vossignoria: ma noi eravamo venuti in questa scala per seguire +una donna.... una.... + +--Che cosa?--domandò con molta curiosità il padrone di casa.--Avete +detto una.... Se la cosa può dirsi, finite, di grazia, la frase! + +--Oh, niente di male in quanto alla moralità personale....-- + +Fenoglio respirò a larghi polmoni. Intanto il Negri proseguiva: + +--....Insomma, debbo dirlo? Si tratta di una emissaria di Mazzini. Il +signor Questore ha saputo che questa donna, una delle più terribili +cospiratrici contro il governo, è venuta da Londra a Genova, e che +ella doveva trovarsi appunto in una casa qui presso.... Le nostre +passeggiate debbono averla messa in sospetto di qualcosa, poichè una +donna appunto (ed era certamente lei) è uscita dalla casa in discorso; +ma, inseguita da noi, s'è ficcata nelle scale di questo palazzo.... + +--Ah diamine!--esclamò Roberto Fenoglio.--E adesso come farete a +trovarla? + +--Ella a quest'ora avrà potuto ridiscendere le scale!--si affrettò a +soggiungere la signora. + +--Sicuro! dice bene la signora Fenoglio!--gridò il Piccione, +percuotendosi la fronte colla palma della mano.--Vedi che bestia siamo +stati noi altri! Ma qui bisogna correre. + +--Non tanta fretta!--interruppe ella sorridendo.--A quest'ora ella ha +potuto andare molto lunge, e come vorreste trovarla! Gli è un colpo +fallito, al quale non si rimedia, e sarà meglio vi ricordiate che il +mio Roberto vi ha pregato di fermarvi ancora pochi minuti per berne un +bicchiere. + +--La signora ha ragione!--disse il Negri con aria melanconica.--Ora, +poichè la ci è sfuggita, beviamo. + +--Signor avvocato,--ripigliò il sergente Piccione,--beveremo alla +salute della sua signora moglie, che è tanto gentile quanto bella. +Scusi, signora, il complimento, compatisca; siamo gente alla +buona....-- + +Intanto Roberto Fenoglio era andato in una camera vicina e ne tornava +con una bottiglia di Sciampagna, che fu sollecito a sturare per quei +due ragguardevoli personaggi. + +--Alla salute della signora Fenoglio!--disse il Negri, alzando il +calice spumante. + +--Che il Ciel la benedica, e le conceda una mezza dozzina di bei +bambocci somiglianti al l'ottimo avvocato Fenoglio!--soggiunse il +Piccione. + +--Grazie, amici, grazie!--rispose Fenoglio.--Noi faremo di non mandar +vani i vostri amorevoli augurii.-- + +E guardò sott'occhi la sua sconosciuta vicina, che si fe' rossa in +volto come una ciliegia. + +Intanto quei due, sebbene, dopo una seconda e una terza libazione, +avessero veduto il fondo della bottiglia, non se ne andavano ancora. +Fenoglio era sulle spine, poichè gli premeva di sapere chi fosse +quella donna, e come gli fosse capitata in casa. La donna, dal canto +suo, ci doveva avere le sue buone ragioni, per affrettare coi voti la +loro partenza. + +Il Negri, dopo una sosta di parecchi minuti secondi, così prese a +parlare: + +--Signor avvocato, la mi scusi; avrei a chiederle.... ma non mi dia +dell'indiscreto.... + +--Oh, niente affatto!--rispose Fenoglio. + +--Sì, sì, la è una indiscretezza la nostra.... ma tant'è, non possiamo +fare a meno di pregarla.... + +--Ahi, ahi!--pensò il mandarino--che cosa vuole ora costui?-- + +La povera bella, di rossa ch'ella era divenuta, si fe' più pallida di +prima. + +--Vossignoria,--proseguì il sergente, senza addarsi di nulla,--è in +relazione col nostro capo, il cavalier Gallesi.... + +--Sicuro, sono in relazione con lui, con quella degna +persona;--rispose Roberto.--Lo vedo qualche volta ed ho l'onore del +suo saluto. Ma che cosa.... + +--Ecco;--interruppe il Negri,--noi abbiamo fatto il nostro dovere, +niente più niente meno del nostro dovere.... Ma se il signor cavaliere +venisse a risapere che ci siamo lasciati sfuggire.... mi capisce? + +--Ah! sì, capisco,--disse Fenoglio, tornando a respirare +liberamente,--io non debbo dir nulla. Non dubitate, sarò muto come una +tromba.... cioè no, volevo dirle come una tomba. Che diamine! vedete +mo' come talvolta ci tradisce la lingua.-- + +Non era vero niente; Roberto Fenoglio, rasserenato dalla piega che +aveva preso il negozio, tornava ai suoi primi amori col bisticcio. + +--Le siamo riconoscentissimi della sua bontà, signor avvocato!--entrò +a dire il Piccione, colla lingua impacciata dallo Sciampagna.--In +verità non potevamo aspettarci altro da un galantuomo pari suo. Oh se +tutti fossero come Vossignoria, a questo mondo! + +--Taci là, bestione!--interruppe il Negri, che voleva schiccherare +anch'egli un complimento all'avvocato.--Se tutti fossero come il +signor cavaliere.... + +--No, no, lasciate i titoli da parte, io non son cavaliere e me ne.... +me ne.... insomma, non lo sono!--conchiuse Roberto. + +--Il governo ha torto!--sentenziò il Negri.--Io lo servo, lo rispetto +e lo venero, come è debito mio; ma egli ha torto a non far cavaliere +un personaggio come Vossignoria. Basta, io non c'entro.... Che cosa +dicevo, Piccione? + +--Dicevi che se tutti fossero.... + +--Ah si, mi ricordo; volevo dirti che se tutti fossero come il signor +avvocato, noi perderemmo il nostro pane, perchè non ci sarebbe nulla +da fare nel nostro mestiere.-- + +E accompagnate queste parole con un inchino, il Negri si congedò +dall'avvocato Fenoglio, pregandolo, scongiurandolo da capo a condonar +loro la molestia che gli avevano involontariamente recata. + +Così finì quella scena, che poteva avere ben altre conseguenze per uno +dei due personaggi rimasti. Fenoglio accompagnò i due sergenti fino +all'uscio di casa, e questa volta lo chiuse egli, colla debita +attenzione, anzi con due mandate di chiave. + +Quindi tornò nel salotto, dov'era rimasta la sconosciuta, e, giunto +sul limitare, si fermò, sporgendo il capo verso di lei, in aria d'un +maiuscolo punto interrogativo. + + + + +IV. + + +La bella ignota era caduta sulla poltrona accanto al canapè. Lo sforzo +di quella scena difficile l'aveva svigorita per modo da non sentirsi +più reggere in piedi. + +--Oh, signore!--mormorò ella, più che non dicesse--la mia +gratitudine.... + +--Nulla, nulla, non mi ringraziate!--interruppe il mandarino.--Ditemi +piuttosto, se non è un prentender troppo, chi siete voi, o signora, +voi che vi fate di punto in bianco mia moglie, mi togliete dalla +fronte quell'aureola di vergine.... e martire, la quale mi si +confaceva pur tanto? + +--Signore....--balbettò la povera bella,--o signore.... voi siete così +buono, avete un cuor così nobile.... + +--Signora, io non ho cera qui sotto le mani per turarmi gli orecchi, +come fece Ulisse, allorquando egli ebbe a trovarsi in un caso simile +al mio; ma vi giuro che, se voi proseguite a parlarmi così dolcemente, +io supplirò alla cera colla palma delle mani.-- + +E dicendo queste parole, le quali arieggiavan assai più il madrigale +che l'invettiva, Roberto Fenoglio fe' il doppio gesto di un uomo che +vuol turarsi gli orecchi. + +Era grazioso in quell'atteggiamento, il nostro mandarino posticcio; e +la signora, quantunque il momento non fosse da ciò, non potè +rattenersi dal ridere. + +--Ah, vi pigliate anche giuoco di me, bella e terribile +sconosciuta?--incalzò Roberto Fenoglio.--Avete ragione, in fede mia. +Eccomi ammogliato senza saperlo, e con chi? con una donna +_contemplata_ dall'articolo 185 del Codice penale. + +--Oh!--esclamò la signora alzandosi in piedi. + +--Non vi adirate per sovra mercato, signora!--fu sollecito a +soggiungere Fenoglio.--L'articolo 185 non può offendere la dignità +della donna. Ma in fine, i fatti _enunciati_ vi accusano; la +prevenzione è contro di voi. Chi inseguivano quei due degni tutori +dell'ordine pubblico, se non voi? se non una.... _horresco +referens_.... una rivoluzionaria? + +--Mio buon signore,--disse la sconosciuta, accennandogli con atto +leggiadro, che volesse chetarsi un tratto,--io vi prego, per quella +cortesia che m'avete dimostrata fin qui, ad usar pazienza ancora un +tantino. Tutto quello che è avvenuto stanotte ha bisogno di una +spiegazione, e voi, gentile come siete, mi darete agio ad esporre le +mie ragioni. + +--Tolga il Cielo che io voglia condannarvi senza ascoltarvi--rispose +Roberto Fenoglio.--Non siamo più ai tempi della inquisizione, la Dio +mercè, ed io son qui tutto orecchi ad udirle, queste vostre ragioni. + +--Or bene, signore, parlerò.... Ma anzitutto, voi siete un gentiluomo, +e.... + +--E me ne vanto, signora! Ho sempre saputo custodire i segreti che mi +furono confidati, e tanto più facilmente, in quanto che io sono l'uomo +più smemorato che viva sotto la cappa del cielo. Tutto ciò che ode il +mio orecchio destro non ha neppure il tempo di giungere all'orecchio +sinistro, che io già l'ho dimenticato. + +--Tanto meglio! Sappiate dunque che la rivoluzionaria c'è, e appunto +quella che i due uomini della Questura cercavano.... + +--Ah! voi lo confessate? Ma come mai una così leggiadra donnina +(scusate la schiettezza, ma io amo dire anzitutto la verità, la pura +verità, niente altro che la verità), come mai una così leggiadra +donnina, quale voi siete, va a ficcarsi in questi viluppi? + +--Ringrazio i vostri occhi dell'inganno in cui mostrano +d'essere,--rispose ella, sorridendo traditorescamente,--ma non debbo +lasciar del pari in errore il vostro giudizio. Quella rivoluzionaria, +di cui si parla, non sono io; siete contento? + +--Respiro, signora, respiro; ma proseguite, di grazia! + +--Ecco dunque;--continuò la signora,--questa rivoluzionaria è mia +amica. Rivoluzionaria! Anche il vocabolo è improprio, imperocchè essa +non è che la moglie di un ottimo cittadino, il quale è condannato nel +capo e vive lontano dal suo paese, amandolo da lungi e facendo voti +perchè si muti quest'ordine di cose, che nessun italiano di core.... + +--Dovrebbe tollerare!--conchiuse Roberto Fenoglio. + +--Ah, son lieta di parlare con un uomo!--disse la signora, stendendo +la mano a Roberto, che l'afferrò prontamente e vi stampò un rispettoso +bacio, se pure è vero che i baci siano una testimonianza di rispetto. + +Ella ritrasse dolcemente la sua mano e proseguì: + +--La mia buona Erminia (così ella si chiama) non è qui venuta per +cospirare, sibbene per vedere un suo figliuoletto che ha lasciato a +Genova in casa de' suoi congiunti, e che da qualche settimana era +infermo. La poverina, giunta ieri, mi ha fatto pregare stanotte di +recarmi da lei, e voi potete argomentar di leggieri che io non +mettessi indugio a contentarla. Il mio servitore mi accompagna fino +alla porta, e lo rimando a casa per maggior precauzione. Ora ecco che, +mentre io salgo le scale, odo rumor di passi.... intimorita, mi +ritraggo; essi mi hanno sentita, e giù per le scale verso di me! +Allora io non so più quel che mi faccia, esco fuori, e senza pure +voltarmi indietro, vengo a rifugiar nel portico di questo palazzo, +sperando che non mi abbiano veduta ad entrarvi. Ero in errore; mi +seguono; io salgo pian piano fin qui.... trovo un uscio aperto, e voi +sapete il rimanente, voi che mi avete presa a proteggere, senza pur +sapere chi io mi fossi. E di ciò permettete che vi ringrazi, o +signore, poichè, sebbene per me non avessi nulla a temere, la mia +dignità di donna era tuttavia a repentaglio, nel trovarmi sola, di +notte, e inseguita a quel modo!... Ah, mio Dio? rabbrividisco al solo +pensarvi. + +--Avete ragione, signora,--disse Roberto, com'ella ebbe finito il suo +discorso,--avete ragione. Una donna sola, di notte, e così bella, come +voi.... Ma perchè siete voi così bella?-- + +E uscendo in questa esclamazione, improvvisa, Roberto Fenoglio mandò +un lungo sospiro. + +--Che cosa avete?--domandò ella a sua volta. + +--_A-ing-fo-hi_!--rispose egli sospirando da capo. + +--E che cosa vuol dire quest'altra frase? + +--Vuol dire, o signora.... Ma anzitutto, mi promettete di non andar in +collera? + +--Ve lo prometto, purchè non mi diciate +complimenti. + +--Oh, saranno verità sacrosante: vi dirò quello che sento e nulla più. +Sapete voi che cosa avvenga allo zolfo quando un raggio di sole, +attraversando il fuoco di una lente, viene a percuotergli sopra? + +--Credo che si accenda, ma non potrei giurarlo, perchè non m'intendo +di fisica. + +--Oh, giuratelo, signora mia, giuratelo pure! Cotesto è avvenuto a me, +dacchè voi siete entrata qui, cioè, mi spiego, da quando io mi sono +svegliato. Voi siete il raggio di sole; l'occasione bizzarra che vi ha +condotto qui è la lente; lo zolfo infine sono io, Roberto Fenoglio, +avvocato, e scapolo per giunta. Siete nubile voi? + +--No, signore. + +--Ah! c'è un marito!... + +--Neppure; egli c'è stato. + +--Siete vedova, dunque! Vedova! oh dolce nome! siete vedova, e siete +bella! Ma tutto ciò è un sogno.... Abbandonarsi all'ignoto! lasciar +operare il caso!... L'ignoto è venuto, il caso ha operato un miracolo! + +--Che dite voi ora? + +--Lasciatemi dire, o signora; parlo col mio angelo custode. Non +credete che io ci abbia un angelo custode? È lui che vi ha condotta +quassù: consentite che io adori in voi i decreti della divina +Provvidenza. E l'esservi voi dichiarata mia moglie non è forse una +voce del cielo? La vocazione di Abramo è stata determinata da assai +più lievi cagioni. Insomma, o signora, vengo difilato alla conclusione +del mio discorso, che vi sarà parso sconclusionato; ma io m'intendo e +basta. Che direste voi di un uomo non vecchio, nè al tutto sgradevole, +e con ventimila lire di entrata senza contare uno zio materno, +decrepito, senza figli, e con mezzo milione? + +--Direi,--rispose la signora che sapea stare alla celia,--ch'egli è un +uomo fortunato. + +--Non mi avete inteso; mi spiegherò meglio. Che direste di quest'uomo, +se egli vi proferisse la mano, dopo avervi umilmente chiesto la +vostra? + +--Direi ch'egli è un bel pazzo, a concepire di così fatti disegni e +più pazzo ancora a dirli a me, la prima volta che egli mi vede, e in +una somigliante occasione.-- + +Roberto Fenoglio chinò il capo e lasciò cader le mani penzoloni lungo +i braccioli della scranna sulla quale era venuto a sedersi per +cominciare il suo dialogo. + +--Tutte così, le donne!--esclamò egli, sospirando. + +--Tutte così, voi dite? e perchè di grazia? + +--Perchè?--ripetè con accento di amarezza Roberto Fenoglio.--Voi mi +chiedete ancora il perchè! Perchè esse si dilettano a tormentare il +cuore di un uomo, lo girano e rigirano per tutti i versi, scherzandovi +su colle loro unghie feline che lacerano dovunque toccano e fanno +spicciare il sangue. Dite loro: _vi amo_, lo dite con tutta la +sincerità dell'anima vostra, ed elleno vi ridono sul viso con aria +d'incredulità. Per esse l'amore non esiste che allo stato di +vecchiezza; lo fanno nascere dalla consuetudine, vi negano ch'e' possa +essere il risultato di una commozione subitanea. L'amore per gradi; +che bella cosa! Ma qual è, dopo quant'altri gradi incomincia quello in +cui si può dire _vi amo_ ed esser creduti? Io mi ribello, o signora, +contro questa falsa teorica. Voi stessa, che la lodate palesemente, +non ne credete in cuor vostro una jota. Ma essa vi torna acconcia per +guadagnar tempo, per pigliarvi diletto dei nostri tormenti... Orvia, +signora, non crollate la vostra testolina a quel modo! Lasciatevi dire +la verità da un uomo che riceve per la prima volta la scossa +elettrica! Io non ho amato mai, sebbene molte fiate siasi potuto +argomentare il contrario, da certe vaghe apparenze. Questo affetto che +io vi confesso candidamente ora, è già padrone di me. Se la cosa +dovesse procedere diversamente, se io dovessi innamorarmi di voi a +gradi, a gradi, avreste ragione a non usarmi misericordia, perchè io +sarei un uomo da nulla. Come è nato questo amore? Non lo so. La novità +del caso era fatta piuttosto per ispirarmi la diffidenza; ma non ne fu +nulla. Se debbo confessarvi un mio sospetto, vi dirò che vi ho amato +in quel momento che avete posto il vostro braccio sotto il mio. In +quella dolce pressione che volea dirmi: _salvatemi_! io ne ho sentito +un'altra che diceva: _amatemi_. Ho inteso la vostra preghiera, ho +accettato il vostro comando; perchè una corrente elettrica mi ha +signoreggiato ad un tratto. E subito, comunque turbato, ho messo ogni +mia virtù a tornarvi utile. Chi, se non il cuore, mi ha detto allora +che voi eravate una gentildonna? Sì, una gentildonna; questa +persuasione si è trasfusa a quel contatto in tutto l'esser mio, ed io +non ho sospettato di sapere il vostro nome per obbedirvi, come non lo +chiedo ora, innanzi di confessarvi che vi amo. E adesso ridete pure, +ridete liberamente di me! + +--Perchè riderei?--chiese la sconosciuta, con piglio soave.--A +schietto parlare schietta risposta. Che cosa direste voi di una donna, +la quale, alle prime parole di un uomo che ella vede per la prima +volta, gli rispondesse: vi credo, e accettasse di grand'animo l'amor +suo? + +--Direi che ella è una donna superiore a tutte le altre, o, per rubare +una sua magnifica frase al divino Petrarca, «_colei che sola a me par +donna_.» + +--No, signor Fenoglio, non lo direste, o, dicendolo, non lo +pensereste. Se questa donna non conosce ancora quest'uomo.... + +--Ma neppure io, o signora, conoscevo voi, e tuttavia.... + +--Gran bella ragione!--interruppe la donna.--Vedete mo il gran risico +che correvate voi! Ed è egli possibile che il vostro senno non vi +dimostri la grave, la profonda differenza che corre tra un cuor d'uomo +e un cuore di donna? Che sacrifizio fa l'uomo ad amare e a dirlo, egli +tentatore, egli padrone di perdere nel giuoco quel tanto appena che ha +messo di posta? Noi, povere donne, quando amiamo (il che più veramente +ci avviene che a voi, e con più violenza di subitanea passione che voi +non crediate) paghiamo i nostri errori col dispregio di noi medesime. +Non parlate più? Non crollate più a vostra volta il capo, in segno di +incredulità? Vedete pure che non avevate ragione, e, schietta come +sono, vo' confessarvelo. Ho detto testè: _se questa donna non conosce +ancora quest'uomo..._ e ho detto male, poichè io già vi avevo +conosciuto, sebbene da mezz'ora, più addentro che se la nostra +conoscenza già contasse anni di vita. Siete un galantuomo e un +gentiluomo, ed io vi ho veduto alla prova. Credete pure che io so +rendervi giustizia! Noi povere donne non possiamo parlare liberamente +come voi fate.... E per legge di natura, e per vincolo di educazione, +noi siamo il sesso debole; non abbiamo altra arma migliore in nostra +difesa che la diffidenza, la eterna diffidenza. + +--Il sesso debole!--soggiunse Roberto.--Siamo noi il sesso debole! + +--Quando ci amate, s'intende. Ma dura così poco in voi, questo stato +di malattia! La convalescenza è sempre assai pronta, e ripigliate +sempre le forze smarrite.-- + +Roberto Fenoglio rimase muto. Era quella la più eloquente risposta che +egli potesse dare alla sconosciuta. Ella aveva ragione sulle generali, +e sebbene egli non avesse torto nel suo caso particolare, non era +quello il momento per costringerla a riconoscerlo. + +Perciò, tacendo egli, v'ebbe un tratto di pausa nel dialogo. Roberto, +colla fronte china, contava i pezzettini di marmo del suo pavimento a +mosaico; la signora guardava Roberto, aspettando che dicesse qualcosa. + +E così guardandolo, e vedendolo silenzioso, le scese inavvertita in +cuore quella pietà traditora che è sorella dell'amore e che non ha +altro ufficio se non questo, di aprir l'uscio di casa al fratello. + +--Povero giovine!--le susurrava al cuore la pietà.--Tu gli hai detto +di brutte cose, ed egli non ardisce nemmanco risponderti. Vedi com'è +contrito ed umiliato! Ora, lo hanno detto le sacre carte: _cor +contritum et humiliatum Deus non despiciet_. Egli ha una cera +simpatica, per verità! E poi, com'è gentile di modi! Come si è +adoperato volenterosamente a farti servizio! Quanti altri uomini, nel +caso suo si sarebbero diportati com'egli? Quanti altri, posti con una +donna sola, sconosciuta, in casa loro, non avrebbero piuttosto ceduto +a diverso consiglio? Gli uomini, in genere, sono un'assai brutta +razza, animi volgari, carne impastata di fango.... Ma egli! povero +giovine! Suvvia, bisogna ricompensarlo con una dolce parola!-- + +E la cercò, la dolce parola; ma lì, sulle prime, non le venne fatto +trovarla. Trovò bensì un più soave accento e un più soave sorriso, per +dirgli: + +--Or dunque, signor Fenoglio, voi sarete il mio cavaliere, per +accompagnarmi a casa. Non è egli vero? + +--Come vorrete, o signora, come vorrete. Vado subito a levarmi di +dosso queste ridicole insegne di mandarino cinese e sono ai vostri +comandi. Ma innanzi di partire udite ancora una parola, e sarà +l'ultima, ve lo giuro! + +--Con che aria mi dite voi questo!--rispose la signora.--Siate più +gaio, ve ne prego; amo meglio udirvi a scherzare, come poco fa, che +parlar malinconico e guardarmi accigliato, come ora. + +--Perdonatemi,--disse Roberto,--ma non posso far forza al mio +naturale. Sotto la forma di uno scherzo vi ho detto poco fa tutto +quello che il mio cuore sentiva. Vi ho profferto sinceramente e +prontamente la mia mano, perchè aveste a scorgere sulle prime la +purità de' miei intendimenti. Era quello il primo omaggio che io +dovevo rendere ad una donna come voi, al primo momento che sentivo di +amarla. Voi mi avete tolto in quella vece per un uomo leggero, per un +di quei capi scarichi che s'innamorano al primo uscio; ed ecco, io +porto la pena di aver fatto un giusto proposito e di non averne subito +dichiarato le lodevoli ragioni.... + +--Ah signore! E credete voi che io non le abbia pensate, tutte queste +cose gentili? Andate, andate a mutar abiti, senza fantasticare più +altro, poichè davvero stillandovi in questa guisa il cervello, non +siete più giusto, nè con voi, nè con me. + +--Vado, signora, vado; ma ditemi ancora... io vi accompagnerò a casa! +me ne tornerò senza un conforto nel mio solitario quartierino da +scapolo.... E quei due che mi sanno ammogliato... che lo andranno a +ridire.... + +--È vero!--esclamò la sconosciuta, lasciando cadere la sua testolina +leggiadra contro la spalliera della poltrona.--Non ci avevo pensato! +Mi fate adesso riconoscere quanto io abbia operato sconsideratamente +con voi. Oh quanto me ne duole!-- + +E l'espressione del volto di quella donna fu così melanconica, nel +pronunciar ch'ella fece quel suo _me ne duole_, che Roberto Fenoglio +cadde ginocchioni a' suoi piedi, e, prendendola per mano, si fece a +dirle con accento concitato: + +--Non vi addolorate, per carità! Ho detto una sciocchezza.... Ma dove +diamine l'ho pescata io! Piuttosto che vedervi piangere, mi ucciderei. +La gente dirà quel che vuole... mi crederà ammogliato; non me ne +importa; mi condannerò ad un eterno celibato, e non sarà un grave +sacrifizio per me, dopo quello che vi avrò fatto, di non riuscirvi +altrimenti molesto. Veduta voi, quale altra donna al mondo amerei?-- + +La pietà traditora inumidì leggermente le ciglia della sconosciuta. + +--Avvocato,--disse ella con piglio di leggiadra dimestichezza,--voi mi +accompagnerete; saprete dove sto, ed io vi annunzio fin d'ora che sarà +sempre aperta per un gentiluomo pari vostro la casa di Laura +Moneglia....-- + +La folgore, cascata ai piedi di Roberto, non gli avrebbe fatto più +senso di quel nome e di quel casato che uscivano soavemente dalle +labbra della sua ospite leggiadra. + +--Che?--gridò egli, balzando in piedi.--La cugina di Felicino +Magnasco? + +--Conoscete mio cugino?--dimandò la signora Laura. + +--Se lo conosco, signora... se lo conosco.... Figuratevi! egli era qui +seduto su quella medesima poltrona, mezz'ora innanzi che giungeste +voi, e mi stava pregando... mi stava dicendo.... Insomma, oggi stesso +e' doveva presentarmi a voi. + +--A me? voi? Ah, mi ricordo... mi parlò di un signore, suo amico.... +Sicuramente. Infatti il vostro nome non mi giungeva nuovo. Mio cugino +Magnasco parla molto bene, e meritamente, di voi. Orbene, che male c'è +che io sia sua cugina? + +--C'è, o signora, che voi... già lo sapete... Felicino vi ama.... + +--Orbene, che mi ami! + +--Ah! sta bene?--dimandò sbigottito Roberto. + +--Si, certo, ma io non amo lui.-- + +A Roberto Fenoglio fu per balzar fuori un sospiro di contentezza; ma +si rattenne in tempo. + +--Lo amerete più tardi;--si provò a dir egli.--Vi piegherete a' suoi +voti, alle sue preghiere. Felicino è un bel giovane, ha un ottimo +cuore.... + +--Tutto ciò che vorrete,--rispose la signora Laura,--ma egli non mi +piace oggi, e non mi piacerà domani, nè poi. + +--Egli sta fresco, allora, il mio povero amico; ma cotesto non potrà +giovarmi, non farà crescere d'un punto le mie speranze, dopo la +promessa che gli ho fatta.... + +--Che promessa? + +--Faccio male a dirvelo? Mi pare di no, poichè intanto avevate a +saperlo!... Di aiutarlo presso la sua divina parente, di persuaderla a +concedergli la sua mano. + +--Ah! ah! un mirabile spediente! E come lo ha scelto bene tra +tutti!--gridò Laura, ridendo a più non posso. + +--Signora, e perchè? + +--Ma si, lasciatemi ridere per carità! Si vede che il mio cuginetto è +molto perspicace. + +--Signora, io non so... non so se debba imbronciarmi o ridere con voi. + +--Si, ridete, ridete! Tutta questa gaiezza non ha nulla che possa +recare offesa al vostro carattere, ve lo giuro! + +--Mi fido di voi, bella signora, e rido anche io. Povero Felicino! + +--Orvia, si fa tardi; andate a vestirvi. + +--Sì, avete ragione; questa volta vado subito. Due minuti, e torno.-- + +Uscito Roberto dal salotto, Laura rimase sola a pensare. Che cosa +pensasse non vi dirò, poichè non sono mai penetrato nel cuore d'una +donna. + +Dieci minuti dopo, Roberto Fenoglio ricompariva nel salotto, vestito +da cristiano, col suo abito nero di gala, il pastrano sul braccio e lo +staio in mano. Come avesse potuto spicciarsi a quel modo non saprei +dirvi. So che l'amore fa miracoli a palate, e non mi stupisco di +questo. + + + + +V. + + +Il mio protagonista, levandosi di dosso quegli abiti da cinese, +tornava quel che era, un simpatico giovinotto, se pure può dirsi +giovinotto chi ha passata di anni parecchi la fatale trentina. La +signora Laura lo guardò e i suoi occhi manifestarono una lieta +maraviglia. E invero la cosa non poteva essere diversa, poichè +l'avvocato Fenoglio, oltre all'avere un gentile aspetto, era +innamorato cotto; e l'amore, come tutti sanno (e se qualcheduno nol +sapesse, glielo dico io), abbellisce la gente, sia che conferisca più +vivacità allo sguardo, sia che impallidisca le guancie, secondo che è +lieto, o sfortunato per coloro che l'hanno nel cuore. + +Quello di Roberto Fenoglio non potea dirsi ancora nè una cosa, nè +l'altra; era fresco di un'ora, ma era nato vigoroso come Ercole, di +cui narra la favola che, stando in cuna, strozzasse colle sue poderose +manine i serpenti. Il desiderio di piacere a quella bellissima donna, +il rispetto che sentiva per lei, sebbene l'avesse conosciuta in così +strana maniera, la stranezza medesima del caso che metteva, sto per +dire, un pizzico di sale su quel negozio, già di per sè saporito +abbastanza, tutto ciò trasfigurava Roberto Fenoglio. Se non temessi di +farmi dare dell'eretico, direi che quello era il suo Tabor, e che +intorno alle tempie egli ci aveva un'aureola. + +--Dunque, signora,--diss'egli accompagnando le parole con un +grandissimo inchino,--poichè così volete, andiamo; io sono ai vostri +comandi. + +--Voi siete un gentil cavaliere!--rispose la signora Laura.--Andiamo +dunque; mi sa mill'anni d'essere a casa mia. + +--Questa sarebbe casa vostra, se voi voleste, o signora.... + +--Pazzo!--interruppe ella, e temperò la frase con un divino +sorriso.--Di ciò mi parlerete più tardi....-- + +Così dicendo ella seguì Roberto Fenoglio nell'anticamera fino alla +porta. + +E qui avvenne un caso mirabile, strano, bizzarro, non mai più udito, +nè visto; un caso che io potrei darvi ad indovinare alle cento, alle +mille, alle diecimila, ma tanto e tanto non vi apporreste al vero; un +caso che parrà inverosimile, e che infatti è inverosimile davvero, +come è spesso inverosimile la verità. + +Non vi è egli mai avvenuto, o lettori, di vedere un tramonto di sole, +di notarne gli strani colori, i più strani effetti di luce, e dire tra +voi che, se un pittore lo copiasse fedelmente, gli darebbero +dell'esagerato? Non vi è egli mai occorso di udire un fatto, o non +avete nella vostra storia particolare un caso tanto bislacco da farvi +dire, quando ve ne ricordate, che se un romanziere lo raccontasse, non +parrebbe vero a nessuno? + +Orbene, uno di questi casi occorse per l'appunto ai miei due +personaggi; uno di questi tramonti toccò alla mia narrazione, la quale +non è un sole pur troppo! + +Roberto avea posto la mano sulla chiave e faceva girar la stanghetta +per aprire. In quel punto, proprio in quel punto, si udiva una forte +scampanellata. Egli, sebbene quel suono improvviso gli urtasse +maledettamente i nervi, non fu più in tempo a fermarsi. L'uscio si +apriva sotto le sue mani, e un uomo si presentava nel vano. Questo +uomo fu sollecito ad entrare, e la prima persona che egli ebbe a +vedere (poichè Roberto, nello aprir l'uscio, si cansava per darle il +passo) fu la bellissima Laura Moneglia. + +Chi era costui? Perchè al veder quella donna e' dava uno sbalzo +indietro, spalancando tanto d'occhi a guisa di spiritato? + +Era Felicino Magnasco, che vedeva innanzi a sè la sua crudele cugina. + +Fu un colpo di scena che io non vi starò a descrivere, e di certo non +potrei se pur lo volessi. Il fatto, l'atto istantaneo, non si dipinge; +lo scrittore non può mutarsi in fotografo. + +Felicino Magnasco entrò coll'aria più impacciata che vi possiate +immaginare, e ne aveva ben donde. Roberto Fenoglio non lo era meno di +lui. + +--Oh, buon giorno, Felicino!--esclamò egli, senza sapere che cosa si +dicesse.--Che buon vento ti porta quassù? Come va la salute? + +--Bene, grazie; e la tua? + +--_Optime_, Felicino, optime; e che cosa mi frutta una tua visita così +mattiniera? + +--Ah sì!...--rispose l'altro.--È un'ora indebita... giungo in mal +punto.... + +--Ma no, Felicino, ma no... figurati! un amico come sei tu giunge +sempre gradito. + +--Grazie da capo; ma lasciatemi raccapezzare...--soggiunse Magnasco. + +--Sì, raccapezziamoci, vuoi sederti un tratto? Signora....-- + +La signora Laura intese com'egli le chiedesse licenza di fermarsi +ancora qualche minuto, e fe' per tornare nel salotto. + +--Oh, mi rincresce di recar fastidio....--ripigliò Felicino,--ma +proprio non capisco... non ricordo più perchè io sia tornato +quassù....-- + +E il povero Magnasco, cavato di tasca il fazzoletto, si andava +asciugando il sudore che gli gocciolava in copia dalla fronte. + +--Ecco...,--diss'egli, come furono nel salotto,--mi ricordo.... Appena +ti ho lasciato, son corso verso casa.... Ma ho trovato degli amici +sotto i portici del teatro Carlo Felice, che uscivano da cena.... Essi +mi hanno trattenuto colle loro chiacchiere.... Poi, sono andato a +casa... ma giunto a mezza scala, mi avvedo che ho dimenticata la +chiave. Dove posso averla lasciata, se iersera l'avevo? Allora ho +pensato che il mio pastrano l'avevo riposto nella tua anticamera, e +che per conseguenza.... Ma permettimi, vo subito a vederci; di certo +la è cascata in qualche cantuccio....-- + +E senza aspettar altro, Felicino Magnasco, che non aveva ancora alzati +gli occhi verso la sua cugina, uscì a precipizio dal salotto. + +--Or bene, che si fa?--chiese Roberto alla signora Laura. + +--Che si fa?--rispose ella.--Raccontargli.... È il partito migliore. + +--Oh no, signora, nemmeno per sogno!--disse Roberto.--Egli crederà che +lo si voglia ingannare. Non c'è di peggio che la verità. E poi avete +voi un gran tornaconto a scolparvi con lui? Già voi lo amate? + +--Ma che! vi pare? + +--Dunque.... + +--Dunque, ditegli ciò che vorrete. + +--Ampia facoltà?... + +--Pieni poteri.-- + +Era tempo che s'intendessero; Felicino tornava nel salotto. + +--Ecco la chiave!--gridò egli, entrando col prezioso arnese tra le +dita.--Essa era a terra, di costa al tavolino. + +--Anch'io ho trovato la mia!--borbottò Roberto Fenoglio, guardando di +sott'occhi madonna Laura. + +Quindi, fattasi scorrere la palma della mano sulla fronte, come un +uomo che ha presa una deliberazione, entrò a parlare in tal guisa. + +--Felicino, amico mio, ti presento mia moglie! + +--Tua moglie!-- + +Questo grido uscì dalla bocca di Felicino Magnasco, come il «_tu +quoque, Brute, fili mi_?» dalla bocca di Cesare. In quel grido si +distingueva la meraviglia, l'ironia, il rimprovero, e Dio sa quante +altre cose ancora! + +Roberto Fenoglio non s'era vantato oltre i suoi meriti, dicendo com'ei +fosse nato per far l'oratore. Il discorso che gli venne fuori in +quella difficilissima occasione, comunque spezzato dalle necessità del +dialogo, lo ha collocato (nella mia stima, s'intende) all'altezza di +Cicerone e di Demostene. + +--Felicino,--diss'egli, con accento grave che dimandava altrettanta +gravità dal suo uditore,--ricapitoliamo, e t'avvedrai di non poter +darmi il torto. + +--Ah, vedremo!--rispose Magnasco. + +--Sicuro, vedremo, e da senno, non già per mo' d'ironia, come tu dici. +E prima di tutto, che cosa sapevo io de' tuoi disegni matrimoniali con +tua cugina? Innanzi che la signora Laura Moneglia diventasse la +signora Laura Fenoglio, potevo io prevedere che un amico mio l'avrebbe +un giorno chiesta in matrimonio? ed anco pensandolo in anticipazione, +dovevo far io, era egli ragionevole di chiedermi il sovrumano +sacrifizio di rinunziare alla sua mano... che è così bella? Tu non +sarai così crudele da aver di cosiffatte pretensioni, Felicino mio, +non è egli vero? Tu non vorrai inoltre negli amici tuoi, per atto di +amicizia, il dono della profezia! + +--No certo, io non pretendo tanto. + +--Or bene? che colpa puoi tu fare a me, se ho sposato la tua leggiadra +e nobilissima cugina... se un matrimonio clandestino.... + +--Ma, signore...--entrò a dir Laura con aria turbata. + +--Or bene?--disse voltandosi a lei, Roberto Fenoglio.--E i pieni +poteri?--E nell'accento, come nello sguardo di Roberto, c'era tanta +malinconia, che madonna Laura si diè quasi per vinta, e ricadde colla +sua bella testolina inerte sulla poltrona. + +Roberto Fenoglio proseguì volgendosi all'amico Magnasco: + +--Io te lo ripeto, che colpa ci ho? Stanotte tu mi cogli alla +sprovveduta, mi tiri un colpo a bruciapelo, chiedendomi di renderti +servizio presso la tua signora cugina.... Io casco dalle nuvole.... +Non so risponderti... non so dirti, spiattellarti la verità... piglio +tempo, per aspettare il tuo ritorno e raccontarti a mente serena ogni +cosa... ma ecco, tu capiti cinque ore prima; mi trovi solo colla mia +signora... che colpa ci ho io? + +--Sta bene;--rispose Felicino, mettendo fuori le parole a stento,--ma +tutto ciò non è molto chiaro. A qual pro un matrimonio clandestino? + +--Ah, per cotesto ti assicuro, Felicino, che ci abbiam avute le nostre +gran ragioni. Io te lo dirò poi.... se la mia signora consentirà. + +--Felice, io vi giuro....--incominciò la signora Laura. + +--Che se non fosse mia moglie,--proseguì prontamente Roberto, dandole +sulla voce con molta accortezza,--tu non l'avresti colta in casa mia, +sola, a notte inoltrata. + +--Mi congratulo con gli sposi!--soggiunse Felicino colla sua aria +imbronciata.--Ma ormai non ci sarà più ragione a nascondere il fatto, +e tu farai pubblica la nuova delle tue contentezze. + +--Sì, certo, domani stesso; le ragioni che ci hanno fatto tacere e +dissimulare fin qui, son cessate; non è egli vero, Laura? + +--Voi siete crudele!--mormorò la signora. + +--Vi ho già detto,--soggiunse egli, curvando la persona verso di lei +per parlarle a mezza voce,--che la verità non sarebbe stata creduta. + +--Mi accorgo,--notò Felicino,--che ci avete delle tenerezze a dirvi, e +me ne vado. Già non ho sonno, e andrò a fare una cavalcata. Hai veduto +il mio baio, Fenoglio? + +--Sì, un bell'animale; ma aspetta, usciamo anche noi.-- + +Il bel cuginetto diede una girata sui tacchi, e se ne andò ad ammirare +un quadro appiccato all'opposta parete. + +Madonna Laura, a sentirlo parlare come aveva fatto allora, fu +costretta a pensare che il suo cugino non si pigliava po' poi grande +rammarico della sua perdita. + +Felicino era un uomo del suo secolo, o per dir meglio, del suo mezzo +secolo. Il decimonono va diviso in due periodi; il primo è di _Jacopo +Ortis_; il secondo di.... manca il nome, perchè ancora manca il libro, +ma i lettori capiscono. + +Intanto Roberto conduceva la signora Laura verso la strombatura di una +finestra. + +--Signora, vi chiedo scusa, ma già ve lo avevo detto. + +--Sì, sì, ho inteso; m'avete reso pan per +focaccia. + +--Accettate il mio pane? + +--Ne parleremo più tardi. + +--No; ora io debbo mutar registro con vostro cugino. La verità, detta +adesso, senza ch'egli possa sospettare che si voglia mendicar pretesti +con lui, può essere, deve essere creduta. + +--Ma, signore.... + +--Signora....-- + +Dicendo questa parola, Roberto aveva le lagrime agli occhi. Laura se +ne addiede, e gli stese affettuosamente la mano. + +--Ah!--gridò egli balzando una spanna da terra. + +--Che cosa c'è?--chiese Felicino, voltandosi indietro. + +--C'è, Felicino mio, che la tua bella cugina non è altrimenti mia +moglie. + +--Come? che dici tu? + +--Cioè.... mi correggo.... non lo è ancora, ma lo sarà tra breve. +Perdonami, Felicino, ma la gioia mi soffoca. Io non conoscevo tua +cugina. Un caso, nota, un mero caso l'ha condotta qua, questa notte, +per l'uscio che tu, nell'andartene hai lasciato aperto.... + +--Ah, diamine! + +--Sì, tutto ciò sarebbe troppo lungo a narrarsi ora, ma lo saprai per +filo e per segno più tardi. Il fatto sta che un tessuto di bizzarre +avventure ci ha condotto a questo punto, e che adesso, per la prima +volta, la mia divina fidanzata mi ha sporto la mano. + +--Adesso!--esclamò Felicino stupefatto. + +--Adesso, mentre tu stavi guardando quella incisione del Morghen, che +io ti regalo, se la ti va a genio. + +--No, grazie; non saprei dove metterla. + +--Come ti piace; ma dimmi, che ora fai? + +--Che domanda balzana! + +--Per carità, Felicino, te ne prego, che ora fai? Felicino guardò +l'oriuolo. + +--Le sei e un quarto!--diss'egli--sei rappattumato cogli orologi? + +--Sì, Felicino mio; ne comprerò dieci, venti, trenta, ne riempirò +tutte le camere, tutti i bugigattoli di casa; ma tutti segneranno le +sei e un quarto, eternamente le sei e un quarto. + +--Bravo!--soggiunse Magnasco, sforzandosi a sorridere e non venendo a +capo che di fare una smorfia.--Così non ti seccheranno col loro _tran +tran_. + +--Certamente; _tu dixisti_! A proposito del _tran_ _tran_, sai tu, +Felicino, che m'hai fatto un vero regalo colla tua teoria dell'ignoto, +del dio Caso e del ragionare coi piedi? Senza quel tuo discorso +eminentemente filosofico, io sarei andato a letto, in cambio di +starmene sdraiato su questo canapè ad aspettare l'ignoto. L'ignoto non +sarebbe venuto senza quell'uscio che tu lasciasti aperto, e il dio +Caso non avrebbe potuto rompere la monotonia dei miei giorni. +Felicino, amico mio; una stretta di mano, e non aver rancore contro il +tuo amico, se gli è stamane più felice di te. Ah, che cosa ne dici di +questo? + +--Grazioso, e me lo merito! Ma tu mi +racconterai.... + +--Sì, tutto.... se la mia bella fidanzata lo consentirà. + +--Perchè no?--soggiunse madonna Laura.--Qui non c'è nulla che non si +possa raccontare. Ma andiamo, che già gli è giorno chiaro. + +--Cugina,--disse Felicino Magnasco,--mi permettete di offrirvi il +braccio? Il mio Roberto non ne sarà mica geloso? + +--Oh, spero di no!--rispose ella, volgendo a Roberto una di quelle +occhiate che solo le donne sanno dare, e nelle grandi occasioni. + + + + +VI. + + +Lettrici e lettori, qui la mia storia sarebbe finita; ma perchè non +abbiate a dire che io vi ho piantati sul più bello, aggiungerò ancora +poche note, a guisa di epilogo. + +E _in primis_ vi dirò che, quaranta giorni appresso, Laura Moneglia, +la leggiadra vedova (vedova di due mesi di matrimonio con un decrepito +zio) andava a seconde nozze, anzi a prime, coll'avvocato Roberto +Fenoglio. + +La cerimonia fu fatta nella aristocratica chiesa della Maddalena. +C'erano parecchi amici, e tra essi Felicino Magnasco, il quale aveva +finalmente saputo tutti i particolari di quella notte bizzarra, e +ancora non potea darsene pace. + +Gli sposi, appena ebbero detto il dolcissimo sì, partirono alla volta +della campagna. Non talentava loro di andare a Parigi, nè a Londra, nè +cullare i primi giorni di amore tra la polvere delle strade maestre, +l'ingombro delle valigie e la inevitabile filatessa prosaica delle +mille necessità di viaggio, nè far confidente di susurrati discorsi +leggiadri il cortinaggio ristucco di un letto di locanda. + +Se ne andarono in quella vece ad una villeggiatura di Roberto, posta +mirabilmente su di una collina, di rincontro al mare, graziosa +palazzina di due piani, contornata di fiori, con due falde di vigneti +e di boscaglie, i vigneti a solatìo, le boscaglie a bacìo. I primi +tepori della primavera rinverdivano la natura, smaltando di gaie tinte +il fondo del più bel quadro d'amore che mai potesse immaginare una +mente d'artista. + +Colassù non vedevano alcuno, nè d'alcuno avevano, o cercavano, +notizia. Giungevano lettere e le lasciavano chiuse nella sopraccarta; +i giornali s'affastellavano sui canterani, accanto alla parete, colla +fascia intatta. + +Come fu passato un mese di quella vita, si ricordarono un giorno che +avevano promesso di tornare a Genova: ma se ne ricordarono per +guardarsi in viso, ridendo, e dirsi a vicenda che amici e congiunti +potevano aspettarli ancora un bel pezzo. + +Insomma, ve l'ho a dire? non si mossero per tutta l'estate, e +sarebbero anco rimasti fino a tardo autunno, se la signora Laura non +avesse proprio dovuto andare in città, per certi apprestamenti che +l'accorta lettrice indovina.... + +Il dì della partenza, scesero la collina a passi lenti.... Ella non +era così leggiadra come il primo giorno che era salita lassù, e aveva +bisogno d'un saldo appoggio al braccio di Roberto. + +Ella e lui, si voltavano indietro ad ogni passo, per guardare il loro +bel nido, che splendeva di rincontro al sole, e andavano ripetendo a +vicenda: «Torneremo? torneremo questa primavera. Oh come ci parrà +lungo il tempo!» + +E tornarono; ci tornarono tutti gli anni seguenti, e ci torneranno +quest'altro, innamorati come prima, circondati dalla più vispa, dalla +più ricciuta e dalla più leggiadra famigliuola, che abbia mai potuto +desiderare, nei suoi sogni di paternità, il vostro umilissimo servo. + + + +FINE. EOT; + + /* + End of Project Gutenberg's Una notte bizzarra, by Anton Giulio Barrili + + *** END OF THIS PROJECT GUTENBERG EBOOK UNA NOTTE BIZZARRA *** + + ***** This file should be named 29636-8.txt or 29636-8.zip ***** + This and all associated files of various formats will be found in: + http://www.gutenberg.org/2/9/6/3/29636/ + + Produced by Claudio Paganelli, Carlo Traverso and the + Online Distributed Proofreading Team at http://www.pgdp.net + (This file was produced from images generously made + available by The Internet Archive/Canadian Libraries) + + Updated editions will replace the previous one--the old editions + will be renamed. + + Creating the works from public domain print editions means that no + one owns a United States copyright in these works, so the Foundation + (and you!) can copy and distribute it in the United States without + permission and without paying copyright royalties. Special rules, + set forth in the General Terms of Use part of this license, apply to + copying and distributing Project Gutenberg-tm electronic works to + protect the PROJECT GUTENBERG-tm concept and trademark. Project + Gutenberg is a registered trademark, and may not be used if you + charge for the eBooks, unless you receive specific permission. If you + do not charge anything for copies of this eBook, complying with the + rules is very easy. You may use this eBook for nearly any purpose + such as creation of derivative works, reports, performances and + research. They may be modified and printed and given away--you may do + practically ANYTHING with public domain eBooks. Redistribution is + subject to the trademark license, especially commercial + redistribution. + + *** START: FULL LICENSE *** + + THE FULL PROJECT GUTENBERG LICENSE + PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK + + To protect the Project Gutenberg-tm mission of promoting the free + distribution of electronic works, by using or distributing this work + (or any other work associated in any way with the phrase "Project + Gutenberg"), you agree to comply with all the terms of the Full Project + Gutenberg-tm License (available with this file or online at + http://gutenberg.org/license). + + Section 1. General Terms of Use and Redistributing Project Gutenberg-tm + electronic works + + 1.A. By reading or using any part of this Project Gutenberg-tm + electronic work, you indicate that you have read, understand, agree to + and accept all the terms of this license and intellectual property + (trademark/copyright) agreement. If you do not agree to abide by all + the terms of this agreement, you must cease using and return or destroy + all copies of Project Gutenberg-tm electronic works in your possession. + If you paid a fee for obtaining a copy of or access to a Project + Gutenberg-tm electronic work and you do not agree to be bound by the + terms of this agreement, you may obtain a refund from the person or + entity to whom you paid the fee as set forth in paragraph 1.E.8. + + 1.B. "Project Gutenberg" is a registered trademark. It may only be + used on or associated in any way with an electronic work by people who + agree to be bound by the terms of this agreement. There are a few + things that you can do with most Project Gutenberg-tm electronic works + even without complying with the full terms of this agreement. See + paragraph 1.C below. There are a lot of things you can do with Project + Gutenberg-tm electronic works if you follow the terms of this agreement + and help preserve free future access to Project Gutenberg-tm electronic + works. See paragraph 1.E below. + + 1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation" + or PGLAF), owns a compilation copyright in the collection of Project + Gutenberg-tm electronic works. Nearly all the individual works in the + collection are in the public domain in the United States. If an + individual work is in the public domain in the United States and you are + located in the United States, we do not claim a right to prevent you from + copying, distributing, performing, displaying or creating derivative + works based on the work as long as all references to Project Gutenberg + are removed. Of course, we hope that you will support the Project + Gutenberg-tm mission of promoting free access to electronic works by + freely sharing Project Gutenberg-tm works in compliance with the terms of + this agreement for keeping the Project Gutenberg-tm name associated with + the work. You can easily comply with the terms of this agreement by + keeping this work in the same format with its attached full Project + Gutenberg-tm License when you share it without charge with others. + + 1.D. The copyright laws of the place where you are located also govern + what you can do with this work. Copyright laws in most countries are in + a constant state of change. If you are outside the United States, check + the laws of your country in addition to the terms of this agreement + before downloading, copying, displaying, performing, distributing or + creating derivative works based on this work or any other Project + Gutenberg-tm work. The Foundation makes no representations concerning + the copyright status of any work in any country outside the United + States. + + 1.E. Unless you have removed all references to Project Gutenberg: + + 1.E.1. The following sentence, with active links to, or other immediate + access to, the full Project Gutenberg-tm License must appear prominently + whenever any copy of a Project Gutenberg-tm work (any work on which the + phrase "Project Gutenberg" appears, or with which the phrase "Project + Gutenberg" is associated) is accessed, displayed, performed, viewed, + copied or distributed: + + This eBook is for the use of anyone anywhere at no cost and with + almost no restrictions whatsoever. You may copy it, give it away or + re-use it under the terms of the Project Gutenberg License included + with this eBook or online at www.gutenberg.org + + 1.E.2. If an individual Project Gutenberg-tm electronic work is derived + from the public domain (does not contain a notice indicating that it is + posted with permission of the copyright holder), the work can be copied + and distributed to anyone in the United States without paying any fees + or charges. If you are redistributing or providing access to a work + with the phrase "Project Gutenberg" associated with or appearing on the + work, you must comply either with the requirements of paragraphs 1.E.1 + through 1.E.7 or obtain permission for the use of the work and the + Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or + 1.E.9. + + 1.E.3. If an individual Project Gutenberg-tm electronic work is posted + with the permission of the copyright holder, your use and distribution + must comply with both paragraphs 1.E.1 through 1.E.7 and any additional + terms imposed by the copyright holder. Additional terms will be linked + to the Project Gutenberg-tm License for all works posted with the + permission of the copyright holder found at the beginning of this work. + + 1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm + License terms from this work, or any files containing a part of this + work or any other work associated with Project Gutenberg-tm. + + 1.E.5. Do not copy, display, perform, distribute or redistribute this + electronic work, or any part of this electronic work, without + prominently displaying the sentence set forth in paragraph 1.E.1 with + active links or immediate access to the full terms of the Project + Gutenberg-tm License. + + 1.E.6. You may convert to and distribute this work in any binary, + compressed, marked up, nonproprietary or proprietary form, including any + word processing or hypertext form. However, if you provide access to or + distribute copies of a Project Gutenberg-tm work in a format other than + "Plain Vanilla ASCII" or other format used in the official version + posted on the official Project Gutenberg-tm web site (www.gutenberg.org), + you must, at no additional cost, fee or expense to the user, provide a + copy, a means of exporting a copy, or a means of obtaining a copy upon + request, of the work in its original "Plain Vanilla ASCII" or other + form. Any alternate format must include the full Project Gutenberg-tm + License as specified in paragraph 1.E.1. + + 1.E.7. Do not charge a fee for access to, viewing, displaying, + performing, copying or distributing any Project Gutenberg-tm works + unless you comply with paragraph 1.E.8 or 1.E.9. + + 1.E.8. You may charge a reasonable fee for copies of or providing + access to or distributing Project Gutenberg-tm electronic works provided + that + + - You pay a royalty fee of 20% of the gross profits you derive from + the use of Project Gutenberg-tm works calculated using the method + you already use to calculate your applicable taxes. The fee is + owed to the owner of the Project Gutenberg-tm trademark, but he + has agreed to donate royalties under this paragraph to the + Project Gutenberg Literary Archive Foundation. Royalty payments + must be paid within 60 days following each date on which you + prepare (or are legally required to prepare) your periodic tax + returns. Royalty payments should be clearly marked as such and + sent to the Project Gutenberg Literary Archive Foundation at the + address specified in Section 4, "Information about donations to + the Project Gutenberg Literary Archive Foundation." + + - You provide a full refund of any money paid by a user who notifies + you in writing (or by e-mail) within 30 days of receipt that s/he + does not agree to the terms of the full Project Gutenberg-tm + License. You must require such a user to return or + destroy all copies of the works possessed in a physical medium + and discontinue all use of and all access to other copies of + Project Gutenberg-tm works. + + - You provide, in accordance with paragraph 1.F.3, a full refund of any + money paid for a work or a replacement copy, if a defect in the + electronic work is discovered and reported to you within 90 days + of receipt of the work. + + - You comply with all other terms of this agreement for free + distribution of Project Gutenberg-tm works. + + 1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm + electronic work or group of works on different terms than are set + forth in this agreement, you must obtain permission in writing from + both the Project Gutenberg Literary Archive Foundation and Michael + Hart, the owner of the Project Gutenberg-tm trademark. Contact the + Foundation as set forth in Section 3 below. + + 1.F. + + 1.F.1. Project Gutenberg volunteers and employees expend considerable + effort to identify, do copyright research on, transcribe and proofread + public domain works in creating the Project Gutenberg-tm + collection. Despite these efforts, Project Gutenberg-tm electronic + works, and the medium on which they may be stored, may contain + "Defects," such as, but not limited to, incomplete, inaccurate or + corrupt data, transcription errors, a copyright or other intellectual + property infringement, a defective or damaged disk or other medium, a + computer virus, or computer codes that damage or cannot be read by + your equipment. + + 1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right + of Replacement or Refund" described in paragraph 1.F.3, the Project + Gutenberg Literary Archive Foundation, the owner of the Project + Gutenberg-tm trademark, and any other party distributing a Project + Gutenberg-tm electronic work under this agreement, disclaim all + liability to you for damages, costs and expenses, including legal + fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT + LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE + PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE + TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE + LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR + INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH + DAMAGE. + + 1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a + defect in this electronic work within 90 days of receiving it, you can + receive a refund of the money (if any) you paid for it by sending a + written explanation to the person you received the work from. If you + received the work on a physical medium, you must return the medium with + your written explanation. The person or entity that provided you with + the defective work may elect to provide a replacement copy in lieu of a + refund. If you received the work electronically, the person or entity + providing it to you may choose to give you a second opportunity to + receive the work electronically in lieu of a refund. If the second copy + is also defective, you may demand a refund in writing without further + opportunities to fix the problem. + + 1.F.4. Except for the limited right of replacement or refund set forth + in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER + WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO + WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE. + + 1.F.5. Some states do not allow disclaimers of certain implied + warranties or the exclusion or limitation of certain types of damages. + If any disclaimer or limitation set forth in this agreement violates the + law of the state applicable to this agreement, the agreement shall be + interpreted to make the maximum disclaimer or limitation permitted by + the applicable state law. The invalidity or unenforceability of any + provision of this agreement shall not void the remaining provisions. + + 1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the + trademark owner, any agent or employee of the Foundation, anyone + providing copies of Project Gutenberg-tm electronic works in accordance + with this agreement, and any volunteers associated with the production, + promotion and distribution of Project Gutenberg-tm electronic works, + harmless from all liability, costs and expenses, including legal fees, + that arise directly or indirectly from any of the following which you do + or cause to occur: (a) distribution of this or any Project Gutenberg-tm + work, (b) alteration, modification, or additions or deletions to any + Project Gutenberg-tm work, and (c) any Defect you cause. + + + Section 2. Information about the Mission of Project Gutenberg-tm + + Project Gutenberg-tm is synonymous with the free distribution of + electronic works in formats readable by the widest variety of computers + including obsolete, old, middle-aged and new computers. It exists + because of the efforts of hundreds of volunteers and donations from + people in all walks of life. + + Volunteers and financial support to provide volunteers with the + assistance they need, are critical to reaching Project Gutenberg-tm's + goals and ensuring that the Project Gutenberg-tm collection will + remain freely available for generations to come. In 2001, the Project + Gutenberg Literary Archive Foundation was created to provide a secure + and permanent future for Project Gutenberg-tm and future generations. + To learn more about the Project Gutenberg Literary Archive Foundation + and how your efforts and donations can help, see Sections 3 and 4 + and the Foundation web page at http://www.pglaf.org. + + Section 3. Information about the Project Gutenberg Literary Archive + Foundation + + The Project Gutenberg Literary Archive Foundation is a non profit + 501(c)(3) educational corporation organized under the laws of the + state of Mississippi and granted tax exempt status by the Internal + Revenue Service. The Foundation's EIN or federal tax identification + number is 64-6221541. Its 501(c)(3) letter is posted at + http://pglaf.org/fundraising. Contributions to the Project Gutenberg + Literary Archive Foundation are tax deductible to the full extent + permitted by U.S. federal laws and your state's laws. + + The Foundation's principal office is located at 4557 Melan Dr. S. + Fairbanks, AK, 99712., but its volunteers and employees are scattered + throughout numerous locations. Its business office is located at + 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email + business@pglaf.org. Email contact links and up to date contact + information can be found at the Foundation's web site and official + page at http://pglaf.org + + For additional contact information: + Dr. Gregory B. Newby + Chief Executive and Director + gbnewby@pglaf.org + + Section 4. Information about Donations to the Project Gutenberg + Literary Archive Foundation + + Project Gutenberg-tm depends upon and cannot survive without wide + spread public support and donations to carry out its mission of + increasing the number of public domain and licensed works that can be + freely distributed in machine readable form accessible by the widest + array of equipment including outdated equipment. Many small donations + ($1 to $5,000) are particularly important to maintaining tax exempt + status with the IRS. + + The Foundation is committed to complying with the laws regulating + charities and charitable donations in all 50 states of the United + States. Compliance requirements are not uniform and it takes a + considerable effort, much paperwork and many fees to meet and keep up + with these requirements. We do not solicit donations in locations + where we have not received written confirmation of compliance. To + SEND DONATIONS or determine the status of compliance for any + particular state visit http://pglaf.org + + While we cannot and do not solicit contributions from states where we + have not met the solicitation requirements, we know of no prohibition + against accepting unsolicited donations from donors in such states who + approach us with offers to donate. + + International donations are gratefully accepted, but we cannot make + any statements concerning tax treatment of donations received from + outside the United States. U.S. laws alone swamp our small staff. + + Please check the Project Gutenberg Web pages for current donation + methods and addresses. Donations are accepted in a number of other + ways including checks, online payments and credit card donations. + To donate, please visit: http://pglaf.org/donate + + Section 5. General Information About Project Gutenberg-tm electronic + works. + + Professor Michael S. Hart is the originator of the Project Gutenberg-tm + concept of a library of electronic works that could be freely shared + with anyone. For thirty years, he produced and distributed Project + Gutenberg-tm eBooks with only a loose network of volunteer support. + + Project Gutenberg-tm eBooks are often created from several printed + editions, all of which are confirmed as Public Domain in the U.S. + unless a copyright notice is included. Thus, we do not necessarily + keep eBooks in compliance with any particular paper edition. + + Most people start at our Web site which has the main PG search facility: + + http://www.gutenberg.org + + This Web site includes information about Project Gutenberg-tm, + including how to make donations to the Project Gutenberg Literary + Archive Foundation, how to help produce our new eBooks, and how to + subscribe to our email newsletter to hear about new eBooks. + */ } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php b/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php index 55bcc629..9cb9a71b 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php @@ -628,10 +628,12 @@ EOT; $chars = static::split($text); $last = end($chars); } + // if the last char is a not-valid-end punctuation, remove it if (in_array($last, static::$notEndPunct, false)) { $text = preg_replace('/.$/u', '', $text); } + // if the last char is not a valid punctuation, append a default one. return in_array($last, static::$endPunct, false) ? $text : $text . '。'; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php index 4663a748..75efebf8 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php @@ -54,8 +54,6 @@ class Company extends \Faker\Provider\Company * * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fbus_business%2Ffor_businessmen%2Farticle%2Fbusiness_identification_number&lang=en * - * @param \DateTime $registrationDate - * * @return string 12 digits, like 150140000019 */ public static function businessIdentificationNumber(\DateTime $registrationDate = null) diff --git a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php index 61852a21..353dfae4 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php @@ -207,8 +207,7 @@ class Person extends \Faker\Provider\Person * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fcitizen_migration%2Fpassport_id_card%2Farticle%2Fiin_info&lang=en * @see https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D0%B4%D0%B8%D0%B2%D0%B8%D0%B4%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80 * - * @param \DateTime $birthDate - * @param int $gender + * @param int $gender * * @return string 12 digits, like 780322300455 */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php index 99ca87bc..570eecfb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php @@ -238,7 +238,7 @@ class Person extends \Faker\Provider\Person * @see http://www.horoskopai.lt/gaires/populiariausios-pavardes-lietuvoje/ */ protected static $lastNameMale = [ - 'Kazlaukas', 'Jankauskas', 'Petrauskas', 'Stankevičius', 'Vasiliauskas', 'Žukauskas', 'Butkus', + 'Kazlauskas', 'Jankauskas', 'Petrauskas', 'Stankevičius', 'Vasiliauskas', 'Žukauskas', 'Butkus', 'Kateiva', 'Paulauskas', 'Urbonas', 'Kavaliauskas', 'Baranauskas', 'Pocius', 'Sakalauskas', ]; @@ -325,9 +325,8 @@ class Person extends \Faker\Provider\Person * @see https://en.wikipedia.org/wiki/National_identification_number#Lithuania * @see https://lt.wikipedia.org/wiki/Asmens_kodas * - * @param string $gender [male|female] - * @param \DateTime $birthdate - * @param string $randomNumber three integers + * @param string $gender [male|female] + * @param string $randomNumber three integers * * @return string on format XXXXXXXXXXX */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php index fc8db5c1..0bddcc53 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php @@ -12,7 +12,7 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%#']; - protected static $postcode = ['LV ####']; + protected static $postcode = ['LV-####']; /** * @see https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php index d251f891..21396717 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php @@ -2,7 +2,6 @@ namespace Faker\Provider\lv_LV; -use Faker\Calculator\Luhn; use Faker\Provider\DateTime; class Person extends \Faker\Provider\Person @@ -135,8 +134,6 @@ class Person extends \Faker\Provider\Person * * @see https://en.wikipedia.org/wiki/National_identification_number#Latvia * - * @param \DateTime $birthdate - * * @return string on format XXXXXX-XXXXX */ public function personalIdentityNumber(\DateTime $birthdate = null) @@ -145,11 +142,32 @@ class Person extends \Faker\Provider\Person $birthdate = DateTime::dateTimeThisCentury(); } + $year = $birthdate->format('Y'); + + if ($year >= 2000 && $year <= 2099) { + $century = 2; + } elseif ($year >= 1900 && $year <= 1999) { + $century = 1; + } else { + $century = 0; + } + $datePart = $birthdate->format('dmy'); - $randomDigits = (string) static::numerify('####'); + $serialNumber = static::numerify('###'); - $checksum = Luhn::computeCheckDigit($datePart . $randomDigits); + $partialNumberSplit = str_split($datePart . $century . $serialNumber); - return $datePart . '-' . $randomDigits . $checksum; + $idDigitValidator = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + $total = 0; + + foreach ($partialNumberSplit as $key => $digit) { + if (isset($idDigitValidator[$key])) { + $total += $idDigitValidator[$key] * (int) $digit; + } + } + + $checksumDigit = (1101 - $total) % 11 % 10; + + return $datePart . '-' . $century . $serialNumber . $checksumDigit; } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php index 1cd011bf..d685715d 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php @@ -792,6 +792,7 @@ class Person extends \Faker\Provider\Person // gender digit. Odd = MALE, Even = FEMALE $g = self::numberBetween(0, 9); + //Credit: https://gist.github.com/mauris/3629548 if ($gender === static::GENDER_MALE) { $g = $g | 1; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php index dff5d2dd..8ee85cac 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php @@ -134,7 +134,7 @@ class Person extends \Faker\Provider\Person 'Abdirahim', 'Abdirahman', 'Abdirashid', 'Abdirizak', 'Abdul', 'Abdulahi', 'Abdulkadir', 'Abdullah', 'Abdullahi', 'Abdulqadir', 'Abdurahman', 'Abed', 'Abel', 'Abid', 'Abraham', 'Absalon', 'Abu', 'Abubakar', 'Adam', 'Adan', 'Adeel', 'Adelheid', 'Adelsten', 'Adem', 'Aden', 'Adham', 'Adi', 'Adil', 'Adis', 'Adler', - 'Admir', 'Adnan', 'Adolf', 'Adrian', 'Afanasi', 'Afrim', 'Afshin', 'Agim', 'Agmund', 'Agnar', 'Agvald', 'Ahmad', + 'Admir', 'Adnan', 'Adrian', 'Afanasi', 'Afrim', 'Afshin', 'Agim', 'Agmund', 'Agnar', 'Agvald', 'Ahmad', 'Ahmed', 'Aiden', 'Ailo', 'Aimar', 'Aime', 'Ajdin', 'Ajmal', 'Akam', 'Akbar', 'Akram', 'Aksel', 'Alain', 'Alan', 'Alban', 'Albert', 'Alberto', 'Albin', 'Albrecht', 'Alejandro', 'Aleksander', 'Alen', 'Alessandro', 'Alex', 'Alexander', 'Alexsander', 'Alf', 'Alfred', 'Algirdas', 'Algot', 'Ali', 'Allan', 'Almar', 'Almas', 'Almaz', @@ -288,8 +288,7 @@ class Person extends \Faker\Provider\Person * * @see https://no.wikipedia.org/wiki/Personnummer * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYY##### */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Payment.php b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Payment.php index 05fd70ed..e825340a 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Payment.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Payment.php @@ -44,6 +44,6 @@ class Payment extends \Faker\Provider\Payment $checksum = 97 - fmod($firstSeven, 97); // '0' + 7 numbers + checksum - return sprintf('%s0%s%s', $prefix, $firstSeven, $checksum); + return sprintf('%s0%s%02d', $prefix, $firstSeven, $checksum); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php index f4a60f96..55d6f18e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php @@ -73,17 +73,17 @@ class Person extends \Faker\Provider\Person ]; /** - * Belgian Rijksregister numbers are used to identify each citizen, - * it consists of three parts, the person's day of birth, in the - * format 'ymd', followed by a number between 1 and 997, odd for - * males, even for females. The last part is used to check if it's - * a valid number. + * Belgian Rijksregister numbers are used to identify each citizen, + * it consists of three parts, the person's day of birth, in the + * format 'ymd', followed by a number between 1 and 997, odd for + * males, even for females. The last part is used to check if it's + * a valid number. * * @see https://nl.wikipedia.org/wiki/Rijksregisternummer * - * @param string|null $gender 'male', 'female' or null for any + * @param string|null $gender 'male', 'female' or null for any * - * @return string + * @return string */ public static function rrn($gender = null) { diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php index ca42cb8c..a7b01bbb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php @@ -99,101 +99,97 @@ class Address extends \Faker\Provider\Address * @see http://www.poczta-polska.pl/ */ protected static $street = [ - '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa Władysława', 'Armii Krajowej', - 'Asnyka Adama', 'Astrów', 'Azaliowa', 'Baczyńskiego Krzysztofa Kamila', 'Bałtycka', - 'Barlickiego Norberta', 'Batalionów Chłopskich', 'Batorego Stefana', 'Bema Józefa', - 'Bema Józefa', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', - 'Boczna', 'Bogusławskiego Wojciecha', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', - 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego Władysława', - 'Brzechwy Jana', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', - 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego Józefa', - 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', 'Chrobrego Bolesława', - 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej Marii', - 'Czarnieckiego Stefana', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego Ignacego', - 'Dąbrowskiego Jana Henryka', 'Dąbrowskiego Jarosława', 'Dąbrowskiego Jarosława', - 'Dąbrowskiej Marii', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', - 'Długosza Jana', 'Dmowskiego Romana', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały Michała', - 'Dubois Stanisława', 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', - 'Fałata Juliana', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry Aleksandra', - 'Gagarina Jurija', 'Gajowa', 'Gałczyńskiego Konstantego Ildefonsa', 'Gdańska', 'Gdyńska', - 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego Bartosza', 'Główna', 'Gminna', 'Gnieźnieńska', - 'Gojawiczyńskiej Poli', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', - 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego Stefana', - 'Grottgera Artura', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera Józefa', 'Handlowa', - 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza Jarosława', - 'Jagiellońska', 'Jagiellońskie Os.', 'Jagiełły Władysława', 'Jagodowa', 'Jałowcowa', - 'Jana Pawła II', 'Jana Pawła II Al.', 'Jaracza Stefana', 'Jarzębinowa', 'Jaskółcza', - 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Jerozolimskie Al.', 'Jesienna', 'Jesionowa', - 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza Mieczysława', - 'Karpacka', 'Kartuska', 'Kasprowicza Jana', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', - 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego Jana', 'Kleeberga Franciszka', - 'Klonowa', 'Kłosowa', 'Kochanowskiego Jana', 'Kolberga Oskara', 'Kolejowa', 'Kolorowa', - 'Kołłątaja Hugo', 'Kołłątaja Hugona', 'Kołobrzeska', 'Konarskiego Stanisława', - 'Konopnickiej Marii', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika Mikołaja', - 'Koralowa', 'Korczaka Janusza', 'Korfantego Wojciecha', 'Kosmonautów', 'Kossaka Juliusza', - 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki Tadeusza', 'Kościuszki Tadeusza Pl.', - 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego Ignacego', 'Krasińskiego Zygmunta', - 'Kraszewskiego Józefa Ignacego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', - 'Krótka', 'Krucza', 'Kruczkowskiego Leona', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego Janusza', - 'Kwiatkowskiego Eugeniusza', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', - 'Legnicka', 'Lelewela Joachima', 'Leszczynowa', 'Leśmiana Bolesława', 'Leśna', 'Letnia', - 'Ligonia Juliusza', 'Liliowa', 'Limanowskiego Bolesława', 'Lipowa', 'Lisia', 'Litewska', - 'Lompy Józefa', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', - 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka Władysława', 'Łomżyńska', - 'Łowicka', 'Łódzka', 'Łukasiewicza Ignacego', 'Łużycka', 'Maczka Stanisława', - 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego Kornela', 'Malczewskiego Jacka', 'Malinowa', - 'Mała', 'Małachowskiego Stanisława', 'Małopolska', 'Marszałkowska', 'Matejki Jana', - 'Mazowiecka', 'Mazurska', 'Miarki Karola', 'Mickiewicza Adama', 'Miedziana', 'Mieszka I', - 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej Heleny', - 'Modrzewiowa', 'Mokra', 'Moniuszki Stanisława', 'Morcinka Gustawa', 'Morelowa', 'Morska', - 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej Zofii', 'Narutowicza Gabriela', - 'Niecała', 'Niedziałkowskiego Mieczysława', 'Niemcewicza Juliana Ursyna', 'Niepodległości', - 'Niepodległości Al.', 'Niska', 'Norwida Cypriana Kamila', 'Nowa', 'Nowowiejska', 'Nowowiejskiego Feliksa', + '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa', 'Armii Krajowej', + 'Asnyka', 'Astrów', 'Azaliowa', 'Baczyńskiego', 'Bałtycka', 'Barlickiego', 'Batalionów Chłopskich', + 'Batorego', 'Bema', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', + 'Boczna', 'Bogusławskiego', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', + 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego', + 'Brzechwy', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', + 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego', + 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', + 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej', + 'Czarnieckiego', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego', + 'Dąbrowskiego', 'Dąbrowskiej', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', + 'Długosza', 'Dmowskiego', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały', + 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', + 'Fałata', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry', + 'Gagarina', 'Gajowa', 'Gałczyńskiego', 'Gdańska', 'Gdyńska', + 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego', 'Główna', 'Gminna', 'Gnieźnieńska', + 'Gojawiczyńskiej', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', + 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego', + 'Grottgera', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera', 'Handlowa', + 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza', + 'Jagiellońska', 'Os. Jagiellońskie', 'Jagiełły', 'Jagodowa', 'Jałowcowa', + 'Jana Pawła II', 'Al. Jana Pawła II', 'Jaracza', 'Jarzębinowa', 'Jaskółcza', + 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Al. Jerozolimskie', 'Jesienna', 'Jesionowa', + 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza', + 'Karpacka', 'Kartuska', 'Kasprowicza', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', + 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego', 'Kleeberga', + 'Klonowa', 'Kłosowa', 'Kochanowskiego', 'Kolberga', 'Kolejowa', 'Kolorowa', + 'Kołłątaja', 'Kołobrzeska', 'Konarskiego', + 'Konopnickiej', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika', + 'Koralowa', 'Korczaka', 'Korfantego', 'Kosmonautów', 'Kossaka', + 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki', 'Pl. Kościuszki', + 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego', 'Krasińskiego', + 'Kraszewskiego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', + 'Krótka', 'Krucza', 'Kruczkowskiego', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego', + 'Kwiatkowskiego', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', + 'Legnicka', 'Lelewela', 'Leszczynowa', 'Leśmiana', 'Leśna', 'Letnia', + 'Ligonia', 'Liliowa', 'Limanowskiego', 'Lipowa', 'Lisia', 'Litewska', + 'Lompy', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', + 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka', 'Łomżyńska', + 'Łowicka', 'Łódzka', 'Łukasiewicza', 'Łużycka', 'Maczka', + 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego', 'Malczewskiego', 'Malinowa', + 'Mała', 'Małachowskiego', 'Małopolska', 'Marszałkowska', 'Matejki', + 'Mazowiecka', 'Mazurska', 'Miarki', 'Mickiewicza', 'Miedziana', 'Mieszka I', + 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej', + 'Modrzewiowa', 'Mokra', 'Moniuszki', 'Morcinka', 'Morelowa', 'Morska', + 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej', 'Narutowicza', + 'Niecała', 'Niedziałkowskiego', 'Niemcewicza', 'Niepodległości', + 'Al. Niepodległości', 'Niska', 'Norwida', 'Nowa', 'Nowowiejska', 'Nowowiejskiego', 'Nowy Świat', 'Obrońców Westerplatte', 'Odrodzenia', 'Odrzańska', 'Ogrodowa', 'Okopowa', - 'Okólna', 'Okrężna', 'Okrzei Stefana', 'Okulickiego Leopolda', 'Olchowa', 'Olimpijska', - 'Olsztyńska', 'Opolska', 'Orkana Władysława', 'Orla', 'Orzechowa', 'Orzeszkowej Elizy', - 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego Ignacego', 'Parkowa', 'Partyzantów', - 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Piastowskie Os.', 'Piekarska', - 'Piękna', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa Al.', - 'Piotrkowska', 'Piwna', 'Plater Emilii', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', + 'Okólna', 'Okrężna', 'Okrzei', 'Okulickiego', 'Olchowa', 'Olimpijska', + 'Olsztyńska', 'Opolska', 'Orkana', 'Orla', 'Orzechowa', 'Orzeszkowej', + 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego', 'Parkowa', 'Partyzantów', + 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Os. Piastowskie', 'Piekarska', + 'Piękna', 'Piłsudskiego', 'Al. Piłsudskiego', + 'Piotrkowska', 'Piwna', 'Emilii Plater', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', 'Podgórna', 'Podhalańska', 'Podleśna', 'Podmiejska', 'Podwale', 'Pogodna', 'Pokoju', - 'Pola Wincentego', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego Józefa', 'Poniatowskiego Józefa', - 'Popiełuszki Jerzego', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', + 'Wincentego Pola', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego', + 'Popiełuszki', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', 'Powstańców Wielkopolskich', 'Poziomkowa', 'Poznańska', 'Północna', 'Promienna', - 'Prosta', 'Prusa Bolesława', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego Stanisława', - 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego Kazimierza', 'Pułaskiego Kazimierza', - 'Puławska', 'Puszkina Aleksandra', 'Racławicka', 'Radomska', 'Radosna', 'Rataja Macieja', - 'Reja Mikołaja', 'Rejtana Tadeusza', 'Reymonta Władysława', 'Reymonta Władysława Stanisława', + 'Prosta', 'Bolesława Prusa', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego', + 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego', 'Puławska', 'Puszkina', 'Racławicka', + 'Radomska', 'Radosna', 'Rataja', 'Reja', 'Rejtana', 'Reymonta', 'Robotnicza', 'Rodzinna', 'Rolna', 'Rolnicza', 'Równa', 'Różana', 'Rubinowa', 'Rumiankowa', - 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rynek Rynek', 'Rzeczna', 'Rzemieślnicza', - 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej Hanki', 'Sądowa', 'Sąsiedzka', 'Senatorska', - 'Siemiradzkiego Henryka', 'Sienkiewicza Henryka', 'Sienna', 'Siewna', 'Sikorskiego Władysława', - 'Sikorskiego Władysława', 'Skargi Piotra', 'Skargi Piotra', 'Składowa', 'Skłodowskiej-Curie Marii', - 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego Juliusza', 'Słowiańska', - 'Słowicza', 'Sobieskiego Jana', 'Sobieskiego Jana III', 'Sokola', 'Solidarności Al.', - 'Solna', 'Solskiego Ludwika', 'Sosnowa', 'Sowia', 'Sowińskiego Józefa', 'Spacerowa', - 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa Leopolda', 'Stalowa', 'Staromiejska', - 'Starowiejska', 'Staszica Stanisława', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', - 'Struga Andrzeja', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Stwosza Wita', 'Sucha', - 'Sucharskiego Henryka', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', - 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego Karola', - 'Ściegiennego Piotra', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', + 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rzeczna', 'Rzemieślnicza', + 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej', 'Sądowa', 'Sąsiedzka', 'Senatorska', + 'Siemiradzkiego', 'Sienkiewicza', 'Sienna', 'Siewna', + 'Sikorskiego', 'Piotra Skargi', 'Składowa', 'Skłodowskiej-Curie', + 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego', 'Słowiańska', + 'Słowicza', 'Sobieskiego', 'Jana III Sobieskiego', 'Sokola', 'Al. Solidarności', + 'Solna', 'Solskiego', 'Sosnowa', 'Sowia', 'Sowińskiego', 'Spacerowa', + 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa ', 'Stalowa', 'Staromiejska', + 'Starowiejska', 'Staszica', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', + 'Struga', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Wita Stwosza', 'Sucha', + 'Sucharskiego', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', + 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego', + 'Ściegiennego', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', 'Świętojańska', 'Świętokrzyska', 'Targowa', 'Tatrzańska', 'Tęczowa', 'Topolowa', - 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta Romualda', 'Truskawkowa', 'Tulipanowa', - 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima Juliana', 'Tylna', 'Tysiąclecia', 'Ułańska', - 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza Melchiora', 'Wapienna', 'Warmińska', 'Warszawska', - 'Waryńskiego Ludwika', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', - 'Wielkopolska', 'Wieniawskiego Henryka', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', - 'Wiosenna', 'Wiśniowa', 'Witosa Wincentego', 'Władysława IV', 'Wodna', 'Wojska Polskiego', - 'Wojska Polskiego Al.', 'Wolności', 'Wolności Pl.', 'Wolska', 'Wołodyjowskiego Michała', - 'Wrocławska', 'Wronia', 'Wróblewskiego Walerego', 'Wrzosowa', 'Wschodnia', 'Wspólna', - 'Wybickiego Józefa', 'Wysoka', 'Wyspiańskiego Stanisława', 'Wyszyńskiego Stefana', - 'Wyzwolenia', 'Wyzwolenia Al.', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', - 'Zamenhofa Ludwika', 'Zamkowa', 'Zapolskiej Gabrieli', 'Zbożowa', 'Zdrojowa', 'Zgierska', + 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta', 'Truskawkowa', 'Tulipanowa', + 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima', 'Tylna', 'Tysiąclecia', 'Ułańska', + 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza', 'Wapienna', 'Warmińska', 'Warszawska', + 'Waryńskiego', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', + 'Wielkopolska', 'Wieniawskiego', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', + 'Wiosenna', 'Wiśniowa', 'Witosa', 'Władysława IV', 'Wodna', 'Wojska Polskiego', + 'Al. Wojska Polskiego', 'Wolności', 'Pl. Wolności', 'Wolska', 'Wołodyjowskiego', + 'Wrocławska', 'Wronia', 'Wróblewskiego', 'Wrzosowa', 'Wschodnia', 'Wspólna', + 'Wybickiego', 'Wysoka', 'Wyspiańskiego', 'Wyszyńskiego', + 'Wyzwolenia', 'Al. Wyzwolenia', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', + 'Zamenhofa', 'Zamkowa', 'Zapolskiej', 'Zbożowa', 'Zdrojowa', 'Zgierska', 'Zielna', 'Zielona', 'Złota', 'Zwierzyniecka', 'Zwycięstwa', 'Źródlana', 'Żabia', - 'Żeglarska', 'Żelazna', 'Żeromskiego Stefana', 'Żniwna', 'Żołnierska', 'Żółkiewskiego Stanisława', - 'Żurawia', 'Żwirki Franciszka i Wigury Stanisława', 'Żwirki i Wigury', 'Żwirowa', - 'Żytnia', + 'Żeglarska', 'Żelazna', 'Żeromskiego', 'Żniwna', 'Żołnierska', 'Żółkiewskiego', + 'Żurawia', 'Żwirki i Wigury', 'Żwirowa', 'Żytnia', ]; public function city() diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php index 661e4b0b..f6ed7f6b 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php @@ -5,5 +5,5 @@ namespace Faker\Provider\pl_PL; class Internet extends \Faker\Provider\Internet { protected static $freeEmailDomain = ['gmail.com', 'yahoo.com', 'wp.pl', 'onet.pl', 'interia.pl', 'gazeta.pl']; - protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl']; + protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl', 'co.pl', 'net.pl', 'org.pl']; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php index d59c93de..59e100eb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php @@ -6,7 +6,7 @@ use Faker\Provider\Base; /** * Generator of Polish vehicle registration numbers. - * {@link} http://prawo.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20170002355 + * {@link} https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20220001847 * {@link} https://pl.wikipedia.org/wiki/Tablice_rejestracyjne_w_Polsce#Tablice_standardowe */ class LicensePlate extends Base @@ -15,37 +15,37 @@ class LicensePlate extends Base * @var array list of Polish voivodeships and respective vehicle registration number prefixes. */ protected static $voivodeships = [ - 'dolnośląskie' => 'D', - 'kujawsko-pomorskie' => 'C', - 'lubelskie' => 'L', - 'lubuskie' => 'F', - 'łódzkie' => 'E', - 'małopolskie' => 'K', - 'mazowieckie' => 'W', - 'opolskie' => 'O', - 'podkarpackie' => 'R', - 'podlaskie' => 'B', - 'pomorskie' => 'G', - 'śląskie' => 'S', - 'świętokrzyskie' => 'T', - 'warmińsko-mazurskie' => 'N', - 'wielkopolskie' => 'P', - 'zachodniopomorskie' => 'Z', + 'dolnośląskie' => ['D', 'V'], + 'kujawsko-pomorskie' => ['C'], + 'lubelskie' => ['L'], + 'lubuskie' => ['F'], + 'łódzkie' => ['E'], + 'małopolskie' => ['K', 'J'], + 'mazowieckie' => ['W', 'A'], + 'opolskie' => ['O'], + 'podkarpackie' => ['R', 'Y'], + 'podlaskie' => ['B'], + 'pomorskie' => ['G', 'X'], + 'śląskie' => ['S', 'I'], + 'świętokrzyskie' => ['T'], + 'warmińsko-mazurskie' => ['N'], + 'wielkopolskie' => ['P', 'M'], + 'zachodniopomorskie' => ['Z'], ]; /** * @var array list of special vehicle registration number prefixes. */ protected static $specials = [ - 'army' => 'U', - 'services' => 'H', + 'army' => ['U'], + 'services' => ['H'], ]; /** * @var array list of Polish counties and respective vehicle registration number prefixes. */ protected static $counties = [ - 'D' => [ + 'dolnośląskie' => [ 'Jelenia Góra' => ['J'], 'Legnica' => ['L'], 'Wałbrzych' => ['B'], @@ -77,7 +77,7 @@ class LicensePlate extends Base 'zgorzelecki' => ['ZG'], 'złotoryjski' => ['ZL'], ], - 'C' => [ + 'kujawsko-pomorskie' => [ 'Bydgoszcz' => ['B'], 'Grudziądz' => ['G'], 'Toruń' => ['T'], @@ -102,7 +102,7 @@ class LicensePlate extends Base 'włocławski' => ['WL'], 'żniński' => ['ZN'], ], - 'L' => [ + 'lubelskie' => [ 'Biała Podlaska' => ['B'], 'Chełm' => ['C'], 'Lublin' => ['U'], @@ -128,7 +128,7 @@ class LicensePlate extends Base 'włodawski' => ['WL'], 'zamojski' => ['ZA'], ], - 'F' => [ + 'lubuskie' => [ 'Gorzów Wielkopolski' => ['G'], 'Zielona Góra' => ['Z'], 'gorzowski' => ['GW'], @@ -144,8 +144,8 @@ class LicensePlate extends Base 'żagański' => ['ZG'], 'żarski' => ['ZA'], ], - 'E' => [ - 'Łódź' => ['L'], + 'łódzkie' => [ + 'Łódź' => ['L', 'D'], 'Piotrków Trybunalski' => ['P'], 'Skierniewice' => ['S'], 'brzeziński' => ['BR'], @@ -170,8 +170,8 @@ class LicensePlate extends Base 'zduńskowolski' => ['ZD'], 'zgierski' => ['ZG'], ], - 'K' => [ - 'Kraków' => ['R'], + 'małopolskie' => [ + 'Kraków' => ['R', 'K'], 'Nowy Sącz' => ['N'], 'Tarnów' => ['T'], 'bocheński' => ['BA', 'BC'], @@ -179,7 +179,7 @@ class LicensePlate extends Base 'chrzanowski' => ['CH'], 'dąbrowski' => ['DA'], 'gorlicki' => ['GR'], - 'krakowski' => ['RA'], + 'krakowski' => ['RA', 'RK'], 'limanowski' => ['LI'], 'miechowski' => ['MI'], 'myślenicki' => ['MY'], @@ -194,7 +194,7 @@ class LicensePlate extends Base 'wadowicki' => ['WA'], 'wielicki' => ['WI'], ], - 'W' => [ + 'mazowieckie' => [ 'Ostrołęka' => ['O'], 'Płock' => ['P'], 'Radom' => ['R'], @@ -216,7 +216,7 @@ class LicensePlate extends Base 'ostrołęcki' => ['OS'], 'ostrowski' => ['OR'], 'otwocki' => ['OT'], - 'piaseczyński' => ['PA', 'PI'], + 'piaseczyński' => ['PA', 'PI', 'PW', 'PX'], 'płocki' => ['PL'], 'płoński' => ['PN'], 'pruszkowski' => ['PP', 'PR', 'PS'], @@ -238,7 +238,7 @@ class LicensePlate extends Base 'żuromiński' => ['ZU'], 'żyrardowski' => ['ZY'], ], - 'O' => [ + 'opolskie' => [ 'Opole' => ['P'], 'brzeski' => ['B'], 'głubczycki' => ['GL'], @@ -252,7 +252,7 @@ class LicensePlate extends Base 'prudnicki' => ['PR'], 'strzelecki' => ['ST'], ], - 'R' => [ + 'podkarpackie' => [ 'Krosno' => ['K'], 'Przemyśl' => ['P'], 'Rzeszów' => ['Z'], @@ -273,18 +273,18 @@ class LicensePlate extends Base 'przemyski' => ['PR'], 'przeworski' => ['PZ'], 'ropczycko-sędziszowski' => ['RS'], - 'rzeszowski' => ['ZE'], + 'rzeszowski' => ['ZE', 'ZR', 'ZZ'], 'sanocki' => ['SA'], 'stalowowolski' => ['ST'], 'strzyżowski' => ['SR'], 'tarnobrzeski' => ['TA'], ], - 'B' => [ + 'podlaskie' => [ 'Białystok' => ['I'], 'Łomża' => ['L'], 'Suwałki' => ['S'], 'augustowski' => ['AU'], - 'białostocki' => ['IA'], + 'białostocki' => ['IA', 'IB'], 'bielski' => ['BI'], 'grajewski' => ['GR'], 'hajnowski' => ['HA'], @@ -298,7 +298,7 @@ class LicensePlate extends Base 'wysokomazowiecki' => ['WM'], 'zambrowski' => ['ZA'], ], - 'G' => [ + 'pomorskie' => [ 'Gdańsk' => ['D'], 'Gdynia' => ['A'], 'Słupsk' => ['S'], @@ -307,7 +307,7 @@ class LicensePlate extends Base 'chojnicki' => ['CH'], 'człuchowski' => ['CZ'], 'gdański' => ['DA'], - 'kartuski' => ['KY', 'KA'], + 'kartuski' => ['KA', 'KY', 'KZ'], 'kościerski' => ['KS'], 'kwidzyński' => ['KW'], 'lęborski' => ['LE'], @@ -320,7 +320,7 @@ class LicensePlate extends Base 'tczewski' => ['TC'], 'wejherowski' => ['WE', 'WO'], ], - 'S' => [ + 'śląskie' => [ 'Bielsko-Biała' => ['B'], 'Bytom' => ['Y'], 'Chorzów' => ['H'], @@ -340,9 +340,9 @@ class LicensePlate extends Base 'Tychy' => ['T'], 'Zabrze' => ['Z'], 'Żory' => ['ZO'], - 'będziński' => ['BE'], + 'będziński' => ['BE', 'BN', 'E'], 'bielski' => ['BI'], - 'cieszyński' => ['CN', 'CI'], + 'cieszyński' => ['CI', 'CN'], 'częstochowski' => ['CZ'], 'gliwicki' => ['GL'], 'kłobucki' => ['KL'], @@ -358,7 +358,7 @@ class LicensePlate extends Base 'zawierciański' => ['ZA'], 'żywiecki' => ['ZY'], ], - 'T' => [ + 'świętokrzyskie' => [ 'Kielce' => ['K'], 'buski' => ['BU'], 'jędrzejowski' => ['JE'], @@ -374,7 +374,7 @@ class LicensePlate extends Base 'staszowski' => ['SZ'], 'włoszczowski' => ['LW'], ], - 'N' => [ + 'warmińsko-mazurskie' => [ 'Elbląg' => ['E'], 'Olsztyn' => ['O'], 'bartoszycki' => ['BA'], @@ -397,7 +397,7 @@ class LicensePlate extends Base 'szczycieński' => ['SZ'], 'węgorzewski' => ['WE'], ], - 'P' => [ + 'wielkopolskie' => [ 'Kalisz' => ['A', 'K'], 'Konin' => ['KO', 'N'], 'Leszno' => ['L'], @@ -434,7 +434,7 @@ class LicensePlate extends Base 'wrzesiński' => ['WR'], 'złotowski' => ['ZL'], ], - 'Z' => [ + 'zachodniopomorskie' => [ 'Koszalin' => ['K'], 'Szczecin' => ['S', 'Z'], 'Świnoujście' => ['SW'], @@ -457,10 +457,10 @@ class LicensePlate extends Base 'świdwiński' => ['SD'], 'wałecki' => ['WA'], ], - 'U' => [ + 'army' => [ 'Siły Zbrojne Rzeczypospolitej Polskiej' => ['A', 'B', 'C', 'D', 'E', 'G', 'I', 'J', 'K', 'L'], ], - 'H' => [ + 'services' => [ 'Centralne Biuro Antykorupcyjne' => ['A'], 'Służba Ochrony Państwa' => ['BA', 'BB', 'BE', 'BF', 'BG'], 'Służba Celno-Skarbowa' => ['CA', 'CB', 'CC', 'CD', 'CE', 'CF', 'CG', 'CH', 'CJ', 'CK', 'CL', 'CM', 'CN', 'CO', 'CP', 'CR'], @@ -514,12 +514,13 @@ class LicensePlate extends Base ?array $counties = null ): string { $voivodeshipsAvailable = static::$voivodeships + ($special ? static::$specials : []); - $voivodeshipCode = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipSelected = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipCode = static::randomElement($voivodeshipsAvailable[$voivodeshipSelected]); - $countiesAvailable = static::$counties[$voivodeshipCode]; + $countiesAvailable = static::$counties[$voivodeshipSelected]; $countySelected = self::selectRandomArea($countiesAvailable, $counties); - $countyCode = static::randomElement($countySelected); + $countyCode = static::randomElement(static::$counties[$voivodeshipSelected][$countySelected]); $suffix = static::regexify(static::randomElement(strlen($countyCode) === 1 ? static::$plateSuffixesGroup1 : static::$plateSuffixesGroup2)); @@ -528,6 +529,8 @@ class LicensePlate extends Base /** * Selects random area from the list of available and requested. + * + * @return string */ protected static function selectRandomArea(array $available, ?array $requested) { @@ -537,6 +540,6 @@ class LicensePlate extends Base $requested = array_keys($available); } - return $available[static::randomElement($requested)]; + return static::randomElement($requested); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php index 6717def5..66016583 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -83,7 +83,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber ['landline', null], ]); - return call_user_func("static::{$options[0]}", $formatted, $options[1]); + return call_user_func([static::class, $options[0]], $formatted, $options[1]); } /** @@ -135,7 +135,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", true); + return call_user_func([static::class, $method], true); } /** @@ -145,6 +145,6 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", false); + return call_user_func([static::class, $method], false); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php index d177c872..ce607285 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php @@ -5,52 +5,52 @@ namespace Faker\Provider\pt_BR; class Text extends \Faker\Provider\Text { /** - * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis + * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis * - * This eBook is for the use of anyone anywhere in the United States and most - * other parts of the world at no cost and with almost no restrictions - * whatsoever. You may copy it, give it away or re-use it under the terms of - * the Project Gutenberg License included with this eBook or online at - * www.gutenberg.org. If you are not located in the United States, you'll have - * to check the laws of the country where you are located before using this ebook. + * This eBook is for the use of anyone anywhere in the United States and most + * other parts of the world at no cost and with almost no restrictions + * whatsoever. You may copy it, give it away or re-use it under the terms of + * the Project Gutenberg License included with this eBook or online at + * www.gutenberg.org. If you are not located in the United States, you'll have + * to check the laws of the country where you are located before using this ebook. * - * Title: Dom Casmurro + * Title: Dom Casmurro * - * Author: Machado de Assis + * Author: Machado de Assis * - * Release Date: October 15, 2017 [EBook #55752] + * Release Date: October 15, 2017 [EBook #55752] * - * Language: Portuguese + * Language: Portuguese * - * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** + * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** * - * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free - * Literature (online soon in an extended version,also linking - * to free sources for education worldwide ... MOOC's, - * educational materials,...) (Images generously made available - * by the Bibliotheca Nacional Digital Brasil.) + * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free + * Literature (online soon in an extended version,also linking + * to free sources for education worldwide ... MOOC's, + * educational materials,...) (Images generously made available + * by the Bibliotheca Nacional Digital Brasil.) * - * DOM CASMURRO + * DOM CASMURRO * - * POR + * POR * - * MACHADO DE ASSIS + * MACHADO DE ASSIS * - * DA ACADEMIA BRAZILEIRA + * DA ACADEMIA BRAZILEIRA * - * H. GARNIER, LIVREIRO-EDITOR + * H. GARNIER, LIVREIRO-EDITOR * - * RUA MOREIRA CEZAR, 71 + * RUA MOREIRA CEZAR, 71 * - * RIO DE JANEIRO + * RIO DE JANEIRO * - * 6, RUE DES SAINTS-PÈRES, 6 + * 6, RUE DES SAINTS-PÈRES, 6 * - * PARIZ + * PARIZ * - * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt + * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt * - * @var string + * @var string */ protected static $baseText = <<<'EOT' I diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php index d3b5a5ea..90770041 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php @@ -163,12 +163,12 @@ class Person extends \Faker\Provider\Person switch (count($dateOfBirthParts)) { case 1: $dateOfBirthParts[] = $baseDate->format('m'); - //don't break, we need the day also - // no break + //don't break, we need the day also + // no break case 2: $dateOfBirthParts[] = $baseDate->format('d'); - //don't break, next line will - // no break + //don't break, next line will + // no break case 3: break; @@ -182,6 +182,7 @@ class Person extends \Faker\Provider\Person $dateOfBirthFinal = implode('-', $dateOfBirthParts); $date = \DateTime::createFromFormat('Y-m-d', $dateOfBirthFinal); + //a full (invalid) date might have been supplied, check if it converts if ($date->format('Y-m-d') !== $dateOfBirthFinal) { throw new \InvalidArgumentException("Invalid date of birth - '{$date->format('Y-m-d')}' generated based on '{$dateOfBirth}' received"); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Company.php index 25c5c8e9..9f5d572f 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Company.php @@ -44,6 +44,7 @@ class Company extends \Faker\Provider\Company /** * @see https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:%D0%9F%D1%80%D0%BE%D1%84%D0%B5%D1%81%D1%81%D0%B8%D0%B8 + * * @note Randomly took from this list - some jobs titles for each letter */ protected static $jobTitleFormat = [ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php index 95ec8069..b0e17d4e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php @@ -5,8 +5,8 @@ namespace Faker\Provider\ru_RU; class Person extends \Faker\Provider\Person { protected static $maleNameFormats = [ - '{{firstNameMale}} {{middleNameMale}} {{lastName}}', - '{{lastName}} {{firstNameMale}} {{middleNameMale}}', + '{{firstNameMale}} {{middleNameMale}} {{lastNameMale}}', + '{{lastNameMale}} {{firstNameMale}} {{middleNameMale}}', ]; /** @@ -14,8 +14,8 @@ class Person extends \Faker\Provider\Person * That list of MALE last names could be safely extended to FEMALE list just by adding 'a' letter at the end */ protected static $femaleNameFormats = [ - '{{firstNameFemale}} {{middleNameFemale}} {{lastName}}а', - '{{lastName}}а {{firstNameFemale}} {{middleNameFemale}}', + '{{firstNameFemale}} {{middleNameFemale}} {{lastNameFemale}}', + '{{lastNameFemale}} {{firstNameFemale}} {{middleNameFemale}}', ]; /** @@ -165,16 +165,24 @@ class Person extends \Faker\Provider\Person */ public function lastName($gender = null) { - $lastName = static::randomElement(static::$lastName); - if (static::GENDER_FEMALE === $gender) { - return $lastName . 'а'; + return $this->lastNameFemale(); } if (static::GENDER_MALE === $gender) { - return $lastName; + return $this->lastNameMale(); } - return $lastName . static::randomElement(static::$lastNameSuffix); + return static::randomElement(static::$lastName) . static::randomElement(static::$lastNameSuffix); + } + + public function lastNameMale(): string + { + return static::randomElement(static::$lastName); + } + + public function lastNameFemale(): string + { + return static::randomElement(static::$lastName) . 'а'; } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/sk_SK/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/sk_SK/Person.php index 5f8fe70a..583759ba 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/sk_SK/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/sk_SK/Person.php @@ -34,7 +34,7 @@ class Person extends \Faker\Provider\Person 'Vlastimil', 'Boleslav', 'Eduard', 'Jozef', 'Víťazoslav', 'Blahoslav', 'Beňadik', 'Adrián', 'Gabriel', 'Marián', 'Emanuel', 'Miroslav', 'Benjamín', 'Hugo', 'Richard', 'Izidor', 'Zoltán', 'Albert', 'Igor', 'Július', 'Aleš', 'Fedor', 'Rudolf', 'Valér', 'Marcel', 'Ervín', 'Slavomír', 'Vojtech', 'Juraj', 'Marek', 'Jaroslav', 'Žigmund', 'Florián', 'Roland', 'Pankrác', 'Servác', 'Bonifác', 'Svetozár', 'Bernard', - 'Júlia', 'Urban', 'Dušan', 'Viliam', 'Ferdinand', 'Norbert', 'Róbert', 'Medard', 'Zlatko', 'Anton', 'Vasil', 'Vít', 'Adolf', 'Vratislav', + 'Júlia', 'Urban', 'Dušan', 'Viliam', 'Ferdinand', 'Norbert', 'Róbert', 'Medard', 'Zlatko', 'Anton', 'Vasil', 'Vít', 'Vratislav', 'Alfréd', 'Alojz', 'Ján', 'Tadeáš', 'Ladislav', 'Peter', 'Pavol', 'Miloslav', 'Prokop', 'Cyril', 'Metod', 'Patrik', 'Oliver', 'Ivan', 'Kamil', 'Henrich', 'Drahomír', 'Bohuslav', 'Iľja', 'Daniel', 'Vladimír', 'Jakub', 'Krištof', 'Ignác', 'Gustáv', 'Jerguš', 'Dominik', 'Oskar', 'Vavrinec', 'Ľubomír', 'Mojmír', 'Leonard', 'Tichomír', 'Filip', 'Bartolomej', 'Ľudovít', 'Samuel', 'Augustín', 'Belo', 'Oleg', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/sl_SI/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/sl_SI/Person.php index 08463950..20a29469 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/sl_SI/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/sl_SI/Person.php @@ -25,7 +25,7 @@ class Person extends \Faker\Provider\Person * @see http://www.stat.si/doc/vsebina/05/imena/TOPIMENA_SI.xlsx */ protected static $firstNameMale = [ - 'Adam', 'Adolf', 'Albert', 'Albin', 'Aleks', 'Aleksandar', 'Aleksander', 'Aleksej', 'Alen', + 'Adam', 'Albert', 'Albin', 'Aleks', 'Aleksandar', 'Aleksander', 'Aleksej', 'Alen', 'Alex', 'Aleš', 'Aljaž', 'Aljoša', 'Alojz', 'Alojzij', 'Andraž', 'Andrej', 'Anej', 'Anton', 'Anže', 'Avgust', 'Ažbe', 'Benjamin', 'Bernard', 'Bine', 'Blaž', 'Bogdan', 'Bogomir', 'Bojan', 'Bor', 'Boris', 'Borut', 'Boštjan', 'Božidar', 'Branko', 'Brin', 'Bruno', 'Ciril', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php index c078f6bf..1142a1f6 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php @@ -59,7 +59,7 @@ class Person extends \Faker\Provider\Person * @see http://spraakbanken.gu.se/statistik/lbfnamnalf.phtml */ protected static $firstNameMale = [ - 'Abraham', 'Adam', 'Adolf', 'Adrian', 'Agaton', 'Agne', 'Albert', 'Albin', 'Aldor', 'Alex', 'Alexander', 'Alexis', 'Alexius', 'Alf', 'Alfons', 'Alfred', 'Algot', 'Allan', 'Alrik', 'Alvar', 'Alve', 'Amandus', 'Anders', 'André', 'Andreas', 'Anselm', 'Anshelm', 'Antero', 'Anton', 'Antonius', 'Arne', 'Arnold', 'Aron', 'Arthur', 'Artur', 'Arvid', 'Assar', 'Astor', 'August', 'Augustin', 'Axel', + 'Abraham', 'Adam', 'Adrian', 'Agaton', 'Agne', 'Albert', 'Albin', 'Aldor', 'Alex', 'Alexander', 'Alexis', 'Alexius', 'Alf', 'Alfons', 'Alfred', 'Algot', 'Allan', 'Alrik', 'Alvar', 'Alve', 'Amandus', 'Anders', 'André', 'Andreas', 'Anselm', 'Anshelm', 'Antero', 'Anton', 'Antonius', 'Arne', 'Arnold', 'Aron', 'Arthur', 'Artur', 'Arvid', 'Assar', 'Astor', 'August', 'Augustin', 'Axel', 'Bengt', 'Bengt-Göran', 'Bengt-Olof', 'Bengt-Åke', 'Benny', 'Berndt', 'Berne', 'Bernhard', 'Bernt', 'Bert', 'Berth', 'Berthold', 'Bertil', 'Bill', 'Billy', 'Birger', 'Bjarne', 'Björn', 'Bo', 'Boris', 'Bror', 'Bruno', 'Brynolf', 'Börje', 'Carl', 'Carl-Axel', 'Carl-Erik', 'Carl-Gustaf', 'Carl-Gustav', 'Carl-Johan', 'Charles', 'Christer', 'Christian', 'Claes', 'Claes-Göran', 'Clarence', 'Clas', 'Conny', 'Crister', 'Curt', 'Dag', 'Dan', 'Daniel', 'David', 'Dennis', 'Dick', 'Donald', 'Douglas', @@ -121,8 +121,7 @@ class Person extends \Faker\Provider\Person * * @see http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden) * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format XXXXXX-XXXX */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/PhoneNumber.php index 01cf15d9..2d5c5882 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/PhoneNumber.php @@ -2,6 +2,9 @@ namespace Faker\Provider\sv_SE; +/** + * @see https://www.pts.se/sv/bransch/telefoni/nummer-och-adressering/telefoninummerplanen/telefonnummers-struktur/ + */ class PhoneNumber extends \Faker\Provider\PhoneNumber { /** @@ -34,4 +37,28 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '+46(0)%######', '+46%######', ]; + + /** + * @var array Swedish mobile number formats + */ + protected static array $mobileFormats = [ + '+467########', + '+46(0)7########', + '+46 (0)7## ## ## ##', + '+46 (0)7## ### ###', + '07## ## ## ##', + '07## ### ###', + '07##-## ## ##', + '07##-### ###', + '07# ### ## ##', + '07#-### ## ##', + '07#-#######', + ]; + + public function mobileNumber(): string + { + $format = static::randomElement(static::$mobileFormats); + + return self::numerify($this->generator->parse($format)); + } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/Company.php index 1458bb86..e7b7892c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/Company.php @@ -31,6 +31,7 @@ class Company extends \Faker\Provider\Company /** * @see https://tr.wikipedia.org/wiki/Meslekler_listesi + * * @note Randomly took 300 from this list */ protected static $jobTitleFormat = [ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/PhoneNumber.php index be35cb56..3103c77e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/tr_TR/PhoneNumber.php @@ -4,30 +4,183 @@ namespace Faker\Provider\tr_TR; class PhoneNumber extends \Faker\Provider\PhoneNumber { + /** + * Mixed landline and mobile phone numbers valid for Turkey + * + * @see https://en.wikipedia.org/wiki/Telephone_numbers_in_Turkey + * + * @var string[] + */ protected static $formats = [ + '0212#######', + '0216#######', + '0222#######', + '0224#######', '050########', '053########', '054########', '055########', + '0 212 ### ## ##', + '0 216 ### ## ##', + '0 222 ### ## ##', + '0 224 ### ## ##', '0 50# ### ## ##', '0 53# ### ## ##', '0 54# ### ## ##', '0 55# ### ## ##', + '0 (212) ### ## ##', + '0 (216) ### ## ##', + '0 (222) ### ## ##', + '0 (224) ### ## ##', '0 (50#) ### ## ##', '0 (53#) ### ## ##', '0 (54#) ### ## ##', '0 (55#) ### ## ##', + '+90212#######', + '+90216#######', + '+90222#######', + '+90224#######', '+9050########', '+9053########', '+9054########', '+9055########', + '+90 212 ### ## ##', + '+90 216 ### ## ##', + '+90 222 ### ## ##', + '+90 224 ### ## ##', '+90 50# ### ## ##', '+90 53# ### ## ##', '+90 54# ### ## ##', '+90 55# ### ## ##', + '+90 (212) ### ## ##', + '+90 (216) ### ## ##', + '+90 (222) ### ## ##', + '+90 (224) ### ## ##', '+90 (50#) ### ## ##', '+90 (53#) ### ## ##', '+90 (54#) ### ## ##', '+90 (55#) ### ## ##', ]; + + /** + * Mixed landline and mobile phone numbers in E164 format valid for Turkey + * + * @see https://en.wikipedia.org/wiki/Telephone_numbers_in_Turkey + * + * @var string[] + */ + protected static $e164Formats = [ + '+90212#######', + '+90216#######', + '+90222#######', + '+90224#######', + '+90226#######', + '+90228#######', + '+90232#######', + '+90236#######', + '+90242#######', + '+90246#######', + '+90248#######', + '+90252#######', + '+90256#######', + '+90258#######', + '+90262#######', + '+90264#######', + '+90266#######', + '+90272#######', + '+90274#######', + '+90276#######', + '+90282#######', + '+90284#######', + '+90286#######', + '+90288#######', + '+90312#######', + '+90318#######', + '+90322#######', + '+90324#######', + '+90326#######', + '+90328#######', + '+90332#######', + '+90338#######', + '+90342#######', + '+90344#######', + '+90346#######', + '+90348#######', + '+90352#######', + '+90354#######', + '+90356#######', + '+90358#######', + '+90362#######', + '+90364#######', + '+90366#######', + '+90368#######', + '+90370#######', + '+90372#######', + '+90374#######', + '+90376#######', + '+90378#######', + '+90380#######', + '+90382#######', + '+90384#######', + '+90386#######', + '+90388#######', + '+90412#######', + '+90414#######', + '+90416#######', + '+90422#######', + '+90424#######', + '+90426#######', + '+90428#######', + '+90432#######', + '+90434#######', + '+90436#######', + '+90438#######', + '+90442#######', + '+90446#######', + '+90452#######', + '+90454#######', + '+90456#######', + '+90458#######', + '+90462#######', + '+90464#######', + '+90466#######', + '+90472#######', + '+90474#######', + '+90476#######', + '+90478#######', + '+90482#######', + '+90484#######', + '+90486#######', + '+90488#######', + '+90501#######', + '+90502#######', + '+90503#######', + '+90504#######', + '+90505#######', + '+90506#######', + '+90507#######', + '+90530#######', + '+90531#######', + '+90532#######', + '+90533#######', + '+90534#######', + '+90535#######', + '+90536#######', + '+90537#######', + '+90538#######', + '+90539#######', + '+90541#######', + '+90542#######', + '+90543#######', + '+90544#######', + '+90545#######', + '+90546#######', + '+90549#######', + '+90551#######', + '+90552#######', + '+90553#######', + '+90554#######', + '+90555#######', + '+90556#######', + ]; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php index d67e1497..00b9eb77 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php @@ -101,7 +101,7 @@ class Address extends \Faker\Provider\Address '斯威士兰', '瑞典', '瑞士', '叙利亚', '塔吉克斯坦', '坦桑尼亚', '泰国', '阿拉伯联合酋长国', '多哥', '托克劳群岛', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', - '特克斯和凯科斯群岛(', '图瓦卢', '美国', '乌干达', '乌克兰', + '特克斯和凯科斯群岛', '图瓦卢', '美国', '乌干达', '乌克兰', '英国', '乌拉圭', '乌兹别克斯坦', '瓦努阿图', '梵蒂冈', '委内瑞拉', '越南', '维尔京群岛', '维尔京群岛和圣罗克伊', '威克岛', '瓦里斯和富士那群岛', '西撒哈拉', '也门', '南斯拉夫', diff --git a/vendor/fideloper/proxy/composer.json b/vendor/fideloper/proxy/composer.json index a42061f7..d7ce15a4 100644 --- a/vendor/fideloper/proxy/composer.json +++ b/vendor/fideloper/proxy/composer.json @@ -16,7 +16,7 @@ "require-dev": { "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5.8|^9.3.3" }, "autoload": { "psr-4": { diff --git a/vendor/fideloper/proxy/config/trustedproxy.php b/vendor/fideloper/proxy/config/trustedproxy.php index e618ae24..c3a47d82 100644 --- a/vendor/fideloper/proxy/config/trustedproxy.php +++ b/vendor/fideloper/proxy/config/trustedproxy.php @@ -35,16 +35,12 @@ return [ * * Options include: * - * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust) - * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust) - * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer) - * - * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust) - * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust) - * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer) + * - All headers (see below) - Trust all x-forwarded-* headers + * - Illuminate\Http\Request::HEADER_FORWARDED - Use the FORWARDED header to establish trust + * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB - If you are using AWS Elastic Load Balancer * * @link https://symfony.com/doc/current/deployment/proxies.html */ - 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, + 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | Illuminate\Http\Request::HEADER_X_FORWARDED_HOST | Illuminate\Http\Request::HEADER_X_FORWARDED_PORT | Illuminate\Http\Request::HEADER_X_FORWARDED_PROTO | Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB, ]; diff --git a/vendor/fideloper/proxy/src/TrustProxies.php b/vendor/fideloper/proxy/src/TrustProxies.php index 79c26153..4f3b2afa 100644 --- a/vendor/fideloper/proxy/src/TrustProxies.php +++ b/vendor/fideloper/proxy/src/TrustProxies.php @@ -119,10 +119,24 @@ class TrustProxies case Request::HEADER_FORWARDED: return Request::HEADER_FORWARDED; break; - case 'HEADER_X_FORWARDED_ALL': - case Request::HEADER_X_FORWARDED_ALL: - return Request::HEADER_X_FORWARDED_ALL; + case 'HEADER_X_FORWARDED_FOR': + case Request::HEADER_X_FORWARDED_FOR: + return Request::HEADER_X_FORWARDED_FOR; break; + case 'HEADER_X_FORWARDED_HOST': + case Request::HEADER_X_FORWARDED_HOST: + return Request::HEADER_X_FORWARDED_HOST; + break; + case 'HEADER_X_FORWARDED_PORT': + case Request::HEADER_X_FORWARDED_PORT: + return Request::HEADER_X_FORWARDED_PORT; + break; + case 'HEADER_X_FORWARDED_PROTO': + case Request::HEADER_X_FORWARDED_PROTO: + return Request::HEADER_X_FORWARDED_PROTO; + break; + default: + return Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; } return $headers; diff --git a/vendor/filp/whoops/.github/FUNDING.yml b/vendor/filp/whoops/.github/FUNDING.yml deleted file mode 100644 index 74f6e857..00000000 --- a/vendor/filp/whoops/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: denis-sokolov diff --git a/vendor/filp/whoops/.github/workflows/tests.yml b/vendor/filp/whoops/.github/workflows/tests.yml deleted file mode 100644 index 8f07dd5a..00000000 --- a/vendor/filp/whoops/.github/workflows/tests.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Tests - -on: - push: - pull_request: - -jobs: - tests: - name: PHP ${{ matrix.php }} - runs-on: ubuntu-20.04 - - strategy: - matrix: - php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - tools: composer:v2 - coverage: none - env: - update: true - - - name: Setup Problem Matchers - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Fix PHPUnit Version PHP < 7.4 - uses: nick-invision/retry@v1 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require "phpunit/phpunit:^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8" --dev --no-update --no-interaction - if: "matrix.php < 7.4" - - - name: Fix PHPUnit Version PHP >= 7.4 - uses: nick-invision/retry@v1 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer require "phpunit/phpunit:^9.3.3" --dev --no-update --no-interaction - if: "matrix.php >= 7.4" - - - name: Install PHP Dependencies - uses: nick-invision/retry@v1 - with: - timeout_minutes: 5 - max_attempts: 5 - command: composer update --no-interaction --no-progress - - - name: Execute PHPUnit - run: vendor/bin/phpunit diff --git a/vendor/filp/whoops/CHANGELOG.md b/vendor/filp/whoops/CHANGELOG.md index 88458aba..0542cc42 100644 --- a/vendor/filp/whoops/CHANGELOG.md +++ b/vendor/filp/whoops/CHANGELOG.md @@ -1,124 +1,153 @@ -# 2.14.5 +# CHANGELOG -* Allow ArrayAccess on super globals +## v2.15.4 -# 2.14.4 +* Improve link color in comments. -* Fix PHP 5.5 support. -* Allow to use psr/log 2 or 3. +## v2.15.3 -# 2.14.3 +* Improve performance of the syntax highlighting (#758). -* Support PHP 8.1 +## v2.15.2 -# 2.14.1 +* Fixed missing code highlight, which additionally led to issue with switching tabs, between application and all frames ([#747](https://github.com/filp/whoops/issues/747)). + +## v2.15.1 + +* Fixed bug with PrettyPageHandler "*Calling `getFrameFilters` method on null*" ([#751](https://github.com/filp/whoops/pull/751)). + +## v2.15.0 + +* Add addFrameFilter ([#749](https://github.com/filp/whoops/pull/749)) + +## v2.14.6 + +* Upgraded prismJS to version `1.29.0` due to security issue ([#741][i741]). + +[i741]: https://github.com/filp/whoops/pull/741 + +## v2.14.5 + +* Allow `ArrayAccess` on super globals. + +## v2.14.4 + +* Fix PHP `5.5` support. +* Allow to use psr/log `2` or `3`. + +## v2.14.3 + +* Support PHP `8.1`. + +## v2.14.1 * Fix syntax highlighting scrolling too far. * Improve the way we detect xdebug linkformat. -# 2.14.0 +## v2.14.0 -* Switched syntax highlighting to Prism.js +* Switched syntax highlighting to Prism.js. -Avoids licensing issues with prettify, and uses a maintaned, modern project. +Avoids licensing issues with prettify, and uses a maintained, modern project. -# 2.13.0 +## v2.13.0 -* Add Netbeans editor +* Add Netbeans editor. -# 2.12.1 +## v2.12.1 * Avoid redirecting away from an error. -# 2.12.0 +## v2.12.0 * Hide non-string values in super globals when requested. -# 2.11.0 +## v2.11.0 -* Customize exit code +* Customize exit code. -# 2.10.0 +## v2.10.0 -* Better chaining on handler classes +* Better chaining on handler classes. -# 2.9.2 +## v2.9.2 -* Fix copy button styles +* Fix copy button styles. -# 2.9.1 +## v2.9.1 -* Fix xdebug function crash on PHP 8 +* Fix xdebug function crash on PHP `8`. -# 2.9.0 +## v2.9.0 -* JsonResponseHandler includes the exception code +* `JsonResponseHandler` includes the exception code. -# 2.8.0 +## v2.8.0 -* Support PHP 8 +* Support PHP 8. -# 2.7.3 +## v2.7.3 -* PrettyPageHandler functionality to hide superglobal keys has a clearer name hideSuperglobalKey +* `PrettyPageHandler` functionality to hide superglobal keys has a clearer name +(`hideSuperglobalKey`). -# 2.7.2 +## v2.7.2 -* PrettyPageHandler now accepts custom js files -* PrettyPageHandler templateHelper is now accessible through inheritance +* `PrettyPageHandler` now accepts custom js files. +* `PrettyPageHandler` and `templateHelper` is now accessible through inheritance. -# 2.7.1 +## v2.7.1 * Fix a PHP warning in some cases with anonymous classes. -# 2.7.0 +## v2.7.0 -* removeFirstHandler and removeLastHandler. +* Added `removeFirstHandler` and `removeLastHandler`. -# 2.6.0 +## v2.6.0 -* Fix 2.4.0 pushHandler changing the order of handlers. +* Fix 2.4.0 `pushHandler` changing the order of handlers. -# 2.5.1 +## v2.5.1 * Fix error messaging in a rare case. -# 2.5.0 +## v2.5.0 * Automatically configure xdebug if available. -# 2.4.1 +## v2.4.1 -* Try harder to close all output buffers +* Try harder to close all output buffers. -# 2.4.0 +## v2.4.0 * Allow to prepend and append handlers. -# 2.3.2 +## v2.3.2 * Various fixes from the community. -# 2.3.1 +## v2.3.1 -* Prevent exception in Whoops when caught exception frame is not related to real file +* Prevent exception in Whoops when caught exception frame is not related to real file. -# 2.3.0 +## v2.3.0 * Show previous exception messages. -# 2.2.0 +## v2.2.0 -* Support PHP 7.2 +* Support PHP `7.2`. -# 2.1.0 +## v2.1.0 * Add a `SystemFacade` to allow clients to override Whoops behavior. * Show frame arguments in `PrettyPageHandler`. * Highlight the line with the error. * Add icons to search on Google and Stack Overflow. -# 2.0.0 +## v2.0.0 Backwards compatibility breaking changes: diff --git a/vendor/filp/whoops/src/Whoops/Exception/Formatter.php b/vendor/filp/whoops/src/Whoops/Exception/Formatter.php index 573dda0b..a041530f 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/Formatter.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Formatter.php @@ -6,16 +6,19 @@ namespace Whoops\Exception; +use Whoops\Inspector\InspectorInterface; + class Formatter { /** * Returns all basic information about the exception in a simple array * for further convertion to other languages - * @param Inspector $inspector - * @param bool $shouldAddTrace + * @param InspectorInterface $inspector + * @param bool $shouldAddTrace + * @param array $frameFilters * @return array */ - public static function formatExceptionAsDataArray(Inspector $inspector, $shouldAddTrace) + public static function formatExceptionAsDataArray(InspectorInterface $inspector, $shouldAddTrace, array $frameFilters = []) { $exception = $inspector->getException(); $response = [ @@ -27,7 +30,7 @@ class Formatter ]; if ($shouldAddTrace) { - $frames = $inspector->getFrames(); + $frames = $inspector->getFrames($frameFilters); $frameData = []; foreach ($frames as $frame) { @@ -47,7 +50,7 @@ class Formatter return $response; } - public static function formatExceptionPlain(Inspector $inspector) + public static function formatExceptionPlain(InspectorInterface $inspector) { $message = $inspector->getException()->getMessage(); $frames = $inspector->getFrames(); diff --git a/vendor/filp/whoops/src/Whoops/Exception/Frame.php b/vendor/filp/whoops/src/Whoops/Exception/Frame.php index 2d7297b9..469070e2 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/Frame.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Frame.php @@ -31,9 +31,6 @@ class Frame implements Serializable */ protected $application; - /** - * @param array[] - */ public function __construct(array $frame) { $this->frame = $frame; diff --git a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php index 723b475e..922c035f 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php +++ b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php @@ -25,9 +25,6 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C */ private $frames; - /** - * @param array $frames - */ public function __construct(array $frames) { $this->frames = array_map(function ($frame) { diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php index 85709593..a183563c 100644 --- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php @@ -6,9 +6,11 @@ namespace Whoops\Exception; +use Whoops\Inspector\InspectorFactory; +use Whoops\Inspector\InspectorInterface; use Whoops\Util\Misc; -class Inspector +class Inspector implements InspectorInterface { /** * @var \Throwable @@ -31,11 +33,18 @@ class Inspector private $previousExceptions; /** - * @param \Throwable $exception The exception to inspect + * @var \Whoops\Inspector\InspectorFactoryInterface|null */ - public function __construct($exception) + protected $inspectorFactory; + + /** + * @param \Throwable $exception The exception to inspect + * @param \Whoops\Inspector\InspectorFactoryInterface $factory + */ + public function __construct($exception, $factory = null) { $this->exception = $exception; + $this->inspectorFactory = $factory ?: new InspectorFactory(); } /** @@ -137,7 +146,7 @@ class Inspector $previousException = $this->exception->getPrevious(); if ($previousException) { - $this->previousExceptionInspector = new Inspector($previousException); + $this->previousExceptionInspector = $this->inspectorFactory->create($previousException); } } @@ -167,9 +176,12 @@ class Inspector /** * Returns an iterator for the inspected exception's * frames. + * + * @param array $frameFilters + * * @return \Whoops\Exception\FrameCollection */ - public function getFrames() + public function getFrames(array $frameFilters = []) { if ($this->frames === null) { $frames = $this->getTrace($this->exception); @@ -225,6 +237,13 @@ class Inspector $newFrames->prependFrames($outerFrames->topDiff($newFrames)); $this->frames = $newFrames; } + + // Apply frame filters callbacks on the frames stack + if (!empty($frameFilters)) { + foreach ($frameFilters as $filterCallback) { + $this->frames->filter($filterCallback); + } + } } return $this->frames; @@ -301,7 +320,6 @@ class Inspector * Determine if the frame can be used to fill in previous frame's missing info * happens for call_user_func and call_user_func_array usages (PHP Bug #44428) * - * @param array $frame * @return bool */ protected function isValidNextFrame(array $frame) diff --git a/vendor/filp/whoops/src/Whoops/Handler/Handler.php b/vendor/filp/whoops/src/Whoops/Handler/Handler.php index cf1f7087..21435fcb 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/Handler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/Handler.php @@ -6,7 +6,7 @@ namespace Whoops\Handler; -use Whoops\Exception\Inspector; +use Whoops\Inspector\InspectorInterface; use Whoops\RunInterface; /** @@ -36,7 +36,7 @@ abstract class Handler implements HandlerInterface private $run; /** - * @var Inspector $inspector + * @var InspectorInterface $inspector */ private $inspector; @@ -62,15 +62,15 @@ abstract class Handler implements HandlerInterface } /** - * @param Inspector $inspector + * @param InspectorInterface $inspector */ - public function setInspector(Inspector $inspector) + public function setInspector(InspectorInterface $inspector) { $this->inspector = $inspector; } /** - * @return Inspector + * @return InspectorInterface */ protected function getInspector() { diff --git a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php index 0265a85b..2deae989 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php +++ b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php @@ -6,7 +6,7 @@ namespace Whoops\Handler; -use Whoops\Exception\Inspector; +use Whoops\Inspector\InspectorInterface; use Whoops\RunInterface; interface HandlerInterface @@ -29,8 +29,8 @@ interface HandlerInterface public function setException($exception); /** - * @param Inspector $inspector + * @param InspectorInterface $inspector * @return void */ - public function setInspector(Inspector $inspector); + public function setInspector(InspectorInterface $inspector); } diff --git a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php index 2966d385..9051b36b 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php @@ -60,7 +60,8 @@ class JsonResponseHandler extends Handler 'errors' => [ Formatter::formatExceptionAsDataArray( $this->getInspector(), - $this->addTraceToOutput() + $this->addTraceToOutput(), + $this->getRun()->getFrameFilters() ), ] ]; @@ -68,7 +69,8 @@ class JsonResponseHandler extends Handler $response = [ 'error' => Formatter::formatExceptionAsDataArray( $this->getInspector(), - $this->addTraceToOutput() + $this->addTraceToOutput(), + $this->getRun()->getFrameFilters() ), ]; } diff --git a/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php index 6c148aa9..ea38b765 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php @@ -282,7 +282,7 @@ class PlainTextHandler extends Handler return ''; } $inspector = $this->getInspector(); - $frames = $inspector->getFrames(); + $frames = $inspector->getFrames($this->getRun()->getFrameFilters()); $response = "\nStack trace:"; diff --git a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php index e5a2560a..167407e8 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php @@ -287,6 +287,7 @@ class PrettyPageHandler extends Handler $vars["tables"] = array_merge($extraTables, $vars["tables"]); $plainTextHandler = new PlainTextHandler(); + $plainTextHandler->setRun($this->getRun()); $plainTextHandler->setException($this->getException()); $plainTextHandler->setInspector($this->getInspector()); $vars["preface"] = ""; @@ -304,7 +305,7 @@ class PrettyPageHandler extends Handler */ protected function getExceptionFrames() { - $frames = $this->getInspector()->getFrames(); + $frames = $this->getInspector()->getFrames($this->getRun()->getFrameFilters()); if ($this->getApplicationPaths()) { foreach ($frames as $frame) { @@ -353,7 +354,6 @@ class PrettyPageHandler extends Handler * will be flattened with `print_r`. * * @param string $label - * @param array $data * * @return static */ @@ -383,7 +383,7 @@ class PrettyPageHandler extends Handler throw new InvalidArgumentException('Expecting callback argument to be callable'); } - $this->extraTables[$label] = function (\Whoops\Exception\Inspector $inspector = null) use ($callback) { + $this->extraTables[$label] = function (\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) { try { $result = call_user_func($callback, $inspector); @@ -755,11 +755,9 @@ class PrettyPageHandler extends Handler /** * Set the application paths. * - * @param array $applicationPaths - * * @return void */ - public function setApplicationPaths($applicationPaths) + public function setApplicationPaths(array $applicationPaths) { $this->applicationPaths = $applicationPaths; } diff --git a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php index d695750a..dcfd551e 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php @@ -43,7 +43,8 @@ class XmlResponseHandler extends Handler $response = [ 'error' => Formatter::formatExceptionAsDataArray( $this->getInspector(), - $this->addTraceToOutput() + $this->addTraceToOutput(), + $this->getRun()->getFrameFilters() ), ]; diff --git a/vendor/filp/whoops/src/Whoops/Resources/css/prism.css b/vendor/filp/whoops/src/Whoops/Resources/css/prism.css index 5faf2b88..a03db53d 100644 --- a/vendor/filp/whoops/src/Whoops/Resources/css/prism.css +++ b/vendor/filp/whoops/src/Whoops/Resources/css/prism.css @@ -1,237 +1,5 @@ -/* PrismJS 1.24.1 +/* PrismJS 1.29.0 https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+markup-templating+php&plugins=line-highlight+line-numbers */ -/** - * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML - * Based on https://github.com/chriskempson/tomorrow-theme - * @author Rose Pritchard - */ - -code[class*="language-"], -pre[class*="language-"] { - color: #ccc; - background: none; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -:not(pre) > code[class*="language-"], -pre[class*="language-"] { - background: #2d2d2d; -} - -/* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.block-comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #999; -} - -.token.punctuation { - color: #ccc; -} - -.token.tag, -.token.attr-name, -.token.namespace, -.token.deleted { - color: #e2777a; -} - -.token.function-name { - color: #6196cc; -} - -.token.boolean, -.token.number, -.token.function { - color: #f08d49; -} - -.token.property, -.token.class-name, -.token.constant, -.token.symbol { - color: #f8c555; -} - -.token.selector, -.token.important, -.token.atrule, -.token.keyword, -.token.builtin { - color: #cc99cd; -} - -.token.string, -.token.char, -.token.attr-value, -.token.regex, -.token.variable { - color: #7ec699; -} - -.token.operator, -.token.entity, -.token.url { - color: #67cdcc; -} - -.token.important, -.token.bold { - font-weight: bold; -} -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.inserted { - color: green; -} - -pre[data-line] { - position: relative; - padding: 1em 0 1em 3em; -} - -.line-highlight { - position: absolute; - left: 0; - right: 0; - padding: inherit 0; - margin-top: 1em; /* Same as .prism’s padding-top */ - - background: hsla(24, 20%, 50%,.08); - background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); - - pointer-events: none; - - line-height: inherit; - white-space: pre; -} - -@media print { - .line-highlight { - /* - * This will prevent browsers from replacing the background color with white. - * It's necessary because the element is layered on top of the displayed code. - */ - -webkit-print-color-adjust: exact; - color-adjust: exact; - } -} - - .line-highlight:before, - .line-highlight[data-end]:after { - content: attr(data-start); - position: absolute; - top: .4em; - left: .6em; - min-width: 1em; - padding: 0 .5em; - background-color: hsla(24, 20%, 50%,.4); - color: hsl(24, 20%, 95%); - font: bold 65%/1.5 sans-serif; - text-align: center; - vertical-align: .3em; - border-radius: 999px; - text-shadow: none; - box-shadow: 0 1px white; - } - - .line-highlight[data-end]:after { - content: attr(data-end); - top: auto; - bottom: .4em; - } - -.line-numbers .line-highlight:before, -.line-numbers .line-highlight:after { - content: none; -} - -pre[id].linkable-line-numbers span.line-numbers-rows { - pointer-events: all; -} -pre[id].linkable-line-numbers span.line-numbers-rows > span:before { - cursor: pointer; -} -pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before { - background-color: rgba(128, 128, 128, .2); -} - -pre[class*="language-"].line-numbers { - position: relative; - padding-left: 3.8em; - counter-reset: linenumber; -} - -pre[class*="language-"].line-numbers > code { - position: relative; - white-space: inherit; -} - -.line-numbers .line-numbers-rows { - position: absolute; - pointer-events: none; - top: 0; - font-size: 100%; - left: -3.8em; - width: 3em; /* works for line-numbers below 1000 lines */ - letter-spacing: -1px; - border-right: 1px solid #999; - - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -} - - .line-numbers-rows > span { - display: block; - counter-increment: linenumber; - } - - .line-numbers-rows > span:before { - content: counter(linenumber); - color: #999; - display: block; - padding-right: 0.8em; - text-align: right; - } - +code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green} +pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)} +pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right} diff --git a/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css b/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css index 4400caad..edd5cd8e 100644 --- a/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css +++ b/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css @@ -290,13 +290,12 @@ header { border-radius: 6px; background-color: rgba(255, 255, 255, .05); } - .frame-comment a { - font-weight: bold; - text-decoration: none; - } - .frame-comment a:hover { - color: #4bb1b1; - } + + .frame-comment a { + font-weight: bold; + text-decoration: underline; + color: #c6c6c6; + } .frame-comment:not(:last-child) { border-bottom: 1px dotted rgba(0, 0, 0, .3); diff --git a/vendor/filp/whoops/src/Whoops/Resources/js/prism.js b/vendor/filp/whoops/src/Whoops/Resources/js/prism.js index 068dd0b5..ae10d901 100644 --- a/vendor/filp/whoops/src/Whoops/Resources/js/prism.js +++ b/vendor/filp/whoops/src/Whoops/Resources/js/prism.js @@ -1,8 +1,8 @@ -/* PrismJS 1.24.1 +/* PrismJS 1.29.0 https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+markup-templating+php&plugins=line-highlight+line-numbers */ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; -!function(h){function v(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(h.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,o){if(a.language===r){var c=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var n,t=c.length;-1!==a.code.indexOf(n=v(r,t));)++t;return c[t]=e,n}),a.grammar=h.languages.markup}}},tokenizePlaceholders:{value:function(p,k){if(p.language===k&&p.tokenStack){p.grammar=h.languages[k];var m=0,d=Object.keys(p.tokenStack);!function e(n){for(var t=0;t=d.length);t++){var a=n[t];if("string"==typeof a||a.content&&"string"==typeof a.content){var r=d[m],o=p.tokenStack[r],c="string"==typeof a?a:a.content,i=v(k,r),u=c.indexOf(i);if(-1|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
 ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^(?: \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(b(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(y)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return e.classList.contains(t)}function y(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(y)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows");if(t){var i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n
");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null}(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; +!function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,a,r,o){if(t.language===a){var c=t.tokenStack=[];t.code=t.code.replace(r,(function(e){if("function"==typeof o&&!o(e))return e;for(var r,i=c.length;-1!==t.code.indexOf(r=n(a,i));)++i;return c[i]=e,r})),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,a){if(t.language===a&&t.tokenStack){t.grammar=e.languages[a];var r=0,o=Object.keys(t.tokenStack);!function c(i){for(var u=0;u=o.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=o[r],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++r;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,c([m])),v.push(d),h&&v.push.apply(v,c([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&c(g.content)}return i}(t.tokens)}}}})}(Prism); +!function(e){var a=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:a,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];e.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:a,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(a){/<\?/.test(a.code)&&e.languages["markup-templating"].buildPlaceholders(a,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")}))}(Prism); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t="line-numbers",i="linkable-line-numbers",n=/\n(?!$)/g,r=!0;Prism.plugins.lineHighlight={highlightLines:function(o,u,c){var h=(u="string"==typeof u?u:o.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+o.getAttribute("data-line-offset")||0,f=(function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" 
 ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}()?parseInt:parseFloat)(getComputedStyle(o).lineHeight),p=Prism.util.isActive(o,t),g=o.querySelector("code"),m=p?o:g||o,v=[],y=g.textContent.match(n),b=y?y.length+1:1,A=g&&m!=g?function(e,t){var i=getComputedStyle(e),n=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(i.paddingTop)}(o,g):0;h.forEach((function(e){var t=e.split("-"),i=+t[0],n=+t[1]||i;if(!((n=Math.min(b+d,n))i&&r.setAttribute("data-end",String(n)),r.style.top=(i-d-1)*f+A+"px",r.textContent=new Array(n-i+2).join(" \n")}));v.push((function(){r.style.width=o.scrollWidth+"px"})),v.push((function(){m.appendChild(r)}))}}));var P=o.id;if(p&&Prism.util.isActive(o,i)&&P){l(o,i)||v.push((function(){o.classList.add(i)}));var E=parseInt(o.getAttribute("data-start")||"1");s(".line-numbers-rows > span",o).forEach((function(e,t){var i=t+E;e.onclick=function(){var e=P+"."+i;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){v.forEach(a)}}};var o=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(u(t)){var i=0;s(".line-highlight",t).forEach((function(e){i+=e.textContent.length,e.parentNode.removeChild(e)})),i&&/^(?: \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}})),Prism.hooks.add("complete",(function e(i){var n=i.element.parentElement;if(u(n)){clearTimeout(o);var r=Prism.plugins.lineNumbers,s=i.plugins&&i.plugins.lineNumbers;l(n,t)&&r&&!s?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(n)(),o=setTimeout(c,1))}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){s("pre").filter(u).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function s(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return e.classList.contains(t)}function a(e){e()}function u(e){return!!(e&&/pre/i.test(e.nodeName)&&(e.hasAttribute("data-line")||e.id&&Prism.util.isActive(e,i)))}function c(){var e=location.hash.slice(1);s(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var i=e.slice(0,e.lastIndexOf(".")),n=document.getElementById(i);n&&(n.hasAttribute("data-line")||n.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(n,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}}(); +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);ts&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r
escape($code) ?>
diff --git a/vendor/filp/whoops/src/Whoops/Run.php b/vendor/filp/whoops/src/Whoops/Run.php index 52486d0d..08627680 100644 --- a/vendor/filp/whoops/src/Whoops/Run.php +++ b/vendor/filp/whoops/src/Whoops/Run.php @@ -9,10 +9,13 @@ namespace Whoops; use InvalidArgumentException; use Throwable; use Whoops\Exception\ErrorException; -use Whoops\Exception\Inspector; use Whoops\Handler\CallbackHandler; use Whoops\Handler\Handler; use Whoops\Handler\HandlerInterface; +use Whoops\Inspector\CallableInspectorFactory; +use Whoops\Inspector\InspectorFactory; +use Whoops\Inspector\InspectorFactoryInterface; +use Whoops\Inspector\InspectorInterface; use Whoops\Util\Misc; use Whoops\Util\SystemFacade; @@ -66,9 +69,22 @@ final class Run implements RunInterface */ private $canThrowExceptions = true; + /** + * The inspector factory to create inspectors. + * + * @var InspectorFactoryInterface + */ + private $inspectorFactory; + + /** + * @var array + */ + private $frameFilters = []; + public function __construct(SystemFacade $system = null) { $this->system = $system ?: new SystemFacade; + $this->inspectorFactory = new InspectorFactory(); } /** @@ -165,6 +181,17 @@ final class Run implements RunInterface return $this; } + public function getFrameFilters() + { + return $this->frameFilters; + } + + public function clearFrameFilters() + { + $this->frameFilters = []; + return $this; + } + /** * Registers this instance as an error handler. * @@ -179,6 +206,7 @@ final class Run implements RunInterface class_exists("\\Whoops\\Exception\\FrameCollection"); class_exists("\\Whoops\\Exception\\Frame"); class_exists("\\Whoops\\Exception\\Inspector"); + class_exists("\\Whoops\\Inspector\\InspectorFactory"); $this->system->setErrorHandler([$this, self::ERROR_HANDLER]); $this->system->setExceptionHandler([$this, self::EXCEPTION_HANDLER]); @@ -488,14 +516,38 @@ final class Run implements RunInterface } } + + /** + * @param InspectorFactoryInterface $factory + * + * @return void + */ + public function setInspectorFactory(InspectorFactoryInterface $factory) + { + $this->inspectorFactory = $factory; + } + + public function addFrameFilter($filterCallback) + { + if (!is_callable($filterCallback)) { + throw new \InvalidArgumentException(sprintf( + "A frame filter must be of type callable, %s type given.", + gettype($filterCallback) + )); + } + + $this->frameFilters[] = $filterCallback; + return $this; + } + /** * @param Throwable $exception * - * @return Inspector + * @return InspectorInterface */ private function getInspector($exception) { - return new Inspector($exception); + return $this->inspectorFactory->create($exception); } /** diff --git a/vendor/filp/whoops/src/Whoops/RunInterface.php b/vendor/filp/whoops/src/Whoops/RunInterface.php index 8162fe4d..0ef3e3ff 100644 --- a/vendor/filp/whoops/src/Whoops/RunInterface.php +++ b/vendor/filp/whoops/src/Whoops/RunInterface.php @@ -49,6 +49,16 @@ interface RunInterface */ public function clearHandlers(); + /** + * @return array + */ + public function getFrameFilters(); + + /** + * @return Run + */ + public function clearFrameFilters(); + /** * Registers this instance as an error handler. * @@ -137,4 +147,12 @@ interface RunInterface * Special case to deal with Fatal errors and the like. */ public function handleShutdown(); + + /** + * Registers a filter callback in the frame filters stack. + * + * @param callable $filterCallback + * @return \Whoops\Run + */ + public function addFrameFilter($filterCallback); } diff --git a/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php b/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php index 9c7cec23..8e4df328 100644 --- a/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php +++ b/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php @@ -232,7 +232,6 @@ class TemplateHelper * passed to the template. * * @param string $template - * @param array $additionalVariables */ public function render($template, array $additionalVariables = null) { @@ -254,8 +253,6 @@ class TemplateHelper /** * Sets the variables to be passed to all templates rendered * by this template helper. - * - * @param array $variables */ public function setVariables(array $variables) { diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md index a078bfbb..13709d1b 100644 --- a/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -2,6 +2,106 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. + +## 7.8.1 - 2023-12-03 + +### Changed + +- Updated links in docs to their canonical versions +- Replaced `call_user_func*` with native calls + + +## 7.8.0 - 2023-08-27 + +### Added + +- Support for PHP 8.3 +- Added automatic closing of handles on `CurlFactory` object destruction + + +## 7.7.1 - 2023-08-27 + +### Changed + +- Remove the need for `AllowDynamicProperties` in `CurlMultiHandler` + + +## 7.7.0 - 2023-05-21 + +### Added + +- Support `guzzlehttp/promises` v2 + + +## 7.6.1 - 2023-05-15 + +### Fixed + +- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values + + +## 7.6.0 - 2023-05-14 + +### Added + +- Support for setting the minimum TLS version in a unified way +- Apply on request the version set in options parameters + + +## 7.5.2 - 2023-05-14 + +### Fixed + +- Fixed set cookie constructor validation +- Fixed handling of files with `'0'` body + +### Changed + +- Corrected docs and default connect timeout value to 300 seconds + + +## 7.5.1 - 2023-04-17 + +### Fixed + +- Fixed `NO_PROXY` settings so that setting the `proxy` option to `no` overrides the env variable + +### Changed + +- Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5` + + +## 7.5.0 - 2022-08-28 + +### Added + +- Support PHP 8.2 +- Add request to delay closure params + + +## 7.4.5 - 2022-06-20 + +### Fixed + +* Fix change in port should be considered a change in origin +* Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin + + +## 7.4.4 - 2022-06-09 + +### Fixed + +* Fix failure to strip Authorization header on HTTP downgrade +* Fix failure to strip the Cookie header on change in host or HTTP downgrade + + +## 7.4.3 - 2022-05-25 + +### Fixed + +* Fix cross-domain cookie leakage + + ## 7.4.2 - 2022-03-20 ### Fixed @@ -10,6 +110,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Reject non-HTTP schemes in StreamHandler - Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve` + ## 7.4.1 - 2021-12-06 ### Changed @@ -21,6 +122,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950) + ## 7.4.0 - 2021-10-18 ### Added @@ -38,6 +140,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945) + ## 7.3.0 - 2021-03-23 ### Added @@ -50,6 +153,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872) + ## 7.2.0 - 2020-10-10 ### Added @@ -72,6 +176,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786) + ## 7.1.1 - 2020-09-30 ### Fixed @@ -83,6 +188,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - We dont connect curl `sink` on HEAD requests. - Removed some PHP 5 workarounds + ## 7.1.0 - 2020-09-22 ### Added @@ -105,14 +211,17 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - `Utils::defaultCaBundle()` - `CurlFactory::LOW_CURL_VERSION_NUMBER` + ## 7.0.1 - 2020-06-27 * Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699) + ## 7.0.0 - 2020-06-27 No changes since 7.0.0-rc1. + ## 7.0.0-rc1 - 2020-06-15 ### Changed @@ -120,6 +229,7 @@ No changes since 7.0.0-rc1. * Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629) * Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675) + ## 7.0.0-beta2 - 2020-05-25 ### Added @@ -145,6 +255,7 @@ No changes since 7.0.0-rc1. * Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528) + ## 7.0.0-beta1 - 2019-12-30 The diff might look very big but 95% of Guzzle users will be able to upgrade without modification. @@ -178,15 +289,18 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440) * Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464) + ## 6.5.2 - 2019-12-23 * idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489) + ## 6.5.1 - 2019-12-21 * Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454) * IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424) + ## 6.5.0 - 2019-12-07 * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143) @@ -196,11 +310,13 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348) * Deprecated `ClientInterface::VERSION` + ## 6.4.1 - 2019-10-23 * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar` + ## 6.4.0 - 2019-10-23 * Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) @@ -213,6 +329,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335) * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362) + ## 6.3.3 - 2018-04-22 * Fix: Default headers when decode_content is specified @@ -254,13 +371,14 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) * Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) - + Minor code cleanups, documentation fixes and clarifications. + ## 6.2.3 - 2017-02-28 * Fix deprecations with guzzle/psr7 version 1.4 + ## 6.2.2 - 2016-10-08 * Allow to pass nullable Response to delay callable @@ -268,6 +386,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix drain case where content-length is the literal string zero * Obfuscate in-URL credentials in exceptions + ## 6.2.1 - 2016-07-18 * Address HTTP_PROXY security vulnerability, CVE-2016-5385: @@ -278,6 +397,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c a server does not honor `Connection: close`. * Ignore URI fragment when sending requests. + ## 6.2.0 - 2016-03-21 * Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. @@ -297,6 +417,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: provide an empty string to `http_build_query` for HHVM workaround. https://github.com/guzzle/guzzle/pull/1367 + ## 6.1.1 - 2015-11-22 * Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler @@ -312,6 +433,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: fixed regression where MockHandler was not using `sink`. https://github.com/guzzle/guzzle/pull/1292 + ## 6.1.0 - 2015-09-08 * Feature: Added the `on_stats` request option to provide access to transfer @@ -346,6 +468,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. https://github.com/guzzle/guzzle/pull/1189 + ## 6.0.2 - 2015-07-04 * Fixed a memory leak in the curl handlers in which references to callbacks @@ -363,6 +486,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Functions are now conditionally required using an additional level of indirection to help with global Composer installations. + ## 6.0.1 - 2015-05-27 * Fixed a bug with serializing the `query` request option where the `&` @@ -371,6 +495,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c use `form_params` or `multipart` instead. * Various doc fixes. + ## 6.0.0 - 2015-05-26 * See the UPGRADING.md document for more information. @@ -395,6 +520,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `$maxHandles` has been removed from CurlMultiHandler. * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + ## 5.3.0 - 2015-05-19 * Mock now supports `save_to` @@ -405,6 +531,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. * URL scheme is now always lowercased. + ## 6.0.0-beta.1 * Requires PHP >= 5.5 @@ -457,6 +584,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `GuzzleHttp\QueryParser` has been replaced with the `GuzzleHttp\Psr7\parse_query`. + ## 5.2.0 - 2015-01-27 * Added `AppliesHeadersInterface` to make applying headers to a request based @@ -467,6 +595,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c RingBridge. * Added a guard in the Pool class to not use recursion for request retries. + ## 5.1.0 - 2014-12-19 * Pool class no longer uses recursion when a request is intercepted. @@ -487,6 +616,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle specific exceptions if necessary. + ## 5.0.3 - 2014-11-03 This change updates query strings so that they are treated as un-encoded values @@ -501,6 +631,7 @@ string that should not be parsed or encoded (unless a call to getQuery() is subsequently made, forcing the query-string to be converted into a Query object). + ## 5.0.2 - 2014-10-30 * Added a trailing `\r\n` to multipart/form-data payloads. See @@ -520,7 +651,9 @@ object). * Note: This has been changed in 5.0.3 to now encode query string values by default unless the `rawString` argument is provided when setting the query string on a URL: Now allowing many more characters to be present in the - query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A + query string without being percent encoded. See + https://datatracker.ietf.org/doc/html/rfc3986#appendix-A + ## 5.0.1 - 2014-10-16 @@ -533,6 +666,7 @@ Bugfix release. * Fixed an issue where transfer statistics were not being populated in the RingBridge. https://github.com/guzzle/guzzle/issues/866 + ## 5.0.0 - 2014-10-12 Adding support for non-blocking responses and some minor API cleanup. @@ -614,6 +748,7 @@ interfaces. argument. They now accept an associative array of options, including the "size" key and "metadata" key which can be used to provide custom metadata. + ## 4.2.2 - 2014-09-08 * Fixed a memory leak in the CurlAdapter when reusing cURL handles. @@ -1056,7 +1191,7 @@ interfaces. ## 3.4.0 - 2013-04-11 -* Bug fix: URLs are now resolved correctly based on https://tools.ietf.org/html/rfc3986#section-5.2. #289 +* Bug fix: URLs are now resolved correctly based on https://datatracker.ietf.org/doc/html/rfc3986#section-5.2. #289 * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md index 0025aa7a..6d78a930 100644 --- a/vendor/guzzlehttp/guzzle/README.md +++ b/vendor/guzzlehttp/guzzle/README.md @@ -3,7 +3,7 @@ # Guzzle, PHP HTTP client [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) -[![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) +[![Build Status](https://img.shields.io/github/actions/workflow/status/guzzle/guzzle/ci.yml?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI) [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and @@ -42,9 +42,9 @@ $promise->wait(); We use GitHub issues only to discuss bugs and new features. For support please refer to: -- [Documentation](http://guzzlephp.org/) -- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) -- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](http://slack.httplug.io/) +- [Documentation](https://docs.guzzlephp.org) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/guzzle) +- [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](https://slack.httplug.io/) - [Gitter](https://gitter.im/guzzle/guzzle) @@ -60,23 +60,23 @@ composer require guzzlehttp/guzzle ## Version Guidance -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | -| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | -| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | -| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >= 7.2 | +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | +| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | +| 6.x | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | +| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.4 | [guzzle-3-repo]: https://github.com/guzzle/guzzle3 [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 [guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5 [guzzle-7-repo]: https://github.com/guzzle/guzzle -[guzzle-3-docs]: http://guzzle3.readthedocs.org -[guzzle-5-docs]: http://docs.guzzlephp.org/en/5.3/ -[guzzle-6-docs]: http://docs.guzzlephp.org/en/6.5/ -[guzzle-7-docs]: http://docs.guzzlephp.org/en/latest/ +[guzzle-3-docs]: https://guzzle3.readthedocs.io/ +[guzzle-5-docs]: https://docs.guzzlephp.org/en/5.3/ +[guzzle-6-docs]: https://docs.guzzlephp.org/en/6.5/ +[guzzle-7-docs]: https://docs.guzzlephp.org/en/latest/ ## Security diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md index 45417a7e..4efbb596 100644 --- a/vendor/guzzlehttp/guzzle/UPGRADING.md +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -27,7 +27,7 @@ Please make sure: - Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. - Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. -- Request option `exception` is removed. Please use `http_errors`. +- Request option `exceptions` is removed. Please use `http_errors`. - Request option `save_to` is removed. Please use `sink`. - Pool option `pool_size` is removed. Please use `concurrency`. - We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. @@ -189,11 +189,11 @@ $client = new GuzzleHttp\Client(['handler' => $handler]); ## POST Requests -This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) +This version added the [`form_params`](https://docs.guzzlephp.org/en/latest/request-options.html#form_params) and `multipart` request options. `form_params` is an associative array of strings or array of strings and is used to serialize an `application/x-www-form-urlencoded` POST request. The -[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) +[`multipart`](https://docs.guzzlephp.org/en/latest/request-options.html#multipart) option is now used to send a multipart/form-data POST request. `GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add @@ -209,7 +209,7 @@ The `base_url` option has been renamed to `base_uri`. ## Rewritten Adapter Layer -Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send +Guzzle now uses [RingPHP](https://ringphp.readthedocs.org/en/latest) to send HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor is still supported, but it has now been renamed to `handler`. Instead of passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP @@ -575,7 +575,7 @@ You can intercept a request and inject a response using the `intercept()` event of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and `GuzzleHttp\Event\ErrorEvent` event. -See: http://docs.guzzlephp.org/en/latest/events.html +See: https://docs.guzzlephp.org/en/latest/events.html ## Inflection @@ -668,9 +668,9 @@ in separate repositories: The service description layer of Guzzle has moved into two separate packages: -- http://github.com/guzzle/command Provides a high level abstraction over web +- https://github.com/guzzle/command Provides a high level abstraction over web services by representing web service operations using commands. -- http://github.com/guzzle/guzzle-services Provides an implementation of +- https://github.com/guzzle/guzzle-services Provides an implementation of guzzle/command that provides request serialization and response parsing using Guzzle service descriptions. @@ -870,7 +870,7 @@ HeaderInterface (e.g. toArray(), getAll(), etc.). 3.3 to 3.4 ---------- -Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. +Base URLs of a client now follow the rules of https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2 when merging URLs. 3.2 to 3.3 ---------- diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json index 9d60de42..69583d7c 100644 --- a/vendor/guzzlehttp/guzzle/composer.json +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -53,8 +53,8 @@ "require": { "php": "^7.2.5 || ^8.0", "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -63,9 +63,10 @@ }, "require-dev": { "ext-curl": "*", - "bamarni/composer-bin-plugin": "^1.4.1", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "bamarni/composer-bin-plugin": "^1.8.2", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -81,8 +82,9 @@ "sort-packages": true }, "extra": { - "branch-alias": { - "dev-master": "7.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php index 58f1d891..bc6efc90 100644 --- a/vendor/guzzlehttp/guzzle/src/Client.php +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -120,13 +120,14 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface public function send(RequestInterface $request, array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; + return $this->sendAsync($request, $options)->wait(); } /** * The HttpClient PSR (PSR-18) specify this method. * - * @inheritDoc + * {@inheritDoc} */ public function sendRequest(RequestInterface $request): ResponseInterface { @@ -184,6 +185,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface public function request(string $method, $uri = '', array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; + return $this->requestAsync($method, $uri, $options)->wait(); } @@ -200,7 +202,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. */ - public function getConfig(?string $option = null) + public function getConfig(string $option = null) { return $option === null ? $this->config @@ -228,11 +230,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface { $defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => false, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false, + 'idn_conversion' => false, ]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. @@ -354,10 +356,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface if (isset($options['form_params'])) { if (isset($options['multipart'])) { throw new InvalidArgumentException('You cannot use ' - . 'form_params and multipart at the same time. Use the ' - . 'form_params option if you want to send application/' - . 'x-www-form-urlencoded requests, and the multipart ' - . 'option to send multipart/form-data requests.'); + .'form_params and multipart at the same time. Use the ' + .'form_params option if you want to send application/' + .'x-www-form-urlencoded requests, and the multipart ' + .'option to send multipart/form-data requests.'); } $options['body'] = \http_build_query($options['form_params'], '', '&'); unset($options['form_params']); @@ -403,7 +405,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // Ensure that we don't have the header in different case and set the new value. $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); $modify['set_headers']['Authorization'] = 'Basic ' - . \base64_encode("$value[0]:$value[1]"); + .\base64_encode("$value[0]:$value[1]"); break; case 'digest': // @todo: Do not rely on curl @@ -437,13 +439,17 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface } } + if (isset($options['version'])) { + $modify['version'] = $options['version']; + } + $request = Psr7\Utils::modifyRequest($request, $modify); if ($request->getBody() instanceof Psr7\MultipartStream) { // Use a multipart/form-data POST if a Content-Type is not set. // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - . $request->getBody()->getBoundary(); + .$request->getBody()->getBoundary(); } // Merge in conditional headers if they are not present. @@ -469,9 +475,9 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface private function invalidBody(): InvalidArgumentException { return new InvalidArgumentException('Passing in the "body" request ' - . 'option as an array to send a request is not supported. ' - . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or the "multipart" ' - . 'request option to send a multipart/form-data request.'); + .'option as an array to send a request is not supported. ' + .'Please use the "form_params" request option to send a ' + .'application/x-www-form-urlencoded request, or the "multipart" ' + .'request option to send a multipart/form-data request.'); } } diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php index 6aaee61a..1788e16a 100644 --- a/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -80,5 +80,5 @@ interface ClientInterface * * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. */ - public function getConfig(?string $option = null); + public function getConfig(string $option = null); } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php index d6757c65..c29b4b7e 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -50,10 +50,10 @@ class CookieJar implements CookieJarInterface $cookieJar = new self(); foreach ($cookies as $name => $value) { $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true, ])); } @@ -96,9 +96,6 @@ class CookieJar implements CookieJarInterface return null; } - /** - * @inheritDoc - */ public function toArray(): array { return \array_map(static function (SetCookie $cookie): array { @@ -106,13 +103,11 @@ class CookieJar implements CookieJarInterface }, $this->getIterator()->getArrayCopy()); } - /** - * @inheritDoc - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void + public function clear(string $domain = null, string $path = null, string $name = null): void { if (!$domain) { $this->cookies = []; + return; } elseif (!$path) { $this->cookies = \array_filter( @@ -125,25 +120,22 @@ class CookieJar implements CookieJarInterface $this->cookies = \array_filter( $this->cookies, static function (SetCookie $cookie) use ($path, $domain): bool { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); + return !($cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); } ); } else { $this->cookies = \array_filter( $this->cookies, static function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); + return !($cookie->getName() == $name + && $cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); } ); } } - /** - * @inheritDoc - */ public function clearSessionCookies(): void { $this->cookies = \array_filter( @@ -154,9 +146,6 @@ class CookieJar implements CookieJarInterface ); } - /** - * @inheritDoc - */ public function setCookie(SetCookie $cookie): bool { // If the name string is empty (but not 0), ignore the set-cookie @@ -170,20 +159,20 @@ class CookieJar implements CookieJarInterface $result = $cookie->validate(); if ($result !== true) { if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); + throw new \RuntimeException('Invalid cookie: '.$result); } $this->removeCookieIfEmpty($cookie); + return false; } // Resolve conflicts with previously set cookies foreach ($this->cookies as $i => $c) { - // Two cookies are identical, when their path, and domain are // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() + if ($c->getPath() != $cookie->getPath() + || $c->getDomain() != $cookie->getDomain() + || $c->getName() != $cookie->getName() ) { continue; } @@ -241,6 +230,11 @@ class CookieJar implements CookieJarInterface if (0 !== \strpos($sc->getPath(), '/')) { $sc->setPath($this->getCookiePathFromRequest($request)); } + if (!$sc->matchesDomain($request->getUri()->getHost())) { + continue; + } + // Note: At this point `$sc->getDomain()` being a public suffix should + // be rejected, but we don't want to pull in the full PSL dependency. $this->setCookie($sc); } } @@ -249,7 +243,7 @@ class CookieJar implements CookieJarInterface /** * Computes cookie path following RFC 6265 section 5.1.4 * - * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4 */ private function getCookiePathFromRequest(RequestInterface $request): string { @@ -280,13 +274,13 @@ class CookieJar implements CookieJarInterface $path = $uri->getPath() ?: '/'; foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') + if ($cookie->matchesPath($path) + && $cookie->matchesDomain($host) + && !$cookie->isExpired() + && (!$cookie->getSecure() || $scheme === 'https') ) { - $values[] = $cookie->getName() . '=' - . $cookie->getValue(); + $values[] = $cookie->getName().'=' + .$cookie->getValue(); } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php index 7df374b5..8c55cc6f 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -13,7 +13,8 @@ use Psr\Http\Message\ResponseInterface; * necessary. Subclasses are also responsible for storing and retrieving * cookies from a file, database, etc. * - * @link https://docs.python.org/2/library/cookielib.html Inspiration + * @see https://docs.python.org/2/library/cookielib.html Inspiration + * * @extends \IteratorAggregate */ interface CookieJarInterface extends \Countable, \IteratorAggregate @@ -61,7 +62,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * @param string|null $path Clears cookies matching a domain and path * @param string|null $name Clears cookies matching a domain, path, and name */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; + public function clear(string $domain = null, string $path = null, string $name = null): void; /** * Discard all sessions cookies. diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php index 5d51ca98..cb3e67c6 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -71,7 +71,7 @@ class SessionCookieJar extends CookieJar $this->setCookie(new SetCookie($cookie)); } } elseif (\strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); + throw new \RuntimeException('Invalid cookie data'); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php index 7c04034d..c9806da8 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -11,15 +11,15 @@ class SetCookie * @var array */ private static $defaults = [ - 'Name' => null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false + 'Name' => null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false, ]; /** @@ -58,7 +58,13 @@ class SetCookie } else { foreach (\array_keys(self::$defaults) as $search) { if (!\strcasecmp($search, $key)) { - $data[$search] = $value; + if ($search === 'Max-Age') { + if (is_numeric($value)) { + $data[$search] = (int) $value; + } + } else { + $data[$search] = $value; + } continue 2; } } @@ -74,13 +80,49 @@ class SetCookie */ public function __construct(array $data = []) { - /** @var array|null $replaced will be null in case of replace error */ - $replaced = \array_replace(self::$defaults, $data); - if ($replaced === null) { - throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); + $this->data = self::$defaults; + + if (isset($data['Name'])) { + $this->setName($data['Name']); + } + + if (isset($data['Value'])) { + $this->setValue($data['Value']); + } + + if (isset($data['Domain'])) { + $this->setDomain($data['Domain']); + } + + if (isset($data['Path'])) { + $this->setPath($data['Path']); + } + + if (isset($data['Max-Age'])) { + $this->setMaxAge($data['Max-Age']); + } + + if (isset($data['Expires'])) { + $this->setExpires($data['Expires']); + } + + if (isset($data['Secure'])) { + $this->setSecure($data['Secure']); + } + + if (isset($data['Discard'])) { + $this->setDiscard($data['Discard']); + } + + if (isset($data['HttpOnly'])) { + $this->setHttpOnly($data['HttpOnly']); + } + + // Set the remaining values that don't have extra validation logic + foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { + $this->data[$key] = $data[$key]; } - $this->data = $replaced; // Extract the Expires value and turn it into a UNIX timestamp if needed if (!$this->getExpires() && $this->getMaxAge()) { // Calculate the Expires date @@ -92,13 +134,13 @@ class SetCookie public function __toString() { - $str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; '; + $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; '; foreach ($this->data as $k => $v) { if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { if ($k === 'Expires') { - $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; + $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; '; } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; + $str .= ($v === true ? $k : "{$k}={$v}").'; '; } } } @@ -378,21 +420,23 @@ class SetCookie } // Remove the leading '.' as per spec in RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = \ltrim($cookieDomain, '.'); + // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3 + $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); + + $domain = \strtolower($domain); // Domain not set or exact match. - if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) { + if ('' === $cookieDomain || $domain === $cookieDomain) { return true; } // Matching the subdomain according to RFC 6265. - // https://tools.ietf.org/html/rfc6265#section-5.1.3 + // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 if (\filter_var($domain, \FILTER_VALIDATE_IP)) { return false; } - return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); + return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); } /** @@ -421,8 +465,8 @@ class SetCookie $name )) { return 'Cookie name must not contain invalid characters: ASCII ' - . 'Control characters (0-31;127), space, tab and the ' - . 'following characters: ()<>@,;:\"/?={}'; + .'Control characters (0-31;127), space, tab and the ' + .'following characters: ()<>@,;:\"/?={}'; } // Value must not be null. 0 and empty string are valid. Empty strings diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php index 0c45089f..16a94223 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php @@ -51,7 +51,7 @@ class CurlFactory implements CurlFactoryInterface unset($options['curl']['body_as_string']); } - $easy = new EasyHandle; + $easy = new EasyHandle(); $easy->request = $request; $easy->options = $options; $conf = $this->getDefaultConf($easy); @@ -161,11 +161,11 @@ class CurlFactory implements CurlFactoryInterface private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface { static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, + \CURLE_OPERATION_TIMEOUTED => true, \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, + \CURLE_COULDNT_CONNECT => true, + \CURLE_SSL_CONNECT_ERROR => true, + \CURLE_GOT_NOTHING => true, ]; if ($easy->createResponseException) { @@ -219,12 +219,12 @@ class CurlFactory implements CurlFactoryInterface private function getDefaultConf(EasyHandle $easy): array { $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + '_headers' => $easy->request->getHeaders(), + \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), \CURLOPT_RETURNTRANSFER => false, - \CURLOPT_HEADER => false, - \CURLOPT_CONNECTTIMEOUT => 150, + \CURLOPT_HEADER => false, + \CURLOPT_CONNECTTIMEOUT => 300, ]; if (\defined('CURLOPT_PROTOCOLS')) { @@ -250,12 +250,13 @@ class CurlFactory implements CurlFactoryInterface if ($size === null || $size > 0) { $this->applyBody($easy->request, $easy->options, $conf); + return; } $method = $easy->request->getMethod(); if ($method === 'PUT' || $method === 'POST') { - // See https://tools.ietf.org/html/rfc7230#section-3.3.2 + // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2 if (!$easy->request->hasHeader('Content-Length')) { $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; } @@ -341,6 +342,7 @@ class CurlFactory implements CurlFactoryInterface foreach (\array_keys($options['_headers']) as $key) { if (!\strcasecmp($key, $name)) { unset($options['_headers'][$key]); + return; } } @@ -365,11 +367,11 @@ class CurlFactory implements CurlFactoryInterface // If it's a directory or a link to a directory use CURLOPT_CAPATH. // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. if ( - \is_dir($options['verify']) || - ( - \is_link($options['verify']) === true && - ($verifyLink = \readlink($options['verify'])) !== false && - \is_dir($verifyLink) + \is_dir($options['verify']) + || ( + \is_link($options['verify']) === true + && ($verifyLink = \readlink($options['verify'])) !== false + && \is_dir($verifyLink) ) ) { $conf[\CURLOPT_CAPATH] = $options['verify']; @@ -443,13 +445,41 @@ class CurlFactory implements CurlFactoryInterface $scheme = $easy->request->getUri()->getScheme(); if (isset($options['proxy'][$scheme])) { $host = $easy->request->getUri()->getHost(); - if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) { + if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) { + unset($conf[\CURLOPT_PROXY]); + } else { $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; } } } } + if (isset($options['crypto_method'])) { + if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_0')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_1')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_2')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; + } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_3')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; + } else { + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + } + if (isset($options['cert'])) { $cert = $options['cert']; if (\is_array($cert)) { @@ -459,8 +489,8 @@ class CurlFactory implements CurlFactoryInterface if (!\file_exists($cert)) { throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); } - # OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. - # see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html + // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. + // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html $ext = pathinfo($cert, \PATHINFO_EXTENSION); if (preg_match('#^(der|p12)$#i', $ext)) { $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext); @@ -523,9 +553,10 @@ class CurlFactory implements CurlFactoryInterface } } catch (\RuntimeException $e) { $ctx['error'] = 'The connection unexpectedly failed without ' - . 'providing an error. The request would have been retried, ' - . 'but attempting to rewind the request body failed. ' - . 'Exception: ' . $e; + .'providing an error. The request would have been retried, ' + .'but attempting to rewind the request body failed. ' + .'Exception: '.$e; + return self::createRejection($easy, $ctx); } @@ -534,14 +565,15 @@ class CurlFactory implements CurlFactoryInterface $easy->options['_curl_retries'] = 1; } elseif ($easy->options['_curl_retries'] == 2) { $ctx['error'] = 'The cURL request was retried 3 times ' - . 'and did not succeed. The most likely reason for the failure ' - . 'is that cURL was unable to rewind the body of the request ' - . 'and subsequent retries resulted in the same error. Turn on ' - . 'the debug option to see what went wrong. See ' - . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + .'and did not succeed. The most likely reason for the failure ' + .'is that cURL was unable to rewind the body of the request ' + .'and subsequent retries resulted in the same error. Turn on ' + .'the debug option to see what went wrong. See ' + .'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); } else { - $easy->options['_curl_retries']++; + ++$easy->options['_curl_retries']; } return $handler($easy->request, $easy->options); @@ -571,6 +603,7 @@ class CurlFactory implements CurlFactoryInterface $easy->createResponse(); } catch (\Exception $e) { $easy->createResponseException = $e; + return -1; } if ($onHeaders !== null) { @@ -580,6 +613,7 @@ class CurlFactory implements CurlFactoryInterface // Associate the exception with the handle and trigger // a curl header write error by returning 0. $easy->onHeadersException = $e; + return -1; } } @@ -589,7 +623,16 @@ class CurlFactory implements CurlFactoryInterface } else { $easy->headers[] = $value; } + return \strlen($h); }; } + + public function __destruct() + { + foreach ($this->handles as $id => $handle) { + \curl_close($handle); + unset($this->handles[$id]); + } + } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php index 2f5b3f69..a64e1821 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -15,8 +15,6 @@ use Psr\Http\Message\RequestInterface; * associative array of curl option constants mapping to values in the * **curl** key of the provided request options. * - * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle. - * * @final */ class CurlMultiHandler @@ -55,6 +53,9 @@ class CurlMultiHandler */ private $options = []; + /** @var resource|\CurlMultiHandle */ + private $_mh; + /** * This handler accepts the following options: * @@ -78,6 +79,10 @@ class CurlMultiHandler } $this->options = $options['options'] ?? []; + + // unsetting the property forces the first access to go through + // __get(). + unset($this->_mh); } /** @@ -163,7 +168,8 @@ class CurlMultiHandler \usleep(250); } - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM); + while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { + } $this->processMessages(); } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php index 224344d7..1bc39f4b 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -106,7 +106,7 @@ final class EasyHandle */ public function __get($name) { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; + $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name; throw new \BadMethodCallException($msg); } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php index a0988845..5554b8fa 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php @@ -14,9 +14,9 @@ final class HeaderProcessor * * @param string[] $headers * - * @throws \RuntimeException - * * @return array{0:string, 1:int, 2:?string, 3:array} + * + * @throws \RuntimeException */ public static function parseHeaders(array $headers): array { diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php index 79664e27..77ffed52 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -138,6 +138,7 @@ class MockHandler implements \Countable if ($this->onRejected) { ($this->onRejected)($reason); } + return P\Create::rejectionFor($reason); } ); @@ -159,7 +160,7 @@ class MockHandler implements \Countable ) { $this->queue[] = $value; } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value)); + throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 543f825a..61632f56 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -67,7 +67,7 @@ class StreamHandler if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed || false !== \strpos($message, 'Connection refused') || false !== \strpos($message, "couldn't connect to host") // error on HHVM - || false !== \strpos($message, "connection attempt failed") + || false !== \strpos($message, 'connection attempt failed') ) { $e = new ConnectException($e->getMessage(), $request, $e); } else { @@ -231,9 +231,10 @@ class StreamHandler \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { $errors[] = [ 'message' => $msg, - 'file' => $file, - 'line' => $line + 'file' => $file, + 'line' => $line, ]; + return true; }); @@ -247,7 +248,7 @@ class StreamHandler $message = 'Error creating resource: '; foreach ($errors as $err) { foreach ($err as $key => $value) { - $message .= "[$key] $value" . \PHP_EOL; + $message .= "[$key] $value".\PHP_EOL; } } throw new \RuntimeException(\trim($message)); @@ -350,6 +351,7 @@ class StreamHandler if (false === $records || !isset($records[0]['ip'])) { throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); } + return $uri->withHost($records[0]['ip']); } if ('v6' === $options['force_ip_resolve']) { @@ -357,7 +359,8 @@ class StreamHandler if (false === $records || !isset($records[0]['ipv6'])) { throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); } - return $uri->withHost('[' . $records[0]['ipv6'] . ']'); + + return $uri->withHost('['.$records[0]['ipv6'].']'); } } @@ -375,11 +378,11 @@ class StreamHandler $context = [ 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, + 'method' => $request->getMethod(), + 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, + 'ignore_errors' => true, + 'follow_location' => 0, ], 'ssl' => [ 'peer_name' => $request->getUri()->getHost(), @@ -388,7 +391,7 @@ class StreamHandler $body = (string) $request->getBody(); - if (!empty($body)) { + if ('' !== $body) { $context['http']['content'] = $body; // Prevent the HTTP handler from adding a Content-Type header. if (!$request->hasHeader('Content-Type')) { @@ -472,6 +475,25 @@ class StreamHandler } } + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void + { + if ( + $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT + || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) + ) { + $options['http']['crypto_method'] = $value; + + return; + } + + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + /** * @param mixed $value as passed via Request transfer options. */ @@ -542,27 +564,27 @@ class StreamHandler } static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', + \STREAM_NOTIFY_CONNECT => 'CONNECT', \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - \STREAM_NOTIFY_PROGRESS => 'PROGRESS', - \STREAM_NOTIFY_FAILURE => 'FAILURE', - \STREAM_NOTIFY_COMPLETED => 'COMPLETED', - \STREAM_NOTIFY_RESOLVE => 'RESOLVE', + \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + \STREAM_NOTIFY_PROGRESS => 'PROGRESS', + \STREAM_NOTIFY_FAILURE => 'FAILURE', + \STREAM_NOTIFY_COMPLETED => 'COMPLETED', + \STREAM_NOTIFY_RESOLVE => 'RESOLVE', ]; static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; $value = Utils::debugResource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); self::addNotification( $params, static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i] . ': "' . $v . '" '); + \fwrite($value, $args[$i].': "'.$v.'" '); } \fwrite($value, "\n"); } @@ -577,7 +599,7 @@ class StreamHandler } else { $params['notification'] = self::callArray([ $params['notification'], - $notify + $notify, ]); } } diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php index e0a1d119..6cb12f07 100644 --- a/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -44,7 +44,7 @@ class HandlerStack * handler is provided, the best handler for your * system will be utilized. */ - public static function create(?callable $handler = null): self + public static function create(callable $handler = null): self { $stack = new self($handler ?: Utils::chooseHandler()); $stack->push(Middleware::httpErrors(), 'http_errors'); @@ -86,14 +86,14 @@ class HandlerStack $stack = []; if ($this->handler !== null) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + $stack[] = '0) Handler: '.$this->debugCallable($this->handler); } $result = ''; foreach (\array_reverse($this->stack) as $tuple) { - $depth++; + ++$depth; $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); + $str .= 'Function: '.$this->debugCallable($tuple[0]); $result = "> {$str}\n{$result}"; $stack[] = $str; } @@ -122,7 +122,7 @@ class HandlerStack */ public function hasHandler(): bool { - return $this->handler !== null ; + return $this->handler !== null; } /** @@ -131,7 +131,7 @@ class HandlerStack * @param callable(callable): callable $middleware Middleware function * @param string $name Name to register for this middleware. */ - public function unshift(callable $middleware, ?string $name = null): void + public function unshift(callable $middleware, string $name = null): void { \array_unshift($this->stack, [$middleware, $name]); $this->cached = null; @@ -266,10 +266,10 @@ class HandlerStack if (\is_array($fn)) { return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; + : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])"; } /** @var object $fn */ - return 'callable(' . \spl_object_hash($fn) . ')'; + return 'callable('.\spl_object_hash($fn).')'; } } diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php index da499547..04e9eb37 100644 --- a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -40,11 +40,11 @@ class MessageFormatter implements MessageFormatterInterface /** * Apache Common Log Format. * - * @link https://httpd.apache.org/docs/2.4/logs.html#common + * @see https://httpd.apache.org/docs/2.4/logs.html#common * * @var string */ - public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}"; + public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}'; public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; @@ -68,7 +68,7 @@ class MessageFormatter implements MessageFormatterInterface * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string + public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string { $cache = []; @@ -90,9 +90,9 @@ class MessageFormatter implements MessageFormatterInterface break; case 'req_headers': $result = \trim($request->getMethod() - . ' ' . $request->getRequestTarget()) - . ' HTTP/' . $request->getProtocolVersion() . "\r\n" - . $this->headers($request); + .' '.$request->getRequestTarget()) + .' HTTP/'.$request->getProtocolVersion()."\r\n" + .$this->headers($request); break; case 'res_headers': $result = $response ? @@ -101,7 +101,7 @@ class MessageFormatter implements MessageFormatterInterface $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase() - ) . "\r\n" . $this->headers($response) + )."\r\n".$this->headers($response) : 'NULL'; break; case 'req_body': @@ -177,6 +177,7 @@ class MessageFormatter implements MessageFormatterInterface } $cache[$matches[1]] = $result; + return $result; }, $this->template @@ -190,7 +191,7 @@ class MessageFormatter implements MessageFormatterInterface { $result = ''; foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; + $result .= $name.': '.\implode(', ', $values)."\r\n"; } return \trim($result); diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php index a39ac248..47934614 100644 --- a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php @@ -14,5 +14,5 @@ interface MessageFormatterInterface * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string; + public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string; } diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php index 7035c77f..7e3eb6b3 100644 --- a/vendor/guzzlehttp/guzzle/src/Middleware.php +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -34,10 +34,12 @@ final class Middleware } $cookieJar = $options['cookies']; $request = $cookieJar->withCookieHeader($request); + return $handler($request, $options) ->then( static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { $cookieJar->extractCookies($request, $response); + return $response; } ); @@ -60,6 +62,7 @@ final class Middleware if (empty($options['http_errors'])) { return $handler($request, $options); } + return $handler($request, $options)->then( static function (ResponseInterface $response) use ($request, $bodySummarizer) { $code = $response->getStatusCode(); @@ -93,20 +96,22 @@ final class Middleware return $handler($request, $options)->then( static function ($value) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => $value, - 'error' => null, - 'options' => $options + 'error' => null, + 'options' => $options, ]; + return $value; }, static function ($reason) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => null, - 'error' => $reason, - 'options' => $options + 'error' => $reason, + 'options' => $options, ]; + return P\Create::rejectionFor($reason); } ); @@ -138,6 +143,7 @@ final class Middleware if ($after) { $after($request, $options, $response); } + return $response; }; }; @@ -202,12 +208,14 @@ final class Middleware static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { $message = $formatter->format($request, $response); $logger->log($logLevel, $message); + return $response; }, static function ($reason) use ($logger, $request, $formatter): PromiseInterface { $response = $reason instanceof RequestException ? $reason->getResponse() : null; $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); $logger->error($message); + return P\Create::rejectionFor($reason); } ); diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php index 7ca62833..0a8de812 100644 --- a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -84,6 +84,7 @@ class PrepareBodyMiddleware // The expect header is unconditionally enabled if ($expect === true) { $modify['set_headers']['Expect'] = '100-Continue'; + return; } diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index 89c06526..7aa21a62 100644 --- a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -27,10 +27,10 @@ class RedirectMiddleware * @var array */ public static $defaultSettings = [ - 'max' => 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, + 'max' => 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, 'track_redirects' => false, ]; @@ -88,10 +88,8 @@ class RedirectMiddleware $this->guardMax($request, $response, $options); $nextRequest = $this->modifyRequest($request, $options, $response); - // If authorization is handled by curl, unset it if host is different. - if ($request->getUri()->getHost() !== $nextRequest->getUri()->getHost() - && defined('\CURLOPT_HTTPAUTH') - ) { + // If authorization is handled by curl, unset it if URI is cross-origin. + if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) { unset( $options['curl'][\CURLOPT_HTTPAUTH], $options['curl'][\CURLOPT_USERPWD] @@ -142,7 +140,7 @@ class RedirectMiddleware } /** - * Check for too many redirects + * Check for too many redirects. * * @throws TooManyRedirectsException Too many redirects. */ @@ -168,8 +166,8 @@ class RedirectMiddleware // not forcing RFC compliance, but rather emulating what all browsers // would do. $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && !$options['allow_redirects']['strict']) + if ($statusCode == 303 + || ($statusCode <= 302 && !$options['allow_redirects']['strict']) ) { $safeMethods = ['GET', 'HEAD', 'OPTIONS']; $requestMethod = $request->getMethod(); @@ -178,7 +176,7 @@ class RedirectMiddleware $modify['body'] = ''; } - $uri = $this->redirectUri($request, $response, $protocols); + $uri = self::redirectUri($request, $response, $protocols); if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); @@ -198,19 +196,23 @@ class RedirectMiddleware $modify['remove_headers'][] = 'Referer'; } - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + // Remove Authorization and Cookie headers if URI is cross-origin. + if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) { $modify['remove_headers'][] = 'Authorization'; + $modify['remove_headers'][] = 'Cookie'; } return Psr7\Utils::modifyRequest($request, $modify); } /** - * Set the appropriate URL on the request based on the location header + * Set the appropriate URL on the request based on the location header. */ - private function redirectUri(RequestInterface $request, ResponseInterface $response, array $protocols): UriInterface - { + private static function redirectUri( + RequestInterface $request, + ResponseInterface $response, + array $protocols + ): UriInterface { $location = Psr7\UriResolver::resolve( $request->getUri(), new Psr7\Uri($response->getHeaderLine('Location')) diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php index 20b31bc2..a38768c0 100644 --- a/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -5,9 +5,7 @@ namespace GuzzleHttp; /** * This class contains a list of built-in Guzzle request options. * - * More documentation for each option can be found at http://guzzlephp.org/. - * - * @link http://docs.guzzlephp.org/en/v6/request-options.html + * @see https://docs.guzzlephp.org/en/latest/request-options.html */ final class RequestOptions { @@ -70,10 +68,22 @@ final class RequestOptions /** * connect_timeout: (float, default=0) Float describing the number of * seconds to wait while trying to connect to a server. Use 0 to wait - * indefinitely (the default behavior). + * 300 seconds (the default behavior). */ public const CONNECT_TIMEOUT = 'connect_timeout'; + /** + * crypto_method: (int) A value describing the minimum TLS protocol + * version to use. + * + * This setting must be set to one of the + * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is + * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required + * in order to specify a crypto method, with cURL 7.52.0 or higher being + * required to use TLS 1.3. + */ + public const CRYPTO_METHOD = 'crypto_method'; + /** * debug: (bool|resource) Set to true or set to a PHP stream returned by * fopen() enable debug output with the HTTP handler used to send a diff --git a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php index c210fc47..8f4d93ac 100644 --- a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php @@ -44,7 +44,7 @@ class RetryMiddleware { $this->decider = $decider; $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; } /** @@ -54,7 +54,7 @@ class RetryMiddleware */ public static function exponentialDelay(int $retries): int { - return (int) \pow(2, $retries - 1) * 1000; + return (int) 2 ** ($retries - 1) * 1000; } public function __invoke(RequestInterface $request, array $options): PromiseInterface @@ -64,6 +64,7 @@ class RetryMiddleware } $fn = $this->nextHandler; + return $fn($request, $options) ->then( $this->onFulfilled($request, $options), @@ -85,6 +86,7 @@ class RetryMiddleware )) { return $value; } + return $this->doRetry($request, $options, $value); }; } @@ -103,13 +105,14 @@ class RetryMiddleware )) { return P\Create::rejectionFor($reason); } + return $this->doRetry($req, $options); }; } private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface { - $options['delay'] = ($this->delay)(++$options['retries'], $response); + $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); return $this($request, $options); } diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php index 93fa334c..2ce9e38f 100644 --- a/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -46,8 +46,8 @@ final class TransferStats */ public function __construct( RequestInterface $request, - ?ResponseInterface $response = null, - ?float $transferTime = null, + ResponseInterface $response = null, + float $transferTime = null, $handlerErrorData = null, array $handlerStats = [] ) { diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php index 91591da2..93d6d39c 100644 --- a/vendor/guzzlehttp/guzzle/src/Utils.php +++ b/vendor/guzzlehttp/guzzle/src/Utils.php @@ -23,9 +23,9 @@ final class Utils { switch (\gettype($input)) { case 'object': - return 'object(' . \get_class($input) . ')'; + return 'object('.\get_class($input).')'; case 'array': - return 'array(' . \count($input) . ')'; + return 'array('.\count($input).')'; default: \ob_start(); \var_dump($input); @@ -79,19 +79,22 @@ final class Utils * * The returned handler is not wrapped by any default middlewares. * - * @throws \RuntimeException if no viable Handler is available. - * * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. + * + * @throws \RuntimeException if no viable Handler is available. */ public static function chooseHandler(): callable { $handler = null; - if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { - $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); - } elseif (\function_exists('curl_exec')) { - $handler = new CurlHandler(); - } elseif (\function_exists('curl_multi_exec')) { - $handler = new CurlMultiHandler(); + + if (\defined('CURLOPT_CUSTOMREQUEST')) { + if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (\function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (\function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } } if (\ini_get('allow_url_fopen')) { @@ -173,14 +176,13 @@ No system CA bundle could be found in any of the the common system locations. PHP versions earlier than 5.6 are not properly configured to use the system's CA bundle by default. In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle to the 'verify' request -option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not -need a specific certificate bundle, then Mozilla provides a commonly used CA -bundle which can be downloaded here (provided by the maintainer of cURL): -https://curl.haxx.se/ca/cacert.pem. Once -you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP -ini setting to point to the path to the file, allowing you to omit the 'verify' -request option. See https://curl.haxx.se/docs/sslcerts.html for more -information. +option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If +you do not need a specific certificate bundle, then Mozilla provides a commonly +used CA bundle which can be downloaded here (provided by the maintainer of +cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available +on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path +to the file, allowing you to omit the 'verify' request option. See +https://curl.haxx.se/docs/sslcerts.html for more information. EOT ); } @@ -244,8 +246,8 @@ EOT } // Special match if the area when prefixed with ".". Remove any // existing leading "." and add a new leading ".". - $area = '.' . \ltrim($area, '.'); - if (\substr($host, -(\strlen($area))) === $area) { + $area = '.'.\ltrim($area, '.'); + if (\substr($host, -\strlen($area)) === $area) { return true; } } @@ -266,13 +268,13 @@ EOT * * @throws InvalidArgumentException if the JSON cannot be decoded. * - * @link https://www.php.net/manual/en/function.json-decode.php + * @see https://www.php.net/manual/en/function.json-decode.php */ public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) { $data = \json_decode($json, $assoc, $depth, $options); if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg()); + throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg()); } return $data; @@ -287,13 +289,13 @@ EOT * * @throws InvalidArgumentException if the JSON cannot be encoded. * - * @link https://www.php.net/manual/en/function.json-encode.php + * @see https://www.php.net/manual/en/function.json-encode.php */ public static function jsonEncode($value, int $options = 0, int $depth = 512): string { $json = \json_encode($value, $options, $depth); if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg()); + throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg()); } /** @var string */ @@ -338,7 +340,7 @@ EOT $errorMessage = 'IDN conversion failed'; if ($errors) { - $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; + $errorMessage .= ' (errors: '.implode(', ', $errors).')'; } throw new InvalidArgumentException($errorMessage); diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php index a70d2cbf..5edc66ab 100644 --- a/vendor/guzzlehttp/guzzle/src/functions.php +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -50,10 +50,10 @@ function debug_resource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @throws \RuntimeException if no viable Handler is available. - * * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. * + * @throws \RuntimeException if no viable Handler is available. + * * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ function choose_handler(): callable @@ -141,7 +141,7 @@ function is_host_in_noproxy(string $host, array $noProxyArray): bool * * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. * - * @link https://www.php.net/manual/en/function.json-decode.php + * @see https://www.php.net/manual/en/function.json-decode.php * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead. */ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) @@ -158,7 +158,7 @@ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $o * * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. * - * @link https://www.php.net/manual/en/function.json-encode.php + * @see https://www.php.net/manual/en/function.json-encode.php * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead. */ function json_encode($value, int $options = 0, int $depth = 512): string diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php index 6636a422..394f9534 100644 --- a/vendor/guzzlehttp/guzzle/src/functions_include.php +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -2,5 +2,5 @@ // Don't redefine the functions if included multiple times. if (!\function_exists('GuzzleHttp\describe_type')) { - require __DIR__ . '/functions.php'; + require __DIR__.'/functions.php'; } diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md index 235e13bc..c73afb90 100644 --- a/vendor/guzzlehttp/promises/CHANGELOG.md +++ b/vendor/guzzlehttp/promises/CHANGELOG.md @@ -1,5 +1,50 @@ # CHANGELOG + +## 2.0.2 - 2023-12-03 + +### Changed + +- Replaced `call_user_func*` with native calls + + +## 2.0.1 - 2023-08-03 + +### Changed + +- PHP 8.3 support + + +## 2.0.0 - 2023-05-21 + +### Added + +- Added PHP 7 type hints + +### Changed + +- All previously non-final non-exception classes have been marked as soft-final + +### Removed + +- Dropped PHP < 7.2 support +- All functions in the `GuzzleHttp\Promise` namespace + + +## 1.5.3 - 2023-05-21 + +### Changed + +- Removed remaining usage of deprecated functions + + +## 1.5.2 - 2022-08-07 + +### Changed + +- Officially support PHP 8.2 + + ## 1.5.1 - 2021-10-22 ### Fixed @@ -7,15 +52,18 @@ - Revert "Call handler when waiting on fulfilled/rejected Promise" - Fix pool memory leak when empty array of promises provided + ## 1.5.0 - 2021-10-07 ### Changed - Call handler when waiting on fulfilled/rejected Promise +- Officially support PHP 8.1 ### Fixed -- Fix manually settle promises generated with Utils::task +- Fix manually settle promises generated with `Utils::task` + ## 1.4.1 - 2021-02-18 @@ -23,6 +71,7 @@ - Fixed `each_limit` skipping promises and failing + ## 1.4.0 - 2020-09-30 ### Added diff --git a/vendor/guzzlehttp/promises/Makefile b/vendor/guzzlehttp/promises/Makefile deleted file mode 100644 index 8d5b3ef9..00000000 --- a/vendor/guzzlehttp/promises/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: clean test - -test: - vendor/bin/phpunit - -coverage: - vendor/bin/phpunit --coverage-html=artifacts/coverage - -view-coverage: - open artifacts/coverage/index.html - -clean: - rm -rf artifacts/* diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md index c175fec7..a32d3d29 100644 --- a/vendor/guzzlehttp/promises/README.md +++ b/vendor/guzzlehttp/promises/README.md @@ -17,7 +17,7 @@ for a general introduction to promises. - [Implementation notes](#implementation-notes) -# Features +## Features - [Promises/A+](https://promisesaplus.com/) implementation. - Promise resolution and chaining is handled iteratively, allowing for @@ -29,15 +29,29 @@ for a general introduction to promises. `GuzzleHttp\Promise\Coroutine::of()`. -# Quick start +## Installation + +```shell +composer require guzzlehttp/promises +``` + + +## Version Guidance + +| Version | Status | PHP Version | +|---------|------------------------|--------------| +| 1.x | Bug and security fixes | >=5.5,<8.3 | +| 2.x | Latest | >=7.2.5,<8.4 | + + +## Quick Start A *promise* represents the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. - -## Callbacks +### Callbacks Callbacks are registered with the `then` method by providing an optional `$onFulfilled` followed by an optional `$onRejected` function. @@ -60,12 +74,11 @@ $promise->then( ``` *Resolving* a promise means that you either fulfill a promise with a *value* or -reject a promise with a *reason*. Resolving a promises triggers callbacks -registered with the promises's `then` method. These callbacks are triggered +reject a promise with a *reason*. Resolving a promise triggers callbacks +registered with the promise's `then` method. These callbacks are triggered only once and in the order in which they were added. - -## Resolving a promise +### Resolving a Promise Promises are fulfilled using the `resolve($value)` method. Resolving a promise with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger @@ -92,8 +105,7 @@ $promise $promise->resolve('reader.'); ``` - -## Promise forwarding +### Promise Forwarding Promises can be chained one after the other. Each then in the chain is a new promise. The return value of a promise is what's forwarded to the next @@ -123,7 +135,7 @@ $promise->resolve('A'); $nextPromise->resolve('B'); ``` -## Promise rejection +### Promise Rejection When a promise is rejected, the `$onRejected` callbacks are invoked with the rejection reason. @@ -140,7 +152,7 @@ $promise->reject('Error!'); // Outputs "Error!" ``` -## Rejection forwarding +### Rejection Forwarding If an exception is thrown in an `$onRejected` callback, subsequent `$onRejected` callbacks are invoked with the thrown exception as the reason. @@ -195,7 +207,8 @@ $promise $promise->reject('Error!'); ``` -# Synchronous wait + +## Synchronous Wait You can synchronously force promises to complete using a promise's `wait` method. When creating a promise, you can provide a wait function that is used @@ -247,8 +260,7 @@ $promise->wait(); > PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' - -## Unwrapping a promise +### Unwrapping a Promise When synchronously waiting on a promise, you are joining the state of the promise into the current state of execution (i.e., return the value of the @@ -275,7 +287,7 @@ wait function will be the value delivered to promise B. **Note**: when you do not unwrap the promise, no value is returned. -# Cancellation +## Cancellation You can cancel a promise that has not yet been fulfilled using the `cancel()` method of a promise. When creating a promise you can provide an optional @@ -283,10 +295,9 @@ cancel function that when invoked cancels the action of computing a resolution of the promise. -# API +## API - -## Promise +### Promise When creating a promise object, you can provide an optional `$waitFn` and `$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is @@ -349,7 +360,7 @@ A promise has the following methods: Rejects the promise with the given `$reason`. -## FulfilledPromise +### FulfilledPromise A fulfilled promise can be created to represent a promise that has been fulfilled. @@ -366,7 +377,7 @@ $promise->then(function ($value) { ``` -## RejectedPromise +### RejectedPromise A rejected promise can be created to represent a promise that has been rejected. @@ -383,7 +394,7 @@ $promise->then(null, function ($reason) { ``` -# Promise interop +## Promise Interoperability This library works with foreign promises that have a `then` method. This means you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) @@ -409,7 +420,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle promise in order to utilize wait and cancel functions with foreign promises. -## Event Loop Integration +### Event Loop Integration In order to keep the stack size constant, Guzzle promises are resolved asynchronously using a task queue. When waiting on promises synchronously, the @@ -434,13 +445,10 @@ $loop = React\EventLoop\Factory::create(); $loop->addPeriodicTimer(0, [$queue, 'run']); ``` -*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? +## Implementation Notes -# Implementation notes - - -## Promise resolution and chaining is handled iteratively +### Promise Resolution and Chaining is Handled Iteratively By shuffling pending handlers from one owner to another, promises are resolved iteratively, allowing for "infinite" then chaining. @@ -476,8 +484,7 @@ all of its pending handlers to the new promise. When the new promise is eventually resolved, all of the pending handlers are delivered the forwarded value. - -## A promise is the deferred. +### A Promise is the Deferred Some promise libraries implement promises using a deferred object to represent a computation and a promise object to represent the delivery of the result of @@ -505,7 +512,10 @@ $promise->resolve('foo'); ## Upgrading from Function API -A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: +A static API was first introduced in 1.4.0, in order to mitigate problems with +functions conflicting between global and local copies of the package. The +function API was removed in 2.0.0. A migration table has been provided here for +your convenience: | Original Function | Replacement Method | |----------------|----------------| @@ -536,10 +546,12 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. + ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + ## For Enterprise Available as part of the Tidelift Subscription diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json index c959fb32..6c5bdd66 100644 --- a/vendor/guzzlehttp/promises/composer.json +++ b/vendor/guzzlehttp/promises/composer.json @@ -26,32 +26,32 @@ } ], "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" - }, - "files": ["src/functions_include.php"] + } }, "autoload-dev": { "psr-4": { "GuzzleHttp\\Promise\\Tests\\": "tests/" } }, - "scripts": { - "test": "vendor/bin/simple-phpunit", - "test-ci": "vendor/bin/simple-phpunit --coverage-text" - }, "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, "preferred-install": "dist", "sort-packages": true } diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php index d2b5712b..40ffdbcf 100644 --- a/vendor/guzzlehttp/promises/src/AggregateException.php +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -1,5 +1,7 @@ generator = $generatorFn(); - $this->result = new Promise(function () { + $this->result = new Promise(function (): void { while (isset($this->currentPromise)) { $this->currentPromise->wait(); } }); try { $this->nextCoroutine($this->generator->current()); - } catch (\Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -78,10 +77,8 @@ final class Coroutine implements PromiseInterface /** * Create a new coroutine. - * - * @return self */ - public static function of(callable $generatorFn) + public static function of(callable $generatorFn): self { return new self($generatorFn); } @@ -89,42 +86,42 @@ final class Coroutine implements PromiseInterface public function then( callable $onFulfilled = null, callable $onRejected = null - ) { + ): PromiseInterface { return $this->result->then($onFulfilled, $onRejected); } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->result->otherwise($onRejected); } - public function wait($unwrap = true) + public function wait(bool $unwrap = true) { return $this->result->wait($unwrap); } - public function getState() + public function getState(): string { return $this->result->getState(); } - public function resolve($value) + public function resolve($value): void { $this->result->resolve($value); } - public function reject($reason) + public function reject($reason): void { $this->result->reject($reason); } - public function cancel() + public function cancel(): void { $this->currentPromise->cancel(); $this->result->cancel(); } - private function nextCoroutine($yielded) + private function nextCoroutine($yielded): void { $this->currentPromise = Create::promiseFor($yielded) ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); @@ -133,7 +130,7 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleSuccess($value) + public function _handleSuccess($value): void { unset($this->currentPromise); try { @@ -143,8 +140,6 @@ final class Coroutine implements PromiseInterface } else { $this->result->resolve($value); } - } catch (Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -153,15 +148,13 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleFailure($reason) + public function _handleFailure($reason): void { unset($this->currentPromise); try { $nextYield = $this->generator->throw(Create::exceptionFor($reason)); // The throw was caught, so keep iterating on the coroutine $this->nextCoroutine($nextYield); - } catch (Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } diff --git a/vendor/guzzlehttp/promises/src/Create.php b/vendor/guzzlehttp/promises/src/Create.php index 8d038e9c..9d3fc4a1 100644 --- a/vendor/guzzlehttp/promises/src/Create.php +++ b/vendor/guzzlehttp/promises/src/Create.php @@ -1,5 +1,7 @@ then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; } @@ -34,10 +35,8 @@ final class Create * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. - * - * @return PromiseInterface */ - public static function rejectionFor($reason) + public static function rejectionFor($reason): PromiseInterface { if ($reason instanceof PromiseInterface) { return $reason; @@ -50,12 +49,10 @@ final class Create * Create an exception for a rejected promise value. * * @param mixed $reason - * - * @return \Exception|\Throwable */ - public static function exceptionFor($reason) + public static function exceptionFor($reason): \Throwable { - if ($reason instanceof \Exception || $reason instanceof \Throwable) { + if ($reason instanceof \Throwable) { return $reason; } @@ -66,10 +63,8 @@ final class Create * Returns an iterator for the given value. * * @param mixed $value - * - * @return \Iterator */ - public static function iterFor($value) + public static function iterFor($value): \Iterator { if ($value instanceof \Iterator) { return $value; diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php index 1dda3549..c09d23c6 100644 --- a/vendor/guzzlehttp/promises/src/Each.php +++ b/vendor/guzzlehttp/promises/src/Each.php @@ -1,5 +1,7 @@ $onFulfilled, - 'rejected' => $onRejected + 'rejected' => $onRejected, ]))->promise(); } @@ -44,21 +42,17 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface */ public static function ofLimit( $iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null - ) { + ): PromiseInterface { return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency, ]))->promise(); } @@ -69,20 +63,17 @@ final class Each * * @param mixed $iterable * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface */ public static function ofLimitAll( $iterable, $concurrency, callable $onFulfilled = null - ) { - return each_limit( + ): PromiseInterface { + return self::ofLimit( $iterable, $concurrency, $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate) { + function ($reason, $idx, PromiseInterface $aggregate): void { $aggregate->reject($reason); } ); diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php index 38ecb59b..e1238981 100644 --- a/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -1,10 +1,14 @@ aggregate) { return $this->aggregate; @@ -81,30 +85,19 @@ class EachPromise implements PromisorInterface $this->iterable->rewind(); $this->refillPending(); } catch (\Throwable $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ - $this->aggregate->reject($e); - } catch (\Exception $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ $this->aggregate->reject($e); } /** * @psalm-suppress NullableReturnStatement - * @phpstan-ignore-next-line */ return $this->aggregate; } - private function createPromise() + private function createPromise(): void { $this->mutex = false; - $this->aggregate = new Promise(function () { + $this->aggregate = new Promise(function (): void { if ($this->checkIfFinished()) { return; } @@ -121,7 +114,7 @@ class EachPromise implements PromisorInterface }); // Clear the references when the promise is resolved. - $clearFn = function () { + $clearFn = function (): void { $this->iterable = $this->concurrency = $this->pending = null; $this->onFulfilled = $this->onRejected = null; $this->nextPendingIndex = 0; @@ -130,17 +123,19 @@ class EachPromise implements PromisorInterface $this->aggregate->then($clearFn, $clearFn); } - private function refillPending() + private function refillPending(): void { if (!$this->concurrency) { // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()); + while ($this->addPending() && $this->advanceIterator()) { + } + return; } // Add only up to N pending promises. $concurrency = is_callable($this->concurrency) - ? call_user_func($this->concurrency, count($this->pending)) + ? ($this->concurrency)(count($this->pending)) : $this->concurrency; $concurrency = max($concurrency - count($this->pending), 0); // Concurrency may be set to 0 to disallow new promises. @@ -155,10 +150,11 @@ class EachPromise implements PromisorInterface // next value to yield until promise callbacks are called. while (--$concurrency && $this->advanceIterator() - && $this->addPending()); + && $this->addPending()) { + } } - private function addPending() + private function addPending(): bool { if (!$this->iterable || !$this->iterable->valid()) { return false; @@ -172,10 +168,9 @@ class EachPromise implements PromisorInterface $idx = $this->nextPendingIndex++; $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key) { + function ($value) use ($idx, $key): void { if ($this->onFulfilled) { - call_user_func( - $this->onFulfilled, + ($this->onFulfilled)( $value, $key, $this->aggregate @@ -183,10 +178,9 @@ class EachPromise implements PromisorInterface } $this->step($idx); }, - function ($reason) use ($idx, $key) { + function ($reason) use ($idx, $key): void { if ($this->onRejected) { - call_user_func( - $this->onRejected, + ($this->onRejected)( $reason, $key, $this->aggregate @@ -199,7 +193,7 @@ class EachPromise implements PromisorInterface return true; } - private function advanceIterator() + private function advanceIterator(): bool { // Place a lock on the iterator so that we ensure to not recurse, // preventing fatal generator errors. @@ -212,19 +206,17 @@ class EachPromise implements PromisorInterface try { $this->iterable->next(); $this->mutex = false; + return true; } catch (\Throwable $e) { $this->aggregate->reject($e); $this->mutex = false; - return false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = false; + return false; } } - private function step($idx) + private function step(int $idx): void { // If the promise was already resolved, then ignore this step. if (Is::settled($this->aggregate)) { @@ -242,11 +234,12 @@ class EachPromise implements PromisorInterface } } - private function checkIfFinished() + private function checkIfFinished(): bool { if (!$this->pending && !$this->iterable->valid()) { // Resolve the promise if there's nothing left to do. $this->aggregate->resolve(null); + return true; } diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php index 98f72a62..ab712965 100644 --- a/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -1,5 +1,7 @@ value; - $queue->add(static function () use ($p, $value, $onFulfilled) { + $queue->add(static function () use ($p, $value, $onFulfilled): void { if (Is::pending($p)) { try { $p->resolve($onFulfilled($value)); } catch (\Throwable $e) { $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); } } }); @@ -50,34 +55,34 @@ class FulfilledPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true, $defaultDelivery = null) + public function wait(bool $unwrap = true) { return $unwrap ? $this->value : null; } - public function getState() + public function getState(): string { return self::FULFILLED; } - public function resolve($value) + public function resolve($value): void { if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); + throw new \LogicException('Cannot resolve a fulfilled promise'); } } - public function reject($reason) + public function reject($reason): void { - throw new \LogicException("Cannot reject a fulfilled promise"); + throw new \LogicException('Cannot reject a fulfilled promise'); } - public function cancel() + public function cancel(): void { // pass } diff --git a/vendor/guzzlehttp/promises/src/Is.php b/vendor/guzzlehttp/promises/src/Is.php index c3ed8d01..f3f05038 100644 --- a/vendor/guzzlehttp/promises/src/Is.php +++ b/vendor/guzzlehttp/promises/src/Is.php @@ -1,45 +1,39 @@ getState() === PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled or rejected. - * - * @return bool */ - public static function settled(PromiseInterface $promise) + public static function settled(PromiseInterface $promise): bool { return $promise->getState() !== PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled. - * - * @return bool */ - public static function fulfilled(PromiseInterface $promise) + public static function fulfilled(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::FULFILLED; } /** * Returns true if a promise is rejected. - * - * @return bool */ - public static function rejected(PromiseInterface $promise) + public static function rejected(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::REJECTED; } diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php index 75939057..1b07bdc9 100644 --- a/vendor/guzzlehttp/promises/src/Promise.php +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -1,11 +1,15 @@ state === self::PENDING) { $p = new Promise(null, [$this, 'cancel']); $this->handlers[] = [$p, $onFulfilled, $onRejected]; $p->waitList = $this->waitList; $p->waitList[] = $this; + return $p; } // Return a fulfilled promise and immediately invoke any callbacks. if ($this->state === self::FULFILLED) { $promise = Create::promiseFor($this->result); + return $onFulfilled ? $promise->then($onFulfilled) : $promise; } // It's either cancelled or rejected, so return a rejected promise // and immediately invoke any callbacks. $rejection = Create::rejectionFor($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true) + public function wait(bool $unwrap = true) { $this->waitIfPending(); @@ -73,12 +80,12 @@ class Promise implements PromiseInterface } } - public function getState() + public function getState(): string { return $this->state; } - public function cancel() + public function cancel(): void { if ($this->state !== self::PENDING) { return; @@ -93,8 +100,6 @@ class Promise implements PromiseInterface $fn(); } catch (\Throwable $e) { $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); } } @@ -105,17 +110,17 @@ class Promise implements PromiseInterface } } - public function resolve($value) + public function resolve($value): void { $this->settle(self::FULFILLED, $value); } - public function reject($reason) + public function reject($reason): void { $this->settle(self::REJECTED, $reason); } - private function settle($state, $value) + private function settle(string $state, $value): void { if ($this->state !== self::PENDING) { // Ignore calls with the same resolution. @@ -148,7 +153,7 @@ class Promise implements PromiseInterface if (!is_object($value) || !method_exists($value, 'then')) { $id = $state === self::FULFILLED ? 1 : 2; // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers) { + Utils::queue()->add(static function () use ($id, $value, $handlers): void { foreach ($handlers as $handler) { self::callHandler($id, $value, $handler); } @@ -159,12 +164,12 @@ class Promise implements PromiseInterface } else { // Resolve the handlers when the forwarded promise is resolved. $value->then( - static function ($value) use ($handlers) { + static function ($value) use ($handlers): void { foreach ($handlers as $handler) { self::callHandler(1, $value, $handler); } }, - static function ($reason) use ($handlers) { + static function ($reason) use ($handlers): void { foreach ($handlers as $handler) { self::callHandler(2, $reason, $handler); } @@ -180,7 +185,7 @@ class Promise implements PromiseInterface * @param mixed $value Value to pass to the callback. * @param array $handler Array of handler data (promise and callbacks). */ - private static function callHandler($index, $value, array $handler) + private static function callHandler(int $index, $value, array $handler): void { /** @var PromiseInterface $promise */ $promise = $handler[0]; @@ -211,12 +216,10 @@ class Promise implements PromiseInterface } } catch (\Throwable $reason) { $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); } } - private function waitIfPending() + private function waitIfPending(): void { if ($this->state !== self::PENDING) { return; @@ -227,9 +230,9 @@ class Promise implements PromiseInterface } else { // If there's no wait function, then reject the promise. $this->reject('Cannot wait on a promise that has ' - . 'no internal wait function. You must provide a wait ' - . 'function when constructing the promise to be able to ' - . 'wait on a promise.'); + .'no internal wait function. You must provide a wait ' + .'function when constructing the promise to be able to ' + .'wait on a promise.'); } Utils::queue()->run(); @@ -240,13 +243,13 @@ class Promise implements PromiseInterface } } - private function invokeWaitFn() + private function invokeWaitFn(): void { try { $wfn = $this->waitFn; $this->waitFn = null; $wfn(true); - } catch (\Exception $reason) { + } catch (\Throwable $reason) { if ($this->state === self::PENDING) { // The promise has not been resolved yet, so reject the promise // with the exception. @@ -259,7 +262,7 @@ class Promise implements PromiseInterface } } - private function invokeWaitList() + private function invokeWaitList(): void { $waitList = $this->waitList; $this->waitList = null; diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php index e5983314..2824802b 100644 --- a/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -1,5 +1,7 @@ reason; $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected) { + $queue->add(static function () use ($p, $reason, $onRejected): void { if (Is::pending($p)) { try { // Return a resolved promise if onRejected does not throw. @@ -43,9 +50,6 @@ class RejectedPromise implements PromiseInterface } catch (\Throwable $e) { // onRejected threw, so return a rejected promise. $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); } } }); @@ -53,12 +57,12 @@ class RejectedPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true, $defaultDelivery = null) + public function wait(bool $unwrap = true) { if ($unwrap) { throw Create::exceptionFor($this->reason); @@ -67,24 +71,24 @@ class RejectedPromise implements PromiseInterface return null; } - public function getState() + public function getState(): string { return self::REJECTED; } - public function resolve($value) + public function resolve($value): void { - throw new \LogicException("Cannot resolve a rejected promise"); + throw new \LogicException('Cannot resolve a rejected promise'); } - public function reject($reason) + public function reject($reason): void { if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); + throw new \LogicException('Cannot reject a rejected promise'); } } - public function cancel() + public function cancel(): void { // pass } diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php index e2f13770..72a81ba2 100644 --- a/vendor/guzzlehttp/promises/src/RejectionException.php +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -1,5 +1,7 @@ reason = $reason; $message = 'The promise was rejected'; if ($description) { - $message .= ' with reason: ' . $description; + $message .= ' with reason: '.$description; } elseif (is_string($reason) || (is_object($reason) && method_exists($reason, '__toString')) ) { - $message .= ' with reason: ' . $this->reason; + $message .= ' with reason: '.$this->reason; } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' - . json_encode($this->reason, JSON_PRETTY_PRINT); + $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); } parent::__construct($message); diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php index f0fba2c5..503e0b2d 100644 --- a/vendor/guzzlehttp/promises/src/TaskQueue.php +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -1,5 +1,7 @@ run(); + * + * @final */ class TaskQueue implements TaskQueueInterface { private $enableShutdown = true; private $queue = []; - public function __construct($withShutdown = true) + public function __construct(bool $withShutdown = true) { if ($withShutdown) { - register_shutdown_function(function () { + register_shutdown_function(function (): void { if ($this->enableShutdown) { // Only run the tasks if an E_ERROR didn't occur. $err = error_get_last(); @@ -31,17 +35,17 @@ class TaskQueue implements TaskQueueInterface } } - public function isEmpty() + public function isEmpty(): bool { return !$this->queue; } - public function add(callable $task) + public function add(callable $task): void { $this->queue[] = $task; } - public function run() + public function run(): void { while ($task = array_shift($this->queue)) { /** @var callable $task */ @@ -60,7 +64,7 @@ class TaskQueue implements TaskQueueInterface * * Note: This shutdown will occur before any destructors are triggered. */ - public function disableShutdown() + public function disableShutdown(): void { $this->enableShutdown = false; } diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php index 723d4d54..34c561a4 100644 --- a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -1,24 +1,24 @@ * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface + * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. */ - public static function queue(TaskQueueInterface $assign = null) + public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface { static $queue; @@ -39,22 +39,18 @@ final class Utils * returns a promise that is fulfilled or rejected with the result. * * @param callable $task Task function to run. - * - * @return PromiseInterface */ - public static function task(callable $task) + public static function task(callable $task): PromiseInterface { $queue = self::queue(); $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise) { + $queue->add(function () use ($task, $promise): void { try { if (Is::pending($promise)) { $promise->resolve($task()); } } catch (\Throwable $e) { $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); } }); @@ -72,22 +68,18 @@ final class Utils * key mapping to the rejection reason of the promise. * * @param PromiseInterface $promise Promise or value. - * - * @return array */ - public static function inspect(PromiseInterface $promise) + public static function inspect(PromiseInterface $promise): array { try { return [ 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait() + 'value' => $promise->wait(), ]; } catch (RejectionException $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; } catch (\Throwable $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; } } @@ -100,14 +92,12 @@ final class Utils * @see inspect for the inspection state array format. * * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array */ - public static function inspectAll($promises) + public static function inspectAll($promises): array { $results = []; foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); + $results[$key] = self::inspect($promise); } return $results; @@ -122,12 +112,9 @@ final class Utils * * @param iterable $promises Iterable of PromiseInterface objects to wait on. * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 + * @throws \Throwable on error */ - public static function unwrap($promises) + public static function unwrap($promises): array { $results = []; foreach ($promises as $key => $promise) { @@ -147,22 +134,21 @@ final class Utils * * @param mixed $promises Promises or values. * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface */ - public static function all($promises, $recursive = false) + public static function all($promises, bool $recursive = false): PromiseInterface { $results = []; $promise = Each::of( $promises, - function ($value, $idx) use (&$results) { + function ($value, $idx) use (&$results): void { $results[$idx] = $value; }, - function ($reason, $idx, Promise $aggregate) { + function ($reason, $idx, Promise $aggregate): void { $aggregate->reject($reason); } )->then(function () use (&$results) { ksort($results); + return $results; }); @@ -173,6 +159,7 @@ final class Utils return self::all($promises, $recursive); } } + return $results; }); } @@ -193,17 +180,15 @@ final class Utils * * @param int $count Total number of promises. * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function some($count, $promises) + public static function some(int $count, $promises): PromiseInterface { $results = []; $rejections = []; return Each::of( $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count) { + function ($value, $idx, PromiseInterface $p) use (&$results, $count): void { if (Is::settled($p)) { return; } @@ -212,7 +197,7 @@ final class Utils $p->resolve(null); } }, - function ($reason) use (&$rejections) { + function ($reason) use (&$rejections): void { $rejections[] = $reason; } )->then( @@ -224,6 +209,7 @@ final class Utils ); } ksort($results); + return array_values($results); } ); @@ -234,10 +220,8 @@ final class Utils * fulfillment value is not an array of 1 but the value directly. * * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function any($promises) + public static function any($promises): PromiseInterface { return self::some(1, $promises)->then(function ($values) { return $values[0]; @@ -253,23 +237,22 @@ final class Utils * @see inspect for the inspection state array format. * * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function settle($promises) + public static function settle($promises): PromiseInterface { $results = []; return Each::of( $promises, - function ($value, $idx) use (&$results) { + function ($value, $idx) use (&$results): void { $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; }, - function ($reason, $idx) use (&$results) { + function ($reason, $idx) use (&$results): void { $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; } )->then(function () use (&$results) { ksort($results); + return $results; }); } diff --git a/vendor/guzzlehttp/promises/src/functions.php b/vendor/guzzlehttp/promises/src/functions.php deleted file mode 100644 index c03d39d0..00000000 --- a/vendor/guzzlehttp/promises/src/functions.php +++ /dev/null @@ -1,363 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - * - * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead. - */ -function queue(TaskQueueInterface $assign = null) -{ - return Utils::queue($assign); -} - -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - * - * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead. - */ -function task(callable $task) -{ - return Utils::task($task); -} - -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - * - * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead. - */ -function promise_for($value) -{ - return Create::promiseFor($value); -} - -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - * - * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead. - */ -function rejection_for($reason) -{ - return Create::rejectionFor($reason); -} - -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - * - * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead. - */ -function exception_for($reason) -{ - return Create::exceptionFor($reason); -} - -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - * - * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead. - */ -function iter_for($value) -{ - return Create::iterFor($value); -} - -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead. - */ -function inspect(PromiseInterface $promise) -{ - return Utils::inspect($promise); -} - -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead. - */ -function inspect_all($promises) -{ - return Utils::inspectAll($promises); -} - -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - * - * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead. - */ -function unwrap($promises) -{ - return Utils::unwrap($promises); -} - -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - * - * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead. - */ -function all($promises, $recursive = false) -{ - return Utils::all($promises, $recursive); -} - -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number of - * fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead. - */ -function some($count, $promises) -{ - return Utils::some($count, $promises); -} - -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead. - */ -function any($promises) -{ - return Utils::any($promises); -} - -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead. - */ -function settle($promises) -{ - return Utils::settle($promises); -} - -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead. - */ -function each( - $iterable, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::of($iterable, $onFulfilled, $onRejected); -} - -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead. - */ -function each_limit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected); -} - -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - * - * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead. - */ -function each_limit_all( - $iterable, - $concurrency, - callable $onFulfilled = null -) { - return Each::ofLimitAll($iterable, $concurrency, $onFulfilled); -} - -/** - * Returns true if a promise is fulfilled. - * - * @return bool - * - * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead. - */ -function is_fulfilled(PromiseInterface $promise) -{ - return Is::fulfilled($promise); -} - -/** - * Returns true if a promise is rejected. - * - * @return bool - * - * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead. - */ -function is_rejected(PromiseInterface $promise) -{ - return Is::rejected($promise); -} - -/** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - * - * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead. - */ -function is_settled(PromiseInterface $promise) -{ - return Is::settled($promise); -} - -/** - * Create a new coroutine. - * - * @see Coroutine - * - * @return PromiseInterface - * - * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead. - */ -function coroutine(callable $generatorFn) -{ - return Coroutine::of($generatorFn); -} diff --git a/vendor/guzzlehttp/promises/src/functions_include.php b/vendor/guzzlehttp/promises/src/functions_include.php deleted file mode 100644 index 34cd1710..00000000 --- a/vendor/guzzlehttp/promises/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -=5.4,<8.1 | +| 2.x | Latest | >=7.2.5,<8.4 | + + ## AppendStream `GuzzleHttp\Psr7\AppendStream` @@ -245,6 +259,8 @@ class EofCallbackStream implements StreamInterface private $callback; + private $stream; + public function __construct(StreamInterface $stream, callable $cb) { $this->stream = $stream; @@ -257,7 +273,7 @@ class EofCallbackStream implements StreamInterface // Invoke the callback when EOF is hit. if ($this->eof()) { - call_user_func($this->callback); + ($this->callback)(); } return $result; @@ -380,10 +396,28 @@ of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value. -## `GuzzleHttp\Psr7\Header::normalize` +## `GuzzleHttp\Psr7\Header::splitList` + +`public static function splitList(string|string[] $header): string[]` + +Splits a HTTP header defined to contain a comma-separated list into +each individual value: + +``` +$knownEtags = Header::splitList($request->getHeader('if-none-match')); +``` + +Example headers include `accept`, `cache-control` and `if-none-match`. + + +## `GuzzleHttp\Psr7\Header::normalize` (deprecated) `public static function normalize(string|array $header): array` +`Header::normalize()` is deprecated in favor of [`Header::splitList()`](README.md#guzzlehttppsr7headersplitlist) +which performs the same operation with a cleaned up API and improved +documentation. + Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values. @@ -527,6 +561,17 @@ When fopen fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead. +## `GuzzleHttp\Psr7\Utils::tryGetContents` + +`public static function tryGetContents(resource $stream): string` + +Safely gets the contents of a given stream. + +When stream_get_contents fails, PHP normally raises a warning. This +function adds an error handler that checks for errors and throws an +exception instead. + + ## `GuzzleHttp\Psr7\Utils::uriFor` `public static function uriFor(string|UriInterface $uri): UriInterface` @@ -592,7 +637,7 @@ this library also provides additional functionality when working with URIs as st An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, the base URI. Relative references can be divided into several forms according to -[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): +[RFC 3986 Section 4.2](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2): - network-path references, e.g. `//example.com/path` - absolute-path references, e.g. `/path` @@ -651,14 +696,14 @@ or the standard port. This method can be used independently of the implementatio `public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` Composes a URI reference string from its various components according to -[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called -manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. +[RFC 3986 Section 5.3](https://datatracker.ietf.org/doc/html/rfc3986#section-5.3). Usually this method does not need +to be called manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. ### `GuzzleHttp\Psr7\Uri::fromParts` `public static function fromParts(array $parts): UriInterface` -Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. +Creates a URI from a hash of [`parse_url`](https://www.php.net/manual/en/function.parse-url.php) components. ### `GuzzleHttp\Psr7\Uri::withQueryValue` @@ -683,11 +728,21 @@ associative array of key => value. Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the provided key are removed. +## Cross-Origin Detection + +`GuzzleHttp\Psr7\UriComparator` provides methods to determine if a modified URL should be considered cross-origin. + +### `GuzzleHttp\Psr7\UriComparator::isCrossOrigin` + +`public static function isCrossOrigin(UriInterface $original, UriInterface $modified): bool` + +Determines if a modified URL should be considered cross-origin with respect to an original URL. + ## Reference Resolution `GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according -to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers -do when resolving a link in a website based on the current request URI. +to [RFC 3986 Section 5](https://datatracker.ietf.org/doc/html/rfc3986#section-5). This is for example also what web +browsers do when resolving a link in a website based on the current request URI. ### `GuzzleHttp\Psr7\UriResolver::resolve` @@ -700,7 +755,7 @@ Converts the relative URI into a new URI that is resolved against the base URI. `public static function removeDotSegments(string $path): string` Removes dot segments from a path and returns the new path according to -[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). +[RFC 3986 Section 5.2.4](https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4). ### `GuzzleHttp\Psr7\UriResolver::relativize` @@ -726,7 +781,7 @@ echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // pr ## Normalization and Comparison `GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to -[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). +[RFC 3986 Section 6](https://datatracker.ietf.org/doc/html/rfc3986#section-6). ### `GuzzleHttp\Psr7\UriNormalizer::normalize` @@ -812,10 +867,12 @@ equivalence or difference of relative references does not mean anything. If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. + ## License Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. + ## For Enterprise Available as part of the Tidelift Subscription diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json index 1aed3ed6..70293fc4 100644 --- a/vendor/guzzlehttp/psr7/composer.json +++ b/vendor/guzzlehttp/psr7/composer.json @@ -52,7 +52,7 @@ "require": { "php": "^7.2.5 || ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.1 || ^2.0", "ralouphie/getallheaders": "^3.0" }, "provide": { @@ -60,9 +60,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -78,8 +78,9 @@ } }, "extra": { - "branch-alias": { - "dev-master": "2.2-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "config": { @@ -87,9 +88,6 @@ "bamarni/composer-bin-plugin": true }, "preferred-install": "dist", - "sort-packages": true, - "allow-plugins": { - "bamarni/composer-bin-plugin": true - } + "sort-packages": true } } diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php index 967925f3..ee8f3788 100644 --- a/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -40,12 +40,14 @@ final class AppendStream implements StreamInterface { try { $this->rewind(); + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -138,9 +140,9 @@ final class AppendStream implements StreamInterface public function eof(): bool { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); + return !$this->streams + || ($this->current >= count($this->streams) - 1 + && $this->streams[$this->current]->eof()); } public function rewind(): void @@ -167,7 +169,7 @@ final class AppendStream implements StreamInterface $stream->rewind(); } catch (\Exception $e) { throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); + .$i.' of the AppendStream', 0, $e); } } @@ -191,14 +193,13 @@ final class AppendStream implements StreamInterface $progressToNext = false; while ($remaining > 0) { - // Progress to the next stream if needed. if ($progressToNext || $this->streams[$this->current]->eof()) { $progressToNext = false; if ($this->current === $total) { break; } - $this->current++; + ++$this->current; } $result = $this->streams[$this->current]->read($remaining); @@ -238,8 +239,6 @@ final class AppendStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php index 21be8c0a..2b0eb77b 100644 --- a/vendor/guzzlehttp/psr7/src/BufferStream.php +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -134,8 +134,6 @@ final class BufferStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php index 7a70ee94..f34722cf 100644 --- a/vendor/guzzlehttp/psr7/src/CachingStream.php +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -20,6 +20,11 @@ final class CachingStream implements StreamInterface /** @var int Number of bytes to skip reading due to a write on the buffer */ private $skipReadBytes = 0; + /** + * @var StreamInterface + */ + private $stream; + /** * We will treat the buffer object as the body of the stream * diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php index d78070ae..6e3d209d 100644 --- a/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -17,6 +17,9 @@ final class DroppingStream implements StreamInterface /** @var int */ private $maxLength; + /** @var StreamInterface */ + private $stream; + /** * @param StreamInterface $stream Underlying stream to decorate. * @param int $maxLength Maximum size before dropping data. diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php index c2156184..9e6a7f31 100644 --- a/vendor/guzzlehttp/psr7/src/FnStream.php +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -12,12 +12,13 @@ use Psr\Http\Message\StreamInterface; * Allows for easy testing and extension of a provided stream without needing * to create a concrete class for a simple extension point. */ +#[\AllowDynamicProperties] final class FnStream implements StreamInterface { private const SLOTS = [ '__toString', 'close', 'detach', 'rewind', 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write', - 'isReadable', 'read', 'getContents', 'getMetadata' + 'isReadable', 'read', 'getContents', 'getMetadata', ]; /** @var array */ @@ -32,7 +33,7 @@ final class FnStream implements StreamInterface // Create the functions on the class foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; + $this->{'_fn_'.$name} = $fn; } } @@ -44,7 +45,7 @@ final class FnStream implements StreamInterface public function __get(string $name): void { throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); + .'() is not implemented in the FnStream'); } /** @@ -53,7 +54,7 @@ final class FnStream implements StreamInterface public function __destruct() { if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); + ($this->_fn_close)(); } } @@ -92,88 +93,88 @@ final class FnStream implements StreamInterface public function __toString(): string { try { - return call_user_func($this->_fn___toString); + /** @var string */ + return ($this->_fn___toString)(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } public function close(): void { - call_user_func($this->_fn_close); + ($this->_fn_close)(); } public function detach() { - return call_user_func($this->_fn_detach); + return ($this->_fn_detach)(); } public function getSize(): ?int { - return call_user_func($this->_fn_getSize); + return ($this->_fn_getSize)(); } public function tell(): int { - return call_user_func($this->_fn_tell); + return ($this->_fn_tell)(); } public function eof(): bool { - return call_user_func($this->_fn_eof); + return ($this->_fn_eof)(); } public function isSeekable(): bool { - return call_user_func($this->_fn_isSeekable); + return ($this->_fn_isSeekable)(); } public function rewind(): void { - call_user_func($this->_fn_rewind); + ($this->_fn_rewind)(); } public function seek($offset, $whence = SEEK_SET): void { - call_user_func($this->_fn_seek, $offset, $whence); + ($this->_fn_seek)($offset, $whence); } public function isWritable(): bool { - return call_user_func($this->_fn_isWritable); + return ($this->_fn_isWritable)(); } public function write($string): int { - return call_user_func($this->_fn_write, $string); + return ($this->_fn_write)($string); } public function isReadable(): bool { - return call_user_func($this->_fn_isReadable); + return ($this->_fn_isReadable)(); } public function read($length): string { - return call_user_func($this->_fn_read, $length); + return ($this->_fn_read)($length); } public function getContents(): string { - return call_user_func($this->_fn_getContents); + return ($this->_fn_getContents)(); } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) { - return call_user_func($this->_fn_getMetadata, $key); + return ($this->_fn_getMetadata)($key); } } diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php index b219b87b..bbce8b03 100644 --- a/vendor/guzzlehttp/psr7/src/Header.php +++ b/vendor/guzzlehttp/psr7/src/Header.php @@ -19,20 +19,22 @@ final class Header static $trimmed = "\"' \n\t\r"; $params = $matches = []; - foreach (self::normalize($header) as $val) { - $part = []; - foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { - if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); + foreach ((array) $header as $value) { + foreach (self::splitList($value) as $val) { + $part = []; + foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) { + if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } } } - } - if ($part) { - $params[] = $part; + if ($part) { + $params[] = $part; + } } } @@ -44,25 +46,86 @@ final class Header * headers into an array of headers with no comma separated values. * * @param string|array $header Header to normalize. + * + * @deprecated Use self::splitList() instead. */ public static function normalize($header): array { $result = []; foreach ((array) $header as $value) { - foreach ((array) $value as $v) { - if (strpos($v, ',') === false) { - $trimmed = trim($v); - if ($trimmed !== '') { - $result[] = $trimmed; - } + foreach (self::splitList($value) as $parsed) { + $result[] = $parsed; + } + } + + return $result; + } + + /** + * Splits a HTTP header defined to contain a comma-separated list into + * each individual value. Empty values will be removed. + * + * Example headers include 'accept', 'cache-control' and 'if-none-match'. + * + * This method must not be used to parse headers that are not defined as + * a list, such as 'user-agent' or 'set-cookie'. + * + * @param string|string[] $values Header value as returned by MessageInterface::getHeader() + * + * @return string[] + */ + public static function splitList($values): array + { + if (!\is_array($values)) { + $values = [$values]; + } + + $result = []; + foreach ($values as $value) { + if (!\is_string($value)) { + throw new \TypeError('$header must either be a string or an array containing strings.'); + } + + $v = ''; + $isQuoted = false; + $isEscaped = false; + for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { + if ($isEscaped) { + $v .= $value[$i]; + $isEscaped = false; + continue; } - foreach (preg_split('/,(?=([^"]*"([^"]|\\\\.)*")*[^"]*$)/', $v) as $vv) { - $trimmed = trim($vv); - if ($trimmed !== '') { - $result[] = $trimmed; + + if (!$isQuoted && $value[$i] === ',') { + $v = \trim($v); + if ($v !== '') { + $result[] = $v; } + + $v = ''; + continue; } + + if ($isQuoted && $value[$i] === '\\') { + $isEscaped = true; + $v .= $value[$i]; + + continue; + } + if ($value[$i] === '"') { + $isQuoted = !$isQuoted; + $v .= $value[$i]; + + continue; + } + + $v .= $value[$i]; + } + + $v = \trim($v); + if ($v !== '') { + $result[] = $v; } } diff --git a/vendor/guzzlehttp/psr7/src/HttpFactory.php b/vendor/guzzlehttp/psr7/src/HttpFactory.php index 30be222f..73d17e33 100644 --- a/vendor/guzzlehttp/psr7/src/HttpFactory.php +++ b/vendor/guzzlehttp/psr7/src/HttpFactory.php @@ -23,13 +23,7 @@ use Psr\Http\Message\UriInterface; * Note: in consuming code it is recommended to require the implemented interfaces * and inject the instance of this class multiple times. */ -final class HttpFactory implements - RequestFactoryInterface, - ResponseFactoryInterface, - ServerRequestFactoryInterface, - StreamFactoryInterface, - UploadedFileFactoryInterface, - UriFactoryInterface +final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface { public function createUploadedFile( StreamInterface $stream, diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php index 8e3cf171..e674c9ab 100644 --- a/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -13,19 +13,22 @@ use Psr\Http\Message\StreamInterface; * then appends the zlib.inflate filter. The stream is then converted back * to a Guzzle stream resource to be used as a Guzzle stream. * - * @link http://tools.ietf.org/html/rfc1950 - * @link http://tools.ietf.org/html/rfc1952 - * @link http://php.net/manual/en/filters.compression.php + * @see https://datatracker.ietf.org/doc/html/rfc1950 + * @see https://datatracker.ietf.org/doc/html/rfc1952 + * @see https://www.php.net/manual/en/filters.compression.php */ final class InflateStream implements StreamInterface { use StreamDecoratorTrait; + /** @var StreamInterface */ + private $stream; + public function __construct(StreamInterface $stream) { $resource = StreamWrapper::getResource($stream); // Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data - // See http://www.zlib.net/manual.html#Advanced definition of inflateInit2 + // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2 // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection" // Default window size is 15. stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]); diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php index 6b604296..f6c84904 100644 --- a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -20,6 +20,11 @@ final class LazyOpenStream implements StreamInterface /** @var string */ private $mode; + /** + * @var StreamInterface + */ + private $stream; + /** * @param string $filename File to lazily open * @param string $mode fopen mode to use when opening the stream @@ -28,6 +33,10 @@ final class LazyOpenStream implements StreamInterface { $this->filename = $filename; $this->mode = $mode; + + // unsetting the property forces the first access to go through + // __get(). + unset($this->stream); } /** diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php index 9762d38a..fb223255 100644 --- a/vendor/guzzlehttp/psr7/src/LimitStream.php +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -19,6 +19,9 @@ final class LimitStream implements StreamInterface /** @var int Limit the number of bytes that can be read */ private $limit; + /** @var StreamInterface */ + private $stream; + /** * @param StreamInterface $stream Stream to wrap * @param int $limit Total number of bytes to allow to be read diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php index 9b825b30..5561a513 100644 --- a/vendor/guzzlehttp/psr7/src/Message.php +++ b/vendor/guzzlehttp/psr7/src/Message.php @@ -18,31 +18,31 @@ final class Message public static function toString(MessageInterface $message): string { if ($message instanceof RequestInterface) { - $msg = trim($message->getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); + $msg = trim($message->getMethod().' ' + .$message->getRequestTarget()) + .' HTTP/'.$message->getProtocolVersion(); if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); + $msg .= "\r\nHost: ".$message->getUri()->getHost(); } } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); + $msg = 'HTTP/'.$message->getProtocolVersion().' ' + .$message->getStatusCode().' ' + .$message->getReasonPhrase(); } else { throw new \InvalidArgumentException('Unknown message type'); } foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { + if (is_string($name) && strtolower($name) === 'set-cookie') { foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; + $msg .= "\r\n{$name}: ".$value; } } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); + $msg .= "\r\n{$name}: ".implode(', ', $values); } } - return "{$msg}\r\n\r\n" . $message->getBody(); + return "{$msg}\r\n\r\n".$message->getBody(); } /** @@ -67,6 +67,7 @@ final class Message return null; } + $body->rewind(); $summary = $body->read($truncateAt); $body->rewind(); @@ -76,7 +77,7 @@ final class Message // Matches any printable character, including unicode characters: // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary) !== 0) { return null; } @@ -145,7 +146,7 @@ final class Message // If these aren't the same, then one line didn't match and there's an invalid header. if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 + // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); } @@ -175,6 +176,9 @@ final class Message public static function parseRequestUri(string $path, array $headers): string { $hostKey = array_filter(array_keys($headers), function ($k) { + // Numeric array keys are converted to int by PHP. + $k = (string) $k; + return strtolower($k) === 'host'; }); @@ -186,7 +190,7 @@ final class Message $host = $headers[reset($hostKey)][0]; $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - return $scheme . '://' . $host . '/' . ltrim($path, '/'); + return $scheme.'://'.$host.'/'.ltrim($path, '/'); } /** @@ -223,11 +227,11 @@ final class Message public static function parseResponse(string $message): ResponseInterface { $data = self::parseMessage($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. + // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 + // the space between status-code and reason-phrase is required. But + // browsers accept responses without space and reason as well. if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); + throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']); } $parts = explode(' ', $data['start-line'], 3); diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php index a8696b98..65dbc4ba 100644 --- a/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -12,11 +12,11 @@ use Psr\Http\Message\StreamInterface; */ trait MessageTrait { - /** @var array Map of all registered headers, as original name => array of values */ + /** @var string[][] Map of all registered headers, as original name => array of values */ private $headers = []; - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; + /** @var string[] Map of lowercase header name => original name at registration */ + private $headerNames = []; /** @var string */ private $protocol = '1.1'; @@ -37,6 +37,7 @@ trait MessageTrait $new = clone $this; $new->protocol = $version; + return $new; } @@ -135,21 +136,20 @@ trait MessageTrait $new = clone $this; $new->stream = $body; + return $new; } /** - * @param array $headers + * @param (string|string[])[] $headers */ private function setHeaders(array $headers): void { $this->headerNames = $this->headers = []; foreach ($headers as $header => $value) { - if (is_int($header)) { - // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec - // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. - $header = (string) $header; - } + // Numeric array keys are converted to int by PHP. + $header = (string) $header; + $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); $normalized = strtolower($header); @@ -193,7 +193,7 @@ trait MessageTrait * * @return string[] Trimmed header values * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 */ private function trimAndValidateHeaderValues(array $values): array { @@ -213,7 +213,7 @@ trait MessageTrait } /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2 + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 * * @param mixed $header */ @@ -226,18 +226,15 @@ trait MessageTrait )); } - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $header)) { + if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { throw new \InvalidArgumentException( - sprintf( - '"%s" is not valid header name', - $header - ) + sprintf('"%s" is not valid header name.', $header) ); } } /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2 + * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 * * field-value = *( field-content / obs-fold ) * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] @@ -259,8 +256,10 @@ trait MessageTrait // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. - if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/', $value)) { - throw new \InvalidArgumentException(sprintf('"%s" is not valid header value', $value)); + if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { + throw new \InvalidArgumentException( + sprintf('"%s" is not valid header value.', $value) + ); } } } diff --git a/vendor/guzzlehttp/psr7/src/MimeType.php b/vendor/guzzlehttp/psr7/src/MimeType.php index 3bcb07ae..b131bdbe 100644 --- a/vendor/guzzlehttp/psr7/src/MimeType.php +++ b/vendor/guzzlehttp/psr7/src/MimeType.php @@ -18,7 +18,7 @@ final class MimeType '7zip' => 'application/x-7z-compressed', '123' => 'application/vnd.lotus-1-2-3', 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-acc', + 'aac' => 'audio/aac', 'aam' => 'application/x-authorware-map', 'aas' => 'application/x-authorware-seg', 'abw' => 'application/x-abiword', @@ -29,9 +29,11 @@ final class MimeType 'acu' => 'application/vnd.acucobol', 'acutc' => 'application/vnd.acucorp', 'adp' => 'audio/adpcm', + 'adts' => 'audio/aac', 'aep' => 'application/vnd.audiograph', 'afm' => 'application/x-font-type1', 'afp' => 'application/vnd.ibm.modcap', + 'age' => 'application/vnd.age', 'ahead' => 'application/vnd.ahead.space', 'ai' => 'application/pdf', 'aif' => 'audio/x-aiff', @@ -40,11 +42,16 @@ final class MimeType 'air' => 'application/vnd.adobe.air-application-installer-package+zip', 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', + 'aml' => 'application/automationml-aml+xml', + 'amlx' => 'application/automationml-amlx+zip', 'amr' => 'audio/amr', 'apk' => 'application/vnd.android.package-archive', 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', + 'appinstaller' => 'application/appinstaller', 'application' => 'application/x-ms-application', + 'appx' => 'application/appx', + 'appxbundle' => 'application/appxbundle', 'apr' => 'application/vnd.lotus-approach', 'arc' => 'application/x-freearc', 'arj' => 'application/x-arj', @@ -60,6 +67,8 @@ final class MimeType 'atomsvc' => 'application/atomsvc+xml', 'atx' => 'application/vnd.antix.game-component', 'au' => 'audio/x-au', + 'avci' => 'image/avci', + 'avcs' => 'image/avcs', 'avi' => 'video/x-msvideo', 'avif' => 'image/avif', 'aw' => 'application/applixware', @@ -87,6 +96,7 @@ final class MimeType 'bpk' => 'application/octet-stream', 'bpmn' => 'application/octet-stream', 'bsp' => 'model/vnd.valve.source.compiled-map', + 'btf' => 'image/prs.btif', 'btif' => 'image/prs.btif', 'buffer' => 'application/octet-stream', 'bz' => 'application/x-bzip', @@ -138,6 +148,7 @@ final class MimeType 'cjs' => 'application/node', 'cla' => 'application/vnd.claymore', 'class' => 'application/octet-stream', + 'cld' => 'model/vnd.cld', 'clkk' => 'application/vnd.crick.clicker.keyboard', 'clkp' => 'application/vnd.crick.clicker.palette', 'clkt' => 'application/vnd.crick.clicker.template', @@ -154,6 +165,7 @@ final class MimeType 'com' => 'application/x-msdownload', 'conf' => 'text/plain', 'cpio' => 'application/x-cpio', + 'cpl' => 'application/cpl+xml', 'cpp' => 'text/x-c', 'cpt' => 'application/mac-compactpro', 'crd' => 'application/x-mscardfile', @@ -171,6 +183,7 @@ final class MimeType 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'curl' => 'text/vnd.curl', + 'cwl' => 'application/cwl', 'cww' => 'application/prs.cww', 'cxt' => 'application/x-director', 'cxx' => 'text/x-c', @@ -193,6 +206,7 @@ final class MimeType 'der' => 'application/x-x509-ca-cert', 'dfac' => 'application/vnd.dreamfactory', 'dgc' => 'application/x-dgc-compressed', + 'dib' => 'image/bmp', 'dic' => 'text/x-c', 'dir' => 'application/x-director', 'dis' => 'application/vnd.mobius.dis', @@ -215,6 +229,7 @@ final class MimeType 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dp' => 'application/vnd.osgi.dp', 'dpg' => 'application/vnd.dpgraph', + 'dpx' => 'image/dpx', 'dra' => 'audio/vnd.dra', 'drle' => 'image/dicom-rle', 'dsc' => 'text/prs.lines.tag', @@ -251,7 +266,6 @@ final class MimeType 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', - 'es' => 'application/ecmascript', 'es3' => 'application/vnd.eszigno3+xml', 'esa' => 'application/vnd.osgi.subsystem', 'esf' => 'application/vnd.epson.esf', @@ -316,6 +330,7 @@ final class MimeType 'gca' => 'application/x-gca-compressed', 'gdl' => 'model/vnd.gdl', 'gdoc' => 'application/vnd.google-apps.document', + 'ged' => 'text/vnd.familysearch.gedcom', 'geo' => 'application/vnd.dynageo', 'geojson' => 'application/geo+json', 'gex' => 'application/vnd.geometry-explorer', @@ -443,6 +458,7 @@ final class MimeType 'jsonld' => 'application/ld+json', 'jsonml' => 'application/jsonml+json', 'jsx' => 'text/jsx', + 'jt' => 'model/jt', 'jxr' => 'image/jxr', 'jxra' => 'image/jxra', 'jxrs' => 'image/jxrs', @@ -547,7 +563,7 @@ final class MimeType 'mime' => 'message/rfc822', 'mj2' => 'video/mj2', 'mjp2' => 'video/mj2', - 'mjs' => 'application/javascript', + 'mjs' => 'text/javascript', 'mk3d' => 'video/x-matroska', 'mka' => 'audio/x-matroska', 'mkd' => 'text/x-markdown', @@ -576,6 +592,7 @@ final class MimeType 'mpd' => 'application/dash+xml', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', + 'mpf' => 'application/media-policy-dataset+xml', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'mpga' => 'audio/mpeg', @@ -596,6 +613,8 @@ final class MimeType 'msg' => 'application/vnd.ms-outlook', 'msh' => 'model/mesh', 'msi' => 'application/x-msdownload', + 'msix' => 'application/msix', + 'msixbundle' => 'application/msixbundle', 'msl' => 'application/vnd.mobius.msl', 'msm' => 'application/octet-stream', 'msp' => 'application/octet-stream', @@ -719,6 +738,7 @@ final class MimeType 'pgm' => 'image/x-portable-graymap', 'pgn' => 'application/x-chess-pgn', 'pgp' => 'application/pgp', + 'phar' => 'application/octet-stream', 'php' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', @@ -753,7 +773,7 @@ final class MimeType 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pqa' => 'application/vnd.palm', - 'prc' => 'application/x-pilot', + 'prc' => 'model/prc', 'pre' => 'application/vnd.lotus-freelance', 'prf' => 'application/pics-rules', 'provx' => 'application/provenance+xml', @@ -768,6 +788,8 @@ final class MimeType 'pvb' => 'application/vnd.3gpp.pic-bw-var', 'pwn' => 'application/vnd.3m.post-it-notes', 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyo' => 'model/vnd.pytha.pyox', + 'pyox' => 'model/vnd.pytha.pyox', 'pyv' => 'video/vnd.ms-playready.media.pyv', 'qam' => 'application/vnd.epson.quickanime', 'qbo' => 'application/vnd.intu.qbo', @@ -916,10 +938,12 @@ final class MimeType 'st' => 'application/vnd.sailingtracker.track', 'stc' => 'application/vnd.sun.xml.calc.template', 'std' => 'application/vnd.sun.xml.draw.template', + 'step' => 'application/STEP', 'stf' => 'application/vnd.wt.stf', 'sti' => 'application/vnd.sun.xml.impress.template', 'stk' => 'application/hyperstudio', 'stl' => 'model/stl', + 'stp' => 'application/STEP', 'stpx' => 'model/step+xml', 'stpxz' => 'model/step-xml+zip', 'stpz' => 'model/step+zip', @@ -993,6 +1017,7 @@ final class MimeType 'txd' => 'application/vnd.genomatix.tuxedo', 'txf' => 'application/vnd.mobius.txf', 'txt' => 'text/plain', + 'u3d' => 'model/u3d', 'u8dsn' => 'message/global-delivery-status', 'u8hdr' => 'message/global-headers', 'u8mdn' => 'message/global-disposition-notification', @@ -1005,10 +1030,12 @@ final class MimeType 'ulx' => 'application/x-glulx', 'umj' => 'application/vnd.umajin', 'unityweb' => 'application/vnd.unity', + 'uo' => 'application/vnd.uoml+xml', 'uoml' => 'application/vnd.uoml+xml', 'uri' => 'text/uri-list', 'uris' => 'text/uri-list', 'urls' => 'text/uri-list', + 'usda' => 'model/vnd.usda', 'usdz' => 'model/vnd.usdz+zip', 'ustar' => 'application/x-ustar', 'utz' => 'application/vnd.uiq.theme', @@ -1088,7 +1115,9 @@ final class MimeType 'webmanifest' => 'application/manifest+json', 'webp' => 'image/webp', 'wg' => 'application/vnd.pmi.widget', + 'wgsl' => 'text/wgsl', 'wgt' => 'application/widget', + 'wif' => 'application/watcherinfo+xml', 'wks' => 'application/vnd.ms-works', 'wm' => 'video/x-ms-wm', 'wma' => 'audio/x-ms-wma', @@ -1141,9 +1170,10 @@ final class MimeType 'xel' => 'application/xcap-el+xml', 'xenc' => 'application/xenc+xml', 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdf' => 'application/xfdf', 'xfdl' => 'application/vnd.xfdl', 'xht' => 'application/xhtml+xml', + 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', 'xhtml' => 'application/xhtml+xml', 'xhvml' => 'application/xv+xml', 'xif' => 'image/vnd.xiff', @@ -1174,6 +1204,7 @@ final class MimeType 'xpw' => 'application/vnd.intercon.formnet', 'xpx' => 'application/vnd.intercon.formnet', 'xsd' => 'application/xml', + 'xsf' => 'application/prs.xsf+xml', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xsm' => 'application/vnd.syncml+xml', @@ -1209,7 +1240,7 @@ final class MimeType /** * Determines the mimetype of a file by looking at its extension. * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromFilename(string $filename): ?string { @@ -1219,7 +1250,7 @@ final class MimeType /** * Maps a file extensions to a mimetype. * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromExtension(string $extension): ?string { diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index c2517228..d23fba8a 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -17,6 +17,9 @@ final class MultipartStream implements StreamInterface /** @var string */ private $boundary; + /** @var StreamInterface */ + private $stream; + /** * @param array $elements Array of associative arrays, each containing a * required "name" key mapping to the form field, @@ -31,7 +34,7 @@ final class MultipartStream implements StreamInterface */ public function __construct(array $elements = [], string $boundary = null) { - $this->boundary = $boundary ?: sha1(uniqid('', true)); + $this->boundary = $boundary ?: bin2hex(random_bytes(20)); $this->stream = $this->createStream($elements); } @@ -48,7 +51,7 @@ final class MultipartStream implements StreamInterface /** * Get the headers needed before transferring the content of a POST file * - * @param array $headers + * @param string[] $headers */ private function getHeaders(array $headers): string { @@ -57,7 +60,7 @@ final class MultipartStream implements StreamInterface $str .= "{$key}: {$value}\r\n"; } - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n"; } /** @@ -68,6 +71,9 @@ final class MultipartStream implements StreamInterface $stream = new AppendStream(); foreach ($elements as $element) { + if (!is_array($element)) { + throw new \UnexpectedValueException('An array is expected'); + } $this->addElement($stream, $element); } @@ -106,10 +112,15 @@ final class MultipartStream implements StreamInterface $stream->addStream(Utils::streamFor("\r\n")); } + /** + * @param string[] $headers + * + * @return array{0: StreamInterface, 1: string[]} + */ private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array { // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); + $disposition = self::getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = ($filename === '0' || $filename) ? sprintf( @@ -121,7 +132,7 @@ final class MultipartStream implements StreamInterface } // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); + $length = self::getHeader($headers, 'content-length'); if (!$length) { if ($length = $stream->getSize()) { $headers['Content-Length'] = (string) $length; @@ -129,21 +140,22 @@ final class MultipartStream implements StreamInterface } // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); + $type = self::getHeader($headers, 'content-type'); if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } + $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; } return [$stream, $headers]; } - private function getHeader(array $headers, string $key) + /** + * @param string[] $headers + */ + private static function getHeader(array $headers, string $key): ?string { $lowercaseHeader = strtolower($key); foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { + if (strtolower((string) $k) === $lowercaseHeader) { return $v; } } diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php index 99e25b9e..161a224f 100644 --- a/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -13,6 +13,9 @@ final class NoSeekStream implements StreamInterface { use StreamDecoratorTrait; + /** @var StreamInterface */ + private $stream; + public function seek($offset, $whence = SEEK_SET): void { throw new \RuntimeException('Cannot seek a NoSeekStream'); diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php index e90389c3..e2040709 100644 --- a/vendor/guzzlehttp/psr7/src/PumpStream.php +++ b/vendor/guzzlehttp/psr7/src/PumpStream.php @@ -18,7 +18,7 @@ use Psr\Http\Message\StreamInterface; */ final class PumpStream implements StreamInterface { - /** @var callable|null */ + /** @var callable(int): (string|false|null)|null */ private $source; /** @var int|null */ @@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface private $buffer; /** - * @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY + * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY * accept an integer argument used to control the * amount of data to return. The callable MUST * return a string when called, or false|null on error @@ -60,6 +60,7 @@ final class PumpStream implements StreamInterface throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -149,8 +150,6 @@ final class PumpStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) @@ -164,11 +163,12 @@ final class PumpStream implements StreamInterface private function pump(int $length): void { - if ($this->source) { + if ($this->source !== null) { do { - $data = call_user_func($this->source, $length); + $data = ($this->source)($length); if ($data === false || $data === null) { $this->source = null; + return; } $this->buffer->write($data); diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php index 2faab3a8..8b949279 100644 --- a/vendor/guzzlehttp/psr7/src/Query.php +++ b/vendor/guzzlehttp/psr7/src/Query.php @@ -93,7 +93,7 @@ final class Query $qs .= $k; $v = is_bool($v) ? (int) $v : $v; if ($v !== null) { - $qs .= '=' . $encoder((string) $v); + $qs .= '='.$encoder((string) $v); } $qs .= '&'; } else { @@ -101,7 +101,7 @@ final class Query $qs .= $k; $vv = is_bool($vv) ? (int) $vv : $vv; if ($vv !== null) { - $qs .= '=' . $encoder((string) $vv); + $qs .= '='.$encoder((string) $vv); } $qs .= '&'; } diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index b17af66a..faafe1ad 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -28,7 +28,7 @@ class Request implements RequestInterface /** * @param string $method HTTP method * @param string|UriInterface $uri URI - * @param array $headers Request headers + * @param (string|string[])[] $headers Request headers * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version */ @@ -69,7 +69,7 @@ class Request implements RequestInterface $target = '/'; } if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); + $target .= '?'.$this->uri->getQuery(); } return $target; @@ -85,6 +85,7 @@ class Request implements RequestInterface $new = clone $this; $new->requestTarget = $requestTarget; + return $new; } @@ -98,6 +99,7 @@ class Request implements RequestInterface $this->assertMethod($method); $new = clone $this; $new->method = strtoupper($method); + return $new; } @@ -131,7 +133,7 @@ class Request implements RequestInterface } if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; + $host .= ':'.$port; } if (isset($this->headerNames['host'])) { @@ -141,7 +143,7 @@ class Request implements RequestInterface $this->headerNames['host'] = 'Host'; } // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 + // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 $this->headers = [$header => [$host]] + $this->headers; } diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 4c6ee6f0..00f16e2d 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -86,7 +86,7 @@ class Response implements ResponseInterface /** * @param int $status Status code - * @param array $headers Response headers + * @param (string|string[])[] $headers Response headers * @param string|resource|StreamInterface|null $body Response body * @param string $version Protocol version * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) @@ -138,6 +138,7 @@ class Response implements ResponseInterface $reasonPhrase = self::PHRASES[$new->statusCode]; } $new->reasonPhrase = (string) $reasonPhrase; + return $new; } diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php index 30224018..8219dba4 100644 --- a/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -14,7 +14,7 @@ final class Rfc7230 * * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons. * - * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 + * @see https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 * * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE */ diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index 43cbb502..3cc95345 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -59,7 +59,7 @@ class ServerRequest extends Request implements ServerRequestInterface /** * @param string $method HTTP method * @param string|UriInterface $uri URI - * @param array $headers Request headers + * @param (string|string[])[] $headers Request headers * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version * @param array $serverParams Typically the $_SERVER superglobal @@ -144,10 +144,10 @@ class ServerRequest extends Request implements ServerRequestInterface foreach (array_keys($files['tmp_name']) as $key) { $spec = [ 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], + 'size' => $files['size'][$key] ?? null, + 'error' => $files['error'][$key] ?? null, + 'name' => $files['name'][$key] ?? null, + 'type' => $files['type'][$key] ?? null, ]; $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); } @@ -182,7 +182,7 @@ class ServerRequest extends Request implements ServerRequestInterface private static function extractHostAndPortFromAuthority(string $authority): array { - $uri = 'http://' . $authority; + $uri = 'http://'.$authority; $parts = parse_url($uri); if (false === $parts) { return [null, null]; @@ -286,8 +286,6 @@ class ServerRequest extends Request implements ServerRequestInterface } /** - * {@inheritdoc} - * * @return array|object|null */ public function getParsedBody() @@ -309,8 +307,6 @@ class ServerRequest extends Request implements ServerRequestInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getAttribute($attribute, $default = null) diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php index d389427c..0aff9b2b 100644 --- a/vendor/guzzlehttp/psr7/src/Stream.php +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -12,8 +12,8 @@ use Psr\Http\Message\StreamInterface; class Stream implements StreamInterface { /** - * @see http://php.net/manual/function.fopen.php - * @see http://php.net/manual/en/function.gzopen.php + * @see https://www.php.net/manual/en/function.fopen.php + * @see https://www.php.net/manual/en/function.gzopen.php */ private const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/'; private const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/'; @@ -61,8 +61,8 @@ class Stream implements StreamInterface $this->stream = $stream; $meta = stream_get_meta_data($this->stream); $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']); $this->uri = $this->getMetadata('uri'); } @@ -80,12 +80,14 @@ class Stream implements StreamInterface if ($this->isSeekable()) { $this->seek(0); } + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -96,13 +98,11 @@ class Stream implements StreamInterface throw new \RuntimeException('Stream is detached'); } - $contents = stream_get_contents($this->stream); - - if ($contents === false) { - throw new \RuntimeException('Unable to read stream contents'); + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); } - return $contents; + return Utils::tryGetContents($this->stream); } public function close(): void @@ -147,6 +147,7 @@ class Stream implements StreamInterface $stats = fstat($this->stream); if (is_array($stats) && isset($stats['size'])) { $this->size = $stats['size']; + return $this->size; } @@ -209,7 +210,7 @@ class Stream implements StreamInterface } if (fseek($this->stream, $offset, $whence) === -1) { throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); + .$offset.' with whence '.var_export($whence, true)); } } @@ -229,7 +230,12 @@ class Stream implements StreamInterface return ''; } - $string = fread($this->stream, $length); + try { + $string = fread($this->stream, $length); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to read from stream', 0, $e); + } + if (false === $string) { throw new \RuntimeException('Unable to read from stream'); } @@ -258,8 +264,6 @@ class Stream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php index 56d4104d..601c13af 100644 --- a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -31,6 +31,7 @@ trait StreamDecoratorTrait { if ($name === 'stream') { $this->stream = $this->createStream(); + return $this->stream; } @@ -43,12 +44,14 @@ trait StreamDecoratorTrait if ($this->isSeekable()) { $this->seek(0); } + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -67,7 +70,7 @@ trait StreamDecoratorTrait { /** @var callable $callable */ $callable = [$this->stream, $method]; - $result = call_user_func_array($callable, $args); + $result = ($callable)(...$args); // Always return the wrapped object if the result is a return $this return $result === $this->stream ? $this : $result; @@ -79,8 +82,6 @@ trait StreamDecoratorTrait } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php index 2a934640..ae853881 100644 --- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -41,7 +41,7 @@ final class StreamWrapper $mode = 'w'; } else { throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); + .'writable, or both.'); } return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); @@ -55,7 +55,7 @@ final class StreamWrapper public static function createStreamContext(StreamInterface $stream) { return stream_context_create([ - 'guzzle' => ['stream' => $stream] + 'guzzle' => ['stream' => $stream], ]); } @@ -115,61 +115,89 @@ final class StreamWrapper */ public function stream_cast(int $cast_as) { - $stream = clone($this->stream); + $stream = clone $this->stream; $resource = $stream->detach(); return $resource ?? false; } /** - * @return array + * @return array{ + * dev: int, + * ino: int, + * mode: int, + * nlink: int, + * uid: int, + * gid: int, + * rdev: int, + * size: int, + * atime: int, + * mtime: int, + * ctime: int, + * blksize: int, + * blocks: int + * } */ public function stream_stat(): array { static $modeMap = [ - 'r' => 33060, + 'r' => 33060, 'rb' => 33060, 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 + 'w' => 33188, + 'wb' => 33188, ]; return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0 + 'blocks' => 0, ]; } /** - * @return array + * @return array{ + * dev: int, + * ino: int, + * mode: int, + * nlink: int, + * uid: int, + * gid: int, + * rdev: int, + * size: int, + * atime: int, + * mtime: int, + * ctime: int, + * blksize: int, + * blocks: int + * } */ public function url_stat(string $path, int $flags): array { return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0 + 'blocks' => 0, ]; } } diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php index b1521bcf..b2671993 100644 --- a/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -113,7 +113,7 @@ class UploadedFile implements UploadedFileInterface $this->error = $error; } - private function isStringNotEmpty($param): bool + private static function isStringNotEmpty($param): bool { return is_string($param) && false === empty($param); } @@ -163,7 +163,7 @@ class UploadedFile implements UploadedFileInterface { $this->validateActive(); - if (false === $this->isStringNotEmpty($targetPath)) { + if (false === self::isStringNotEmpty($targetPath)) { throw new InvalidArgumentException( 'Invalid path provided for move operation; must be a non-empty string' ); diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index 5c6416ae..f1feee87 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -25,7 +25,7 @@ class Uri implements UriInterface, \JsonSerializable private const HTTP_DEFAULT_HOST = 'localhost'; private const DEFAULT_PORTS = [ - 'http' => 80, + 'http' => 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, @@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable /** * Unreserved characters for use in a regex. * - * @link https://tools.ietf.org/html/rfc3986#section-2.3 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 */ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; /** * Sub-delims for use in a regex. * - * @link https://tools.ietf.org/html/rfc3986#section-2.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 */ private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; @@ -87,6 +87,7 @@ class Uri implements UriInterface, \JsonSerializable $this->applyParts($parts); } } + /** * UTF-8 aware \parse_url() replacement. * @@ -121,7 +122,7 @@ class Uri implements UriInterface, \JsonSerializable $url ); - $result = parse_url($prefix . $encodedUrl); + $result = parse_url($prefix.$encodedUrl); if ($result === false) { return false; @@ -161,7 +162,7 @@ class Uri implements UriInterface, \JsonSerializable * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to * that format). * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3 */ public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string { @@ -169,21 +170,25 @@ class Uri implements UriInterface, \JsonSerializable // weak type checks to also accept null until we can add scalar type hints if ($scheme != '') { - $uri .= $scheme . ':'; + $uri .= $scheme.':'; } - if ($authority != ''|| $scheme === 'file') { - $uri .= '//' . $authority; + if ($authority != '' || $scheme === 'file') { + $uri .= '//'.$authority; + } + + if ($authority != '' && $path != '' && $path[0] != '/') { + $path = '/'.$path; } $uri .= $path; if ($query != '') { - $uri .= '?' . $query; + $uri .= '?'.$query; } if ($fragment != '') { - $uri .= '#' . $fragment; + $uri .= '#'.$fragment; } return $uri; @@ -214,7 +219,7 @@ class Uri implements UriInterface, \JsonSerializable * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4 */ public static function isAbsolute(UriInterface $uri): bool { @@ -226,7 +231,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with two slash characters is termed an network-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isNetworkPathReference(UriInterface $uri): bool { @@ -238,7 +243,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with a single slash character is termed an absolute-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isAbsolutePathReference(UriInterface $uri): bool { @@ -253,7 +258,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that does not begin with a slash character is termed a relative-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isRelativePathReference(UriInterface $uri): bool { @@ -272,7 +277,7 @@ class Uri implements UriInterface, \JsonSerializable * @param UriInterface $uri The URI to check * @param UriInterface|null $base An optional base URI to compare against * - * @link https://tools.ietf.org/html/rfc3986#section-4.4 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 */ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool { @@ -331,8 +336,8 @@ class Uri implements UriInterface, \JsonSerializable * * It has the same behavior as withQueryValue() but for an associative array of key => value. * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values + * @param UriInterface $uri URI to use as a base. + * @param (string|null)[] $keyValueArray Associative array of key and values */ public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface { @@ -348,7 +353,7 @@ class Uri implements UriInterface, \JsonSerializable /** * Creates a URI from a hash of `parse_url` components. * - * @link http://php.net/manual/en/function.parse-url.php + * @see https://www.php.net/manual/en/function.parse-url.php * * @throws MalformedUriException If the components do not form a valid URI. */ @@ -370,11 +375,11 @@ class Uri implements UriInterface, \JsonSerializable { $authority = $this->host; if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; + $authority = $this->userInfo.'@'.$authority; } if ($this->port !== null) { - $authority .= ':' . $this->port; + $authority .= ':'.$this->port; } return $authority; @@ -431,7 +436,7 @@ class Uri implements UriInterface, \JsonSerializable { $info = $this->filterUserInfoComponent($user); if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); + $info .= ':'.$this->filterUserInfoComponent($password); } if ($this->userInfo === $info) { @@ -559,7 +564,7 @@ class Uri implements UriInterface, \JsonSerializable ? $this->filterQueryAndFragment($parts['fragment']) : ''; if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); + $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']); } $this->removeDefaultPort(); @@ -591,7 +596,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $component ); @@ -623,7 +628,7 @@ class Uri implements UriInterface, \JsonSerializable } $port = (int) $port; - if (0 > $port || 0xffff < $port) { + if (0 > $port || 0xFFFF < $port) { throw new \InvalidArgumentException( sprintf('Invalid port: %d. Must be between 0 and 65535', $port) ); @@ -633,7 +638,7 @@ class Uri implements UriInterface, \JsonSerializable } /** - * @param string[] $keys + * @param (string|int)[] $keys * * @return string[] */ @@ -645,7 +650,9 @@ class Uri implements UriInterface, \JsonSerializable return []; } - $decodedKeys = array_map('rawurldecode', $keys); + $decodedKeys = array_map(function ($k): string { + return rawurldecode((string) $k); + }, $keys); return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); @@ -660,7 +667,7 @@ class Uri implements UriInterface, \JsonSerializable $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); if ($value !== null) { - $queryString .= '=' . strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); + $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); } return $queryString; @@ -687,7 +694,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path ); @@ -707,7 +714,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str ); @@ -731,8 +738,6 @@ class Uri implements UriInterface, \JsonSerializable if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon'); } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - throw new MalformedUriException('The path of a URI with an authority must start with a slash "/" or be empty'); } } } diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php index e12971ed..e1745573 100644 --- a/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -11,7 +11,7 @@ use Psr\Http\Message\UriInterface; * * @author Tobias Schultze * - * @link https://tools.ietf.org/html/rfc3986#section-6 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6 */ final class UriNormalizer { @@ -119,7 +119,7 @@ final class UriNormalizer * @param UriInterface $uri The URI to normalize * @param int $flags A bitmask of normalizations to apply, see constants * - * @link https://tools.ietf.org/html/rfc3986#section-6.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2 */ public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface { @@ -131,8 +131,8 @@ final class UriNormalizer $uri = self::decodeUnreservedCharacters($uri); } - if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' + && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } @@ -174,7 +174,7 @@ final class UriNormalizer * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * - * @link https://tools.ietf.org/html/rfc3986#section-6.1 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool { @@ -185,7 +185,7 @@ final class UriNormalizer { $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - $callback = function (array $match) { + $callback = function (array $match): string { return strtoupper($match[0]); }; @@ -201,7 +201,7 @@ final class UriNormalizer { $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - $callback = function (array $match) { + $callback = function (array $match): string { return rawurldecode($match[0]); }; diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php index 426e5c9a..3737be1e 100644 --- a/vendor/guzzlehttp/psr7/src/UriResolver.php +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -11,14 +11,14 @@ use Psr\Http\Message\UriInterface; * * @author Tobias Schultze * - * @link https://tools.ietf.org/html/rfc3986#section-5 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5 */ final class UriResolver { /** * Removes dot segments from a path and returns the new path. * - * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4 */ public static function removeDotSegments(string $path): string { @@ -40,7 +40,7 @@ final class UriResolver if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) { // Re-add the leading slash if necessary for cases like "/.." - $newPath = '/' . $newPath; + $newPath = '/'.$newPath; } elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) { // Add the trailing slash if necessary // If newPath is not empty, then $segment must be set and is the last segment from the foreach @@ -53,7 +53,7 @@ final class UriResolver /** * Converts the relative URI into a new URI that is resolved against the base URI. * - * @link http://tools.ietf.org/html/rfc3986#section-5.2 + * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2 */ public static function resolve(UriInterface $base, UriInterface $rel): UriInterface { @@ -80,13 +80,13 @@ final class UriResolver $targetPath = $rel->getPath(); } else { if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); + $targetPath = '/'.$rel->getPath(); } else { $lastSlashPos = strrpos($base->getPath(), '/'); if ($lastSlashPos === false) { $targetPath = $rel->getPath(); } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath(); } } } @@ -127,8 +127,8 @@ final class UriResolver */ public static function relativize(UriInterface $base, UriInterface $target): UriInterface { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + if ($target->getScheme() !== '' + && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') ) { return $target; } @@ -185,7 +185,7 @@ final class UriResolver } } $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments); // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php index e590ad68..bf5ea9db 100644 --- a/vendor/guzzlehttp/psr7/src/Utils.php +++ b/vendor/guzzlehttp/psr7/src/Utils.php @@ -14,18 +14,18 @@ final class Utils /** * Remove the items given by the keys, case insensitively from the data. * - * @param string[] $keys + * @param (string|int)[] $keys */ public static function caselessRemove(array $keys, array $data): array { $result = []; foreach ($keys as &$key) { - $key = strtolower($key); + $key = strtolower((string) $key); } foreach ($data as $k => $v) { - if (!is_string($k) || !in_array(strtolower($k), $keys)) { + if (!in_array(strtolower((string) $k), $keys)) { $result[$k] = $v; } } @@ -90,6 +90,7 @@ final class Utils } $buffer .= $buf; } + return $buffer; } @@ -174,7 +175,7 @@ final class Utils $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; + $changes['set_headers']['Host'] .= ':'.$port; } } } @@ -230,7 +231,7 @@ final class Utils * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length */ - public static function readLine(StreamInterface $stream, ?int $maxLength = null): string + public static function readLine(StreamInterface $stream, int $maxLength = null): string { $buffer = ''; $size = 0; @@ -291,6 +292,7 @@ final class Utils fwrite($stream, (string) $resource); fseek($stream, 0); } + return new Stream($stream, $options); } @@ -308,6 +310,7 @@ final class Utils fseek($stream, 0); $resource = $stream; } + return new Stream($resource, $options); case 'object': /** @var object $resource */ @@ -320,6 +323,7 @@ final class Utils } $result = $resource->current(); $resource->next(); + return $result; }, $options); } elseif (method_exists($resource, '__toString')) { @@ -334,7 +338,7 @@ final class Utils return new PumpStream($resource, $options); } - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); + throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource)); } /** @@ -386,6 +390,53 @@ final class Utils return $handle; } + /** + * Safely gets the contents of a given stream. + * + * When stream_get_contents fails, PHP normally raises a warning. This + * function adds an error handler that checks for errors and throws an + * exception instead. + * + * @param resource $stream + * + * @throws \RuntimeException if the stream cannot be read + */ + public static function tryGetContents($stream): string + { + $ex = null; + set_error_handler(static function (int $errno, string $errstr) use (&$ex): bool { + $ex = new \RuntimeException(sprintf( + 'Unable to read stream contents: %s', + $errstr + )); + + return true; + }); + + try { + /** @var string|false $contents */ + $contents = stream_get_contents($stream); + + if ($contents === false) { + $ex = new \RuntimeException('Unable to read stream contents'); + } + } catch (\Throwable $e) { + $ex = new \RuntimeException(sprintf( + 'Unable to read stream contents: %s', + $e->getMessage() + ), 0, $e); + } + + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $contents; + } + /** * Returns a UriInterface for the given value. * diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/AuthServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBroker.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ForgetCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php b/vendor/laravel/framework/src/Illuminate/Cache/MemcachedStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php b/vendor/laravel/framework/src/Illuminate/Cache/NullStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Container/Container.php b/vendor/laravel/framework/src/Illuminate/Container/Container.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Support/Arrayable.php b/vendor/laravel/framework/src/Illuminate/Contracts/Support/Arrayable.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Support/Jsonable.php b/vendor/laravel/framework/src/Illuminate/Contracts/Support/Jsonable.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Support/MessageProvider.php b/vendor/laravel/framework/src/Illuminate/Contracts/Support/MessageProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Support/Renderable.php b/vendor/laravel/framework/src/Illuminate/Contracts/Support/Renderable.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Loader.php b/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Loader.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/View/Engine.php b/vendor/laravel/framework/src/Illuminate/Contracts/View/Engine.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolver.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolver.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php b/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SqlServerConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/BaseCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/InstallCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ModelNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/RelationNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOne.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOne.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migration.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationCreator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.create.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.create.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.update.stub b/vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs/migration.update.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php b/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php b/vendor/laravel/framework/src/Illuminate/Database/PostgresConnection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/README.md b/vendor/laravel/framework/src/Illuminate/Database/README.md old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlBuilder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/PostgresBuilder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Seeder.php b/vendor/laravel/framework/src/Illuminate/Database/Seeder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php b/vendor/laravel/framework/src/Illuminate/Database/SqlServerConnection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php b/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ComposerServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php b/vendor/laravel/framework/src/Illuminate/Hashing/BcryptHasher.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Hashing/HashServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Log/Logger.php b/vendor/laravel/framework/src/Illuminate/Log/Logger.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Message.php b/vendor/laravel/framework/src/Illuminate/Mail/Message.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/ConnectorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SqsConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/SyncConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Queue.php b/vendor/laravel/framework/src/Illuminate/Queue/Queue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Redis/RedisServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Redis/composer.json b/vendor/laravel/framework/src/Illuminate/Redis/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Routing/Console/ControllerMakeCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php b/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Route.php b/vendor/laravel/framework/src/Illuminate/Routing/Route.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/CacheBasedSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub b/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php b/vendor/laravel/framework/src/Illuminate/Session/SessionManager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/Store.php b/vendor/laravel/framework/src/Illuminate/Session/Store.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/TokenMismatchException.php b/vendor/laravel/framework/src/Illuminate/Session/TokenMismatchException.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/composer.json b/vendor/laravel/framework/src/Illuminate/Session/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Arr.php b/vendor/laravel/framework/src/Illuminate/Support/Arr.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/App.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/App.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Artisan.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Artisan.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Auth.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Auth.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Blade.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Blade.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Cache.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Cache.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Config.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Config.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Cookie.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Cookie.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Crypt.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Crypt.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Event.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Event.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/File.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/File.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Hash.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Hash.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Mail.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Mail.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Password.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Password.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Redirect.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Redirect.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Redis.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Redis.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Request.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Request.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Response.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Response.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Route.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Route.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Validator.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Validator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Fluent.php b/vendor/laravel/framework/src/Illuminate/Support/Fluent.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Manager.php b/vendor/laravel/framework/src/Illuminate/Support/Manager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php b/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/helpers.php b/vendor/laravel/framework/src/Illuminate/Support/helpers.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Translation/FileLoader.php b/vendor/laravel/framework/src/Illuminate/Translation/FileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Translation/MessageSelector.php b/vendor/laravel/framework/src/Illuminate/Translation/MessageSelector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Translation/composer.json b/vendor/laravel/framework/src/Illuminate/Translation/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php b/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifierInterface.php b/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifierInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php b/vendor/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Validation/composer.json b/vendor/laravel/framework/src/Illuminate/Validation/composer.json old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/Engine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/Engine.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php b/vendor/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php b/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/Factory.php b/vendor/laravel/framework/src/Illuminate/View/Factory.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/View.php b/vendor/laravel/framework/src/Illuminate/View/View.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/ViewFinderInterface.php b/vendor/laravel/framework/src/Illuminate/View/ViewFinderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php b/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/tinker/composer.json b/vendor/laravel/tinker/composer.json index d1500663..827dd1dc 100644 --- a/vendor/laravel/tinker/composer.json +++ b/vendor/laravel/tinker/composer.json @@ -11,18 +11,19 @@ ], "require": { "php": "^7.2.5|^8.0", - "illuminate/console": "^6.0|^7.0|^8.0|^9.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, "autoload": { "psr-4": { @@ -37,9 +38,6 @@ } }, "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" diff --git a/vendor/laravel/tinker/src/Console/TinkerCommand.php b/vendor/laravel/tinker/src/Console/TinkerCommand.php index 95d4c09f..07ad30da 100644 --- a/vendor/laravel/tinker/src/Console/TinkerCommand.php +++ b/vendor/laravel/tinker/src/Console/TinkerCommand.php @@ -52,6 +52,10 @@ class TinkerCommand extends Command $this->getCasters() ); + if ($this->option('execute')) { + $config->setRawOutput(true); + } + $shell = new Shell($config); $shell->addCommands($this->getCommands()); $shell->setIncludes($this->argument('include')); @@ -127,6 +131,10 @@ class TinkerCommand extends Command $casters['Illuminate\Database\Eloquent\Model'] = 'Laravel\Tinker\TinkerCaster::castModel'; } + if (class_exists('Illuminate\Process\ProcessResult')) { + $casters['Illuminate\Process\ProcessResult'] = 'Laravel\Tinker\TinkerCaster::castProcessResult'; + } + if (class_exists('Illuminate\Foundation\Application')) { $casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication'; } diff --git a/vendor/laravel/tinker/src/TinkerCaster.php b/vendor/laravel/tinker/src/TinkerCaster.php index a5c04dee..be3544ef 100644 --- a/vendor/laravel/tinker/src/TinkerCaster.php +++ b/vendor/laravel/tinker/src/TinkerCaster.php @@ -94,6 +94,22 @@ class TinkerCaster ]; } + /** + * Get an array representing the properties of a process result. + * + * @param \Illuminate\Process\ProcessResult $result + * @return array + */ + public static function castProcessResult($result) + { + return [ + Caster::PREFIX_VIRTUAL.'output' => $result->output(), + Caster::PREFIX_VIRTUAL.'errorOutput' => $result->errorOutput(), + Caster::PREFIX_VIRTUAL.'exitCode' => $result->exitCode(), + Caster::PREFIX_VIRTUAL.'successful' => $result->successful(), + ]; + } + /** * Get an array representing the properties of a model. * @@ -113,7 +129,7 @@ class TinkerCaster $hidden = array_flip($model->getHidden()); $appends = (function () { - return array_combine($this->appends, $this->appends); + return array_combine($this->appends, $this->appends); // @phpstan-ignore-line })->bindTo($model, $model)(); foreach ($appends as $appended) { diff --git a/vendor/laravel/tinker/src/TinkerServiceProvider.php b/vendor/laravel/tinker/src/TinkerServiceProvider.php index 3f1cd563..0da82b80 100644 --- a/vendor/laravel/tinker/src/TinkerServiceProvider.php +++ b/vendor/laravel/tinker/src/TinkerServiceProvider.php @@ -20,7 +20,7 @@ class TinkerServiceProvider extends ServiceProvider implements DeferrableProvide $source = realpath($raw = __DIR__.'/../config/tinker.php') ?: $raw; if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) { - $this->publishes([$source => config_path('tinker.php')]); + $this->publishes([$source => $this->app->configPath('tinker.php')]); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('tinker'); } diff --git a/vendor/league/commonmark/bin/commonmark b/vendor/league/commonmark/bin/commonmark old mode 100755 new mode 100644 diff --git a/vendor/league/flysystem/src/Adapter/Ftp.php b/vendor/league/flysystem/src/Adapter/Ftp.php index caa8b91d..b7886bb2 100644 --- a/vendor/league/flysystem/src/Adapter/Ftp.php +++ b/vendor/league/flysystem/src/Adapter/Ftp.php @@ -572,9 +572,9 @@ class Ftp extends AbstractFtpAdapter private function getRawExecResponseCode($command) { - $response = @ftp_raw($this->connection, trim($command)); + $response = @ftp_raw($this->connection, trim($command)) ?: []; - return (int) preg_replace('/\D/', '', implode(' ', $response)); + return (int) preg_replace('/\D/', '', implode(' ', (array) $response)); } private function hasFtpConnection(): bool diff --git a/vendor/league/mime-type-detection/CHANGELOG.md b/vendor/league/mime-type-detection/CHANGELOG.md index 2264f7ad..a45872a9 100644 --- a/vendor/league/mime-type-detection/CHANGELOG.md +++ b/vendor/league/mime-type-detection/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 1.15.0 - 2024-01-28 + +- Updated lookup + +## 1.14.0 - 2022-10-17 + +### Updated + +- Updated lookup + +## 1.13.0 - 2023-08-05 + +### Added + +- A reverse lookup mechanism to fetch one or all extensions for a given mimetype + +## 1.12.0 - 2023-08-03 + +### Updated + +- Updated lookup + +## 1.11.0 - 2023-04-17 + +### Updated + +- Updated lookup + ## 1.10.0 - 2022-04-11 ### Fixed diff --git a/vendor/league/mime-type-detection/LICENSE b/vendor/league/mime-type-detection/LICENSE index 1f016521..39d50b5e 100644 --- a/vendor/league/mime-type-detection/LICENSE +++ b/vendor/league/mime-type-detection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2022 Frank de Jonge +Copyright (c) 2013-2023 Frank de Jonge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/league/mime-type-detection/composer.json b/vendor/league/mime-type-detection/composer.json index 80ca1af8..cd75beea 100644 --- a/vendor/league/mime-type-detection/composer.json +++ b/vendor/league/mime-type-detection/composer.json @@ -13,11 +13,11 @@ "phpstan": "vendor/bin/phpstan analyse -l 6 src" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "ext-fileinfo": "*" }, "require-dev": { - "phpunit/phpunit": "^8.5.8 || ^9.3", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0", "phpstan/phpstan": "^0.12.68", "friendsofphp/php-cs-fixer": "^3.2" }, @@ -28,7 +28,7 @@ }, "config": { "platform": { - "php": "7.2.0" + "php": "7.4.0" } } } diff --git a/vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php b/vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php index 92b6b1c6..cd344620 100644 --- a/vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php +++ b/vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php @@ -6,7 +6,7 @@ namespace League\MimeTypeDetection; use const PATHINFO_EXTENSION; -class ExtensionMimeTypeDetector implements MimeTypeDetector +class ExtensionMimeTypeDetector implements MimeTypeDetector, ExtensionLookup { /** * @var ExtensionToMimeTypeMap @@ -39,4 +39,18 @@ class ExtensionMimeTypeDetector implements MimeTypeDetector { return null; } + + public function lookupExtension(string $mimetype): ?string + { + return $this->extensions instanceof ExtensionLookup + ? $this->extensions->lookupExtension($mimetype) + : null; + } + + public function lookupAllExtensions(string $mimetype): array + { + return $this->extensions instanceof ExtensionLookup + ? $this->extensions->lookupAllExtensions($mimetype) + : []; + } } diff --git a/vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php b/vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php index ba91938f..8084f924 100644 --- a/vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php +++ b/vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php @@ -9,7 +9,7 @@ use const FILEINFO_MIME_TYPE; use const PATHINFO_EXTENSION; use finfo; -class FinfoMimeTypeDetector implements MimeTypeDetector +class FinfoMimeTypeDetector implements MimeTypeDetector, ExtensionLookup { private const INCONCLUSIVE_MIME_TYPES = [ 'application/x-empty', @@ -89,4 +89,18 @@ class FinfoMimeTypeDetector implements MimeTypeDetector return (string) substr($contents, 0, $this->bufferSampleSize); } + + public function lookupExtension(string $mimetype): ?string + { + return $this->extensionMap instanceof ExtensionLookup + ? $this->extensionMap->lookupExtension($mimetype) + : null; + } + + public function lookupAllExtensions(string $mimetype): array + { + return $this->extensionMap instanceof ExtensionLookup + ? $this->extensionMap->lookupAllExtensions($mimetype) + : []; + } } diff --git a/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php b/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php index f092388d..1ce17911 100644 --- a/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php +++ b/vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace League\MimeTypeDetection; -class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap +class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap, ExtensionLookup { /** - * @var string[] + * @var array * * @internal */ @@ -23,7 +23,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap '7zip' => 'application/x-7z-compressed', '123' => 'application/vnd.lotus-1-2-3', 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-acc', + 'aac' => 'audio/acc', 'aam' => 'application/x-authorware-map', 'aas' => 'application/x-authorware-seg', 'abw' => 'application/x-abiword', @@ -34,6 +34,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'acu' => 'application/vnd.acucobol', 'acutc' => 'application/vnd.acucorp', 'adp' => 'audio/adpcm', + 'adts' => 'audio/aac', 'aep' => 'application/vnd.audiograph', 'afm' => 'application/x-font-type1', 'afp' => 'application/vnd.ibm.modcap', @@ -46,11 +47,16 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'air' => 'application/vnd.adobe.air-application-installer-package+zip', 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', + 'aml' => 'application/automationml-aml+xml', + 'amlx' => 'application/automationml-amlx+zip', 'amr' => 'audio/amr', 'apk' => 'application/vnd.android.package-archive', 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', + 'appinstaller' => 'application/appinstaller', 'application' => 'application/x-ms-application', + 'appx' => 'application/appx', + 'appxbundle' => 'application/appxbundle', 'apr' => 'application/vnd.lotus-approach', 'arc' => 'application/x-freearc', 'arj' => 'application/x-arj', @@ -94,7 +100,9 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'boz' => 'application/x-bzip2', 'bpk' => 'application/octet-stream', 'bpmn' => 'application/octet-stream', + 'brf' => 'application/braille', 'bsp' => 'model/vnd.valve.source.compiled-map', + 'btf' => 'image/prs.btif', 'btif' => 'image/prs.btif', 'buffer' => 'application/octet-stream', 'bz' => 'application/x-bzip', @@ -146,6 +154,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'cjs' => 'application/node', 'cla' => 'application/vnd.claymore', 'class' => 'application/octet-stream', + 'cld' => 'model/vnd.cld', 'clkk' => 'application/vnd.crick.clicker.keyboard', 'clkp' => 'application/vnd.crick.clicker.palette', 'clkt' => 'application/vnd.crick.clicker.template', @@ -180,6 +189,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'curl' => 'text/vnd.curl', + 'cwl' => 'application/cwl', 'cww' => 'application/prs.cww', 'cxt' => 'application/x-director', 'cxx' => 'text/x-c', @@ -202,6 +212,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'der' => 'application/x-x509-ca-cert', 'dfac' => 'application/vnd.dreamfactory', 'dgc' => 'application/x-dgc-compressed', + 'dib' => 'image/bmp', 'dic' => 'text/x-c', 'dir' => 'application/x-director', 'dis' => 'application/vnd.mobius.dis', @@ -224,10 +235,12 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dp' => 'application/vnd.osgi.dp', 'dpg' => 'application/vnd.dpgraph', + 'dpx' => 'image/dpx', 'dra' => 'audio/vnd.dra', 'drle' => 'image/dicom-rle', 'dsc' => 'text/prs.lines.tag', 'dssc' => 'application/dssc+der', + 'dst' => 'application/octet-stream', 'dtb' => 'application/x-dtbook+xml', 'dtd' => 'application/xml-dtd', 'dts' => 'audio/vnd.dts', @@ -260,7 +273,6 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', - 'es' => 'application/ecmascript', 'es3' => 'application/vnd.eszigno3+xml', 'esa' => 'application/vnd.osgi.subsystem', 'esf' => 'application/vnd.epson.esf', @@ -453,6 +465,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'jsonld' => 'application/ld+json', 'jsonml' => 'application/jsonml+json', 'jsx' => 'text/jsx', + 'jt' => 'model/jt', 'jxr' => 'image/jxr', 'jxra' => 'image/jxra', 'jxrs' => 'image/jxrs', @@ -557,7 +570,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'mime' => 'message/rfc822', 'mj2' => 'video/mj2', 'mjp2' => 'video/mj2', - 'mjs' => 'application/javascript', + 'mjs' => 'text/javascript', 'mk3d' => 'video/x-matroska', 'mka' => 'audio/x-matroska', 'mkd' => 'text/x-markdown', @@ -607,6 +620,8 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'msg' => 'application/vnd.ms-outlook', 'msh' => 'model/mesh', 'msi' => 'application/x-msdownload', + 'msix' => 'application/msix', + 'msixbundle' => 'application/msixbundle', 'msl' => 'application/vnd.mobius.msl', 'msm' => 'application/octet-stream', 'msp' => 'application/octet-stream', @@ -631,6 +646,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'nbp' => 'application/vnd.wolfram.player', 'nc' => 'application/x-netcdf', 'ncx' => 'application/x-dtbncx+xml', + 'ndjson' => 'application/x-ndjson', 'nfo' => 'text/x-nfo', 'ngdat' => 'application/vnd.nokia.n-gage.data', 'nitf' => 'application/vnd.nitf', @@ -777,9 +793,13 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'pti' => 'image/prs.pti', 'ptid' => 'application/vnd.pvi.ptid1', 'pub' => 'application/x-mspublisher', + 'pv' => 'application/octet-stream', 'pvb' => 'application/vnd.3gpp.pic-bw-var', 'pwn' => 'application/vnd.3m.post-it-notes', + 'pxf' => 'application/octet-stream', 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyo' => 'model/vnd.pytha.pyox', + 'pyox' => 'model/vnd.pytha.pyox', 'pyv' => 'video/vnd.ms-playready.media.pyv', 'qam' => 'application/vnd.epson.quickanime', 'qbo' => 'application/vnd.intu.qbo', @@ -928,10 +948,12 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'st' => 'application/vnd.sailingtracker.track', 'stc' => 'application/vnd.sun.xml.calc.template', 'std' => 'application/vnd.sun.xml.draw.template', + 'step' => 'application/STEP', 'stf' => 'application/vnd.wt.stf', 'sti' => 'application/vnd.sun.xml.impress.template', 'stk' => 'application/hyperstudio', 'stl' => 'model/stl', + 'stp' => 'application/STEP', 'stpx' => 'model/step+xml', 'stpxz' => 'model/step-xml+zip', 'stpz' => 'model/step+zip', @@ -1018,10 +1040,12 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'ulx' => 'application/x-glulx', 'umj' => 'application/vnd.umajin', 'unityweb' => 'application/vnd.unity', + 'uo' => 'application/vnd.uoml+xml', 'uoml' => 'application/vnd.uoml+xml', 'uri' => 'text/uri-list', 'uris' => 'text/uri-list', 'urls' => 'text/uri-list', + 'usda' => 'model/vnd.usda', 'usdz' => 'model/vnd.usdz+zip', 'ustar' => 'application/x-ustar', 'utz' => 'application/vnd.uiq.theme', @@ -1101,6 +1125,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'webmanifest' => 'application/manifest+json', 'webp' => 'image/webp', 'wg' => 'application/vnd.pmi.widget', + 'wgsl' => 'text/wgsl', 'wgt' => 'application/widget', 'wif' => 'application/watcherinfo+xml', 'wks' => 'application/vnd.ms-works', @@ -1155,9 +1180,10 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'xel' => 'application/xcap-el+xml', 'xenc' => 'application/xenc+xml', 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdf' => 'application/xfdf', 'xfdl' => 'application/vnd.xfdl', 'xht' => 'application/xhtml+xml', + 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', 'xhtml' => 'application/xhtml+xml', 'xhvml' => 'application/xv+xml', 'xif' => 'image/vnd.xiff', @@ -1188,6 +1214,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'xpw' => 'application/vnd.intercon.formnet', 'xpx' => 'application/vnd.intercon.formnet', 'xsd' => 'application/xml', + 'xsf' => 'application/prs.xsf+xml', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xsm' => 'application/vnd.syncml+xml', @@ -1220,8 +1247,1052 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap 'zsh' => 'text/x-scriptzsh', ]; + /** + * @var array + * + * @internal + */ + public const EXTENSIONS_FOR_MIME_TIMES = [ + 'application/andrew-inset' => ['ez'], + 'application/appinstaller' => ['appinstaller'], + 'application/applixware' => ['aw'], + 'application/appx' => ['appx'], + 'application/appxbundle' => ['appxbundle'], + 'application/atom+xml' => ['atom'], + 'application/atomcat+xml' => ['atomcat'], + 'application/atomdeleted+xml' => ['atomdeleted'], + 'application/atomsvc+xml' => ['atomsvc'], + 'application/atsc-dwd+xml' => ['dwd'], + 'application/atsc-held+xml' => ['held'], + 'application/atsc-rsat+xml' => ['rsat'], + 'application/automationml-aml+xml' => ['aml'], + 'application/automationml-amlx+zip' => ['amlx'], + 'application/bdoc' => ['bdoc'], + 'application/calendar+xml' => ['xcs'], + 'application/ccxml+xml' => ['ccxml'], + 'application/cdfx+xml' => ['cdfx'], + 'application/cdmi-capability' => ['cdmia'], + 'application/cdmi-container' => ['cdmic'], + 'application/cdmi-domain' => ['cdmid'], + 'application/cdmi-object' => ['cdmio'], + 'application/cdmi-queue' => ['cdmiq'], + 'application/cpl+xml' => ['cpl'], + 'application/cu-seeme' => ['cu'], + 'application/cwl' => ['cwl'], + 'application/dash+xml' => ['mpd'], + 'application/dash-patch+xml' => ['mpp'], + 'application/davmount+xml' => ['davmount'], + 'application/docbook+xml' => ['dbk'], + 'application/dssc+der' => ['dssc'], + 'application/dssc+xml' => ['xdssc'], + 'application/ecmascript' => ['ecma'], + 'application/emma+xml' => ['emma'], + 'application/emotionml+xml' => ['emotionml'], + 'application/epub+zip' => ['epub'], + 'application/exi' => ['exi'], + 'application/express' => ['exp'], + 'application/fdf' => ['fdf'], + 'application/fdt+xml' => ['fdt'], + 'application/font-tdpfr' => ['pfr'], + 'application/geo+json' => ['geojson'], + 'application/gml+xml' => ['gml'], + 'application/gpx+xml' => ['gpx'], + 'application/gxf' => ['gxf'], + 'application/gzip' => ['gz', 'gzip'], + 'application/hjson' => ['hjson'], + 'application/hyperstudio' => ['stk'], + 'application/inkml+xml' => ['ink', 'inkml'], + 'application/ipfix' => ['ipfix'], + 'application/its+xml' => ['its'], + 'application/java-archive' => ['jar', 'war', 'ear'], + 'application/java-serialized-object' => ['ser'], + 'application/java-vm' => ['class'], + 'application/javascript' => ['js'], + 'application/json' => ['json', 'map'], + 'application/json5' => ['json5'], + 'application/jsonml+json' => ['jsonml'], + 'application/ld+json' => ['jsonld'], + 'application/lgr+xml' => ['lgr'], + 'application/lost+xml' => ['lostxml'], + 'application/mac-binhex40' => ['hqx'], + 'application/mac-compactpro' => ['cpt'], + 'application/mads+xml' => ['mads'], + 'application/manifest+json' => ['webmanifest'], + 'application/marc' => ['mrc'], + 'application/marcxml+xml' => ['mrcx'], + 'application/mathematica' => ['ma', 'nb', 'mb'], + 'application/mathml+xml' => ['mathml'], + 'application/mbox' => ['mbox'], + 'application/media-policy-dataset+xml' => ['mpf'], + 'application/mediaservercontrol+xml' => ['mscml'], + 'application/metalink+xml' => ['metalink'], + 'application/metalink4+xml' => ['meta4'], + 'application/mets+xml' => ['mets'], + 'application/mmt-aei+xml' => ['maei'], + 'application/mmt-usd+xml' => ['musd'], + 'application/mods+xml' => ['mods'], + 'application/mp21' => ['m21', 'mp21'], + 'application/mp4' => ['mp4', 'mpg4', 'mp4s', 'm4p'], + 'application/msix' => ['msix'], + 'application/msixbundle' => ['msixbundle'], + 'application/msword' => ['doc', 'dot', 'word'], + 'application/mxf' => ['mxf'], + 'application/n-quads' => ['nq'], + 'application/n-triples' => ['nt'], + 'application/node' => ['cjs'], + 'application/octet-stream' => ['bin', 'dms', 'lrf', 'mar', 'so', 'dist', 'distz', 'pkg', 'bpk', 'dump', 'elc', 'deploy', 'exe', 'dll', 'deb', 'dmg', 'iso', 'img', 'msi', 'msp', 'msm', 'buffer', 'phar', 'lha', 'lzh', 'class', 'sea', 'dmn', 'bpmn', 'kdb', 'sst', 'csr', 'dst', 'pv', 'pxf'], + 'application/oda' => ['oda'], + 'application/oebps-package+xml' => ['opf'], + 'application/ogg' => ['ogx'], + 'application/omdoc+xml' => ['omdoc'], + 'application/onenote' => ['onetoc', 'onetoc2', 'onetmp', 'onepkg'], + 'application/oxps' => ['oxps'], + 'application/p2p-overlay+xml' => ['relo'], + 'application/patch-ops-error+xml' => ['xer'], + 'application/pdf' => ['pdf', 'ai'], + 'application/pgp-encrypted' => ['pgp'], + 'application/pgp-keys' => ['asc'], + 'application/pgp-signature' => ['sig', 'asc'], + 'application/pics-rules' => ['prf'], + 'application/pkcs10' => ['p10'], + 'application/pkcs7-mime' => ['p7m', 'p7c'], + 'application/pkcs7-signature' => ['p7s'], + 'application/pkcs8' => ['p8'], + 'application/pkix-attr-cert' => ['ac'], + 'application/pkix-cert' => ['cer'], + 'application/pkix-crl' => ['crl'], + 'application/pkix-pkipath' => ['pkipath'], + 'application/pkixcmp' => ['pki'], + 'application/pls+xml' => ['pls'], + 'application/postscript' => ['ai', 'eps', 'ps'], + 'application/provenance+xml' => ['provx'], + 'application/prs.cww' => ['cww'], + 'application/prs.xsf+xml' => ['xsf'], + 'application/pskc+xml' => ['pskcxml'], + 'application/raml+yaml' => ['raml'], + 'application/rdf+xml' => ['rdf', 'owl'], + 'application/reginfo+xml' => ['rif'], + 'application/relax-ng-compact-syntax' => ['rnc'], + 'application/resource-lists+xml' => ['rl'], + 'application/resource-lists-diff+xml' => ['rld'], + 'application/rls-services+xml' => ['rs'], + 'application/route-apd+xml' => ['rapd'], + 'application/route-s-tsid+xml' => ['sls'], + 'application/route-usd+xml' => ['rusd'], + 'application/rpki-ghostbusters' => ['gbr'], + 'application/rpki-manifest' => ['mft'], + 'application/rpki-roa' => ['roa'], + 'application/rsd+xml' => ['rsd'], + 'application/rss+xml' => ['rss'], + 'application/rtf' => ['rtf'], + 'application/sbml+xml' => ['sbml'], + 'application/scvp-cv-request' => ['scq'], + 'application/scvp-cv-response' => ['scs'], + 'application/scvp-vp-request' => ['spq'], + 'application/scvp-vp-response' => ['spp'], + 'application/sdp' => ['sdp'], + 'application/senml+xml' => ['senmlx'], + 'application/sensml+xml' => ['sensmlx'], + 'application/set-payment-initiation' => ['setpay'], + 'application/set-registration-initiation' => ['setreg'], + 'application/shf+xml' => ['shf'], + 'application/sieve' => ['siv', 'sieve'], + 'application/smil+xml' => ['smi', 'smil'], + 'application/sparql-query' => ['rq'], + 'application/sparql-results+xml' => ['srx'], + 'application/sql' => ['sql'], + 'application/srgs' => ['gram'], + 'application/srgs+xml' => ['grxml'], + 'application/sru+xml' => ['sru'], + 'application/ssdl+xml' => ['ssdl'], + 'application/ssml+xml' => ['ssml'], + 'application/swid+xml' => ['swidtag'], + 'application/tei+xml' => ['tei', 'teicorpus'], + 'application/thraud+xml' => ['tfi'], + 'application/timestamped-data' => ['tsd'], + 'application/toml' => ['toml'], + 'application/trig' => ['trig'], + 'application/ttml+xml' => ['ttml'], + 'application/ubjson' => ['ubj'], + 'application/urc-ressheet+xml' => ['rsheet'], + 'application/urc-targetdesc+xml' => ['td'], + 'application/vnd.1000minds.decision-model+xml' => ['1km'], + 'application/vnd.3gpp.pic-bw-large' => ['plb'], + 'application/vnd.3gpp.pic-bw-small' => ['psb'], + 'application/vnd.3gpp.pic-bw-var' => ['pvb'], + 'application/vnd.3gpp2.tcap' => ['tcap'], + 'application/vnd.3m.post-it-notes' => ['pwn'], + 'application/vnd.accpac.simply.aso' => ['aso'], + 'application/vnd.accpac.simply.imp' => ['imp'], + 'application/vnd.acucobol' => ['acu'], + 'application/vnd.acucorp' => ['atc', 'acutc'], + 'application/vnd.adobe.air-application-installer-package+zip' => ['air'], + 'application/vnd.adobe.formscentral.fcdt' => ['fcdt'], + 'application/vnd.adobe.fxp' => ['fxp', 'fxpl'], + 'application/vnd.adobe.xdp+xml' => ['xdp'], + 'application/vnd.adobe.xfdf' => ['xfdf'], + 'application/vnd.age' => ['age'], + 'application/vnd.ahead.space' => ['ahead'], + 'application/vnd.airzip.filesecure.azf' => ['azf'], + 'application/vnd.airzip.filesecure.azs' => ['azs'], + 'application/vnd.amazon.ebook' => ['azw'], + 'application/vnd.americandynamics.acc' => ['acc'], + 'application/vnd.amiga.ami' => ['ami'], + 'application/vnd.android.package-archive' => ['apk'], + 'application/vnd.anser-web-certificate-issue-initiation' => ['cii'], + 'application/vnd.anser-web-funds-transfer-initiation' => ['fti'], + 'application/vnd.antix.game-component' => ['atx'], + 'application/vnd.apple.installer+xml' => ['mpkg'], + 'application/vnd.apple.keynote' => ['key'], + 'application/vnd.apple.mpegurl' => ['m3u8'], + 'application/vnd.apple.numbers' => ['numbers'], + 'application/vnd.apple.pages' => ['pages'], + 'application/vnd.apple.pkpass' => ['pkpass'], + 'application/vnd.aristanetworks.swi' => ['swi'], + 'application/vnd.astraea-software.iota' => ['iota'], + 'application/vnd.audiograph' => ['aep'], + 'application/vnd.balsamiq.bmml+xml' => ['bmml'], + 'application/vnd.blueice.multipass' => ['mpm'], + 'application/vnd.bmi' => ['bmi'], + 'application/vnd.businessobjects' => ['rep'], + 'application/vnd.chemdraw+xml' => ['cdxml'], + 'application/vnd.chipnuts.karaoke-mmd' => ['mmd'], + 'application/vnd.cinderella' => ['cdy'], + 'application/vnd.citationstyles.style+xml' => ['csl'], + 'application/vnd.claymore' => ['cla'], + 'application/vnd.cloanto.rp9' => ['rp9'], + 'application/vnd.clonk.c4group' => ['c4g', 'c4d', 'c4f', 'c4p', 'c4u'], + 'application/vnd.cluetrust.cartomobile-config' => ['c11amc'], + 'application/vnd.cluetrust.cartomobile-config-pkg' => ['c11amz'], + 'application/vnd.commonspace' => ['csp'], + 'application/vnd.contact.cmsg' => ['cdbcmsg'], + 'application/vnd.cosmocaller' => ['cmc'], + 'application/vnd.crick.clicker' => ['clkx'], + 'application/vnd.crick.clicker.keyboard' => ['clkk'], + 'application/vnd.crick.clicker.palette' => ['clkp'], + 'application/vnd.crick.clicker.template' => ['clkt'], + 'application/vnd.crick.clicker.wordbank' => ['clkw'], + 'application/vnd.criticaltools.wbs+xml' => ['wbs'], + 'application/vnd.ctc-posml' => ['pml'], + 'application/vnd.cups-ppd' => ['ppd'], + 'application/vnd.curl.car' => ['car'], + 'application/vnd.curl.pcurl' => ['pcurl'], + 'application/vnd.dart' => ['dart'], + 'application/vnd.data-vision.rdz' => ['rdz'], + 'application/vnd.dbf' => ['dbf'], + 'application/vnd.dece.data' => ['uvf', 'uvvf', 'uvd', 'uvvd'], + 'application/vnd.dece.ttml+xml' => ['uvt', 'uvvt'], + 'application/vnd.dece.unspecified' => ['uvx', 'uvvx'], + 'application/vnd.dece.zip' => ['uvz', 'uvvz'], + 'application/vnd.denovo.fcselayout-link' => ['fe_launch'], + 'application/vnd.dna' => ['dna'], + 'application/vnd.dolby.mlp' => ['mlp'], + 'application/vnd.dpgraph' => ['dpg'], + 'application/vnd.dreamfactory' => ['dfac'], + 'application/vnd.ds-keypoint' => ['kpxx'], + 'application/vnd.dvb.ait' => ['ait'], + 'application/vnd.dvb.service' => ['svc'], + 'application/vnd.dynageo' => ['geo'], + 'application/vnd.ecowin.chart' => ['mag'], + 'application/vnd.enliven' => ['nml'], + 'application/vnd.epson.esf' => ['esf'], + 'application/vnd.epson.msf' => ['msf'], + 'application/vnd.epson.quickanime' => ['qam'], + 'application/vnd.epson.salt' => ['slt'], + 'application/vnd.epson.ssf' => ['ssf'], + 'application/vnd.eszigno3+xml' => ['es3', 'et3'], + 'application/vnd.ezpix-album' => ['ez2'], + 'application/vnd.ezpix-package' => ['ez3'], + 'application/vnd.fdf' => ['fdf'], + 'application/vnd.fdsn.mseed' => ['mseed'], + 'application/vnd.fdsn.seed' => ['seed', 'dataless'], + 'application/vnd.flographit' => ['gph'], + 'application/vnd.fluxtime.clip' => ['ftc'], + 'application/vnd.framemaker' => ['fm', 'frame', 'maker', 'book'], + 'application/vnd.frogans.fnc' => ['fnc'], + 'application/vnd.frogans.ltf' => ['ltf'], + 'application/vnd.fsc.weblaunch' => ['fsc'], + 'application/vnd.fujitsu.oasys' => ['oas'], + 'application/vnd.fujitsu.oasys2' => ['oa2'], + 'application/vnd.fujitsu.oasys3' => ['oa3'], + 'application/vnd.fujitsu.oasysgp' => ['fg5'], + 'application/vnd.fujitsu.oasysprs' => ['bh2'], + 'application/vnd.fujixerox.ddd' => ['ddd'], + 'application/vnd.fujixerox.docuworks' => ['xdw'], + 'application/vnd.fujixerox.docuworks.binder' => ['xbd'], + 'application/vnd.fuzzysheet' => ['fzs'], + 'application/vnd.genomatix.tuxedo' => ['txd'], + 'application/vnd.geogebra.file' => ['ggb'], + 'application/vnd.geogebra.tool' => ['ggt'], + 'application/vnd.geometry-explorer' => ['gex', 'gre'], + 'application/vnd.geonext' => ['gxt'], + 'application/vnd.geoplan' => ['g2w'], + 'application/vnd.geospace' => ['g3w'], + 'application/vnd.gmx' => ['gmx'], + 'application/vnd.google-apps.document' => ['gdoc'], + 'application/vnd.google-apps.presentation' => ['gslides'], + 'application/vnd.google-apps.spreadsheet' => ['gsheet'], + 'application/vnd.google-earth.kml+xml' => ['kml'], + 'application/vnd.google-earth.kmz' => ['kmz'], + 'application/vnd.grafeq' => ['gqf', 'gqs'], + 'application/vnd.groove-account' => ['gac'], + 'application/vnd.groove-help' => ['ghf'], + 'application/vnd.groove-identity-message' => ['gim'], + 'application/vnd.groove-injector' => ['grv'], + 'application/vnd.groove-tool-message' => ['gtm'], + 'application/vnd.groove-tool-template' => ['tpl'], + 'application/vnd.groove-vcard' => ['vcg'], + 'application/vnd.hal+xml' => ['hal'], + 'application/vnd.handheld-entertainment+xml' => ['zmm'], + 'application/vnd.hbci' => ['hbci'], + 'application/vnd.hhe.lesson-player' => ['les'], + 'application/vnd.hp-hpgl' => ['hpgl'], + 'application/vnd.hp-hpid' => ['hpid'], + 'application/vnd.hp-hps' => ['hps'], + 'application/vnd.hp-jlyt' => ['jlt'], + 'application/vnd.hp-pcl' => ['pcl'], + 'application/vnd.hp-pclxl' => ['pclxl'], + 'application/vnd.hydrostatix.sof-data' => ['sfd-hdstx'], + 'application/vnd.ibm.minipay' => ['mpy'], + 'application/vnd.ibm.modcap' => ['afp', 'listafp', 'list3820'], + 'application/vnd.ibm.rights-management' => ['irm'], + 'application/vnd.ibm.secure-container' => ['sc'], + 'application/vnd.iccprofile' => ['icc', 'icm'], + 'application/vnd.igloader' => ['igl'], + 'application/vnd.immervision-ivp' => ['ivp'], + 'application/vnd.immervision-ivu' => ['ivu'], + 'application/vnd.insors.igm' => ['igm'], + 'application/vnd.intercon.formnet' => ['xpw', 'xpx'], + 'application/vnd.intergeo' => ['i2g'], + 'application/vnd.intu.qbo' => ['qbo'], + 'application/vnd.intu.qfx' => ['qfx'], + 'application/vnd.ipunplugged.rcprofile' => ['rcprofile'], + 'application/vnd.irepository.package+xml' => ['irp'], + 'application/vnd.is-xpr' => ['xpr'], + 'application/vnd.isac.fcs' => ['fcs'], + 'application/vnd.jam' => ['jam'], + 'application/vnd.jcp.javame.midlet-rms' => ['rms'], + 'application/vnd.jisp' => ['jisp'], + 'application/vnd.joost.joda-archive' => ['joda'], + 'application/vnd.kahootz' => ['ktz', 'ktr'], + 'application/vnd.kde.karbon' => ['karbon'], + 'application/vnd.kde.kchart' => ['chrt'], + 'application/vnd.kde.kformula' => ['kfo'], + 'application/vnd.kde.kivio' => ['flw'], + 'application/vnd.kde.kontour' => ['kon'], + 'application/vnd.kde.kpresenter' => ['kpr', 'kpt'], + 'application/vnd.kde.kspread' => ['ksp'], + 'application/vnd.kde.kword' => ['kwd', 'kwt'], + 'application/vnd.kenameaapp' => ['htke'], + 'application/vnd.kidspiration' => ['kia'], + 'application/vnd.kinar' => ['kne', 'knp'], + 'application/vnd.koan' => ['skp', 'skd', 'skt', 'skm'], + 'application/vnd.kodak-descriptor' => ['sse'], + 'application/vnd.las.las+xml' => ['lasxml'], + 'application/vnd.llamagraphics.life-balance.desktop' => ['lbd'], + 'application/vnd.llamagraphics.life-balance.exchange+xml' => ['lbe'], + 'application/vnd.lotus-1-2-3' => ['123'], + 'application/vnd.lotus-approach' => ['apr'], + 'application/vnd.lotus-freelance' => ['pre'], + 'application/vnd.lotus-notes' => ['nsf'], + 'application/vnd.lotus-organizer' => ['org'], + 'application/vnd.lotus-screencam' => ['scm'], + 'application/vnd.lotus-wordpro' => ['lwp'], + 'application/vnd.macports.portpkg' => ['portpkg'], + 'application/vnd.mapbox-vector-tile' => ['mvt'], + 'application/vnd.mcd' => ['mcd'], + 'application/vnd.medcalcdata' => ['mc1'], + 'application/vnd.mediastation.cdkey' => ['cdkey'], + 'application/vnd.mfer' => ['mwf'], + 'application/vnd.mfmp' => ['mfm'], + 'application/vnd.micrografx.flo' => ['flo'], + 'application/vnd.micrografx.igx' => ['igx'], + 'application/vnd.mif' => ['mif'], + 'application/vnd.mobius.daf' => ['daf'], + 'application/vnd.mobius.dis' => ['dis'], + 'application/vnd.mobius.mbk' => ['mbk'], + 'application/vnd.mobius.mqy' => ['mqy'], + 'application/vnd.mobius.msl' => ['msl'], + 'application/vnd.mobius.plc' => ['plc'], + 'application/vnd.mobius.txf' => ['txf'], + 'application/vnd.mophun.application' => ['mpn'], + 'application/vnd.mophun.certificate' => ['mpc'], + 'application/vnd.mozilla.xul+xml' => ['xul'], + 'application/vnd.ms-artgalry' => ['cil'], + 'application/vnd.ms-cab-compressed' => ['cab'], + 'application/vnd.ms-excel' => ['xls', 'xlm', 'xla', 'xlc', 'xlt', 'xlw'], + 'application/vnd.ms-excel.addin.macroenabled.12' => ['xlam'], + 'application/vnd.ms-excel.sheet.binary.macroenabled.12' => ['xlsb'], + 'application/vnd.ms-excel.sheet.macroenabled.12' => ['xlsm'], + 'application/vnd.ms-excel.template.macroenabled.12' => ['xltm'], + 'application/vnd.ms-fontobject' => ['eot'], + 'application/vnd.ms-htmlhelp' => ['chm'], + 'application/vnd.ms-ims' => ['ims'], + 'application/vnd.ms-lrm' => ['lrm'], + 'application/vnd.ms-officetheme' => ['thmx'], + 'application/vnd.ms-outlook' => ['msg'], + 'application/vnd.ms-pki.seccat' => ['cat'], + 'application/vnd.ms-pki.stl' => ['stl'], + 'application/vnd.ms-powerpoint' => ['ppt', 'pps', 'pot', 'ppa'], + 'application/vnd.ms-powerpoint.addin.macroenabled.12' => ['ppam'], + 'application/vnd.ms-powerpoint.presentation.macroenabled.12' => ['pptm'], + 'application/vnd.ms-powerpoint.slide.macroenabled.12' => ['sldm'], + 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => ['ppsm'], + 'application/vnd.ms-powerpoint.template.macroenabled.12' => ['potm'], + 'application/vnd.ms-project' => ['mpp', 'mpt'], + 'application/vnd.ms-word.document.macroenabled.12' => ['docm'], + 'application/vnd.ms-word.template.macroenabled.12' => ['dotm'], + 'application/vnd.ms-works' => ['wps', 'wks', 'wcm', 'wdb'], + 'application/vnd.ms-wpl' => ['wpl'], + 'application/vnd.ms-xpsdocument' => ['xps'], + 'application/vnd.mseq' => ['mseq'], + 'application/vnd.musician' => ['mus'], + 'application/vnd.muvee.style' => ['msty'], + 'application/vnd.mynfc' => ['taglet'], + 'application/vnd.neurolanguage.nlu' => ['nlu'], + 'application/vnd.nitf' => ['ntf', 'nitf'], + 'application/vnd.noblenet-directory' => ['nnd'], + 'application/vnd.noblenet-sealer' => ['nns'], + 'application/vnd.noblenet-web' => ['nnw'], + 'application/vnd.nokia.n-gage.ac+xml' => ['ac'], + 'application/vnd.nokia.n-gage.data' => ['ngdat'], + 'application/vnd.nokia.n-gage.symbian.install' => ['n-gage'], + 'application/vnd.nokia.radio-preset' => ['rpst'], + 'application/vnd.nokia.radio-presets' => ['rpss'], + 'application/vnd.novadigm.edm' => ['edm'], + 'application/vnd.novadigm.edx' => ['edx'], + 'application/vnd.novadigm.ext' => ['ext'], + 'application/vnd.oasis.opendocument.chart' => ['odc'], + 'application/vnd.oasis.opendocument.chart-template' => ['otc'], + 'application/vnd.oasis.opendocument.database' => ['odb'], + 'application/vnd.oasis.opendocument.formula' => ['odf'], + 'application/vnd.oasis.opendocument.formula-template' => ['odft'], + 'application/vnd.oasis.opendocument.graphics' => ['odg'], + 'application/vnd.oasis.opendocument.graphics-template' => ['otg'], + 'application/vnd.oasis.opendocument.image' => ['odi'], + 'application/vnd.oasis.opendocument.image-template' => ['oti'], + 'application/vnd.oasis.opendocument.presentation' => ['odp'], + 'application/vnd.oasis.opendocument.presentation-template' => ['otp'], + 'application/vnd.oasis.opendocument.spreadsheet' => ['ods'], + 'application/vnd.oasis.opendocument.spreadsheet-template' => ['ots'], + 'application/vnd.oasis.opendocument.text' => ['odt'], + 'application/vnd.oasis.opendocument.text-master' => ['odm'], + 'application/vnd.oasis.opendocument.text-template' => ['ott'], + 'application/vnd.oasis.opendocument.text-web' => ['oth'], + 'application/vnd.olpc-sugar' => ['xo'], + 'application/vnd.oma.dd2+xml' => ['dd2'], + 'application/vnd.openblox.game+xml' => ['obgx'], + 'application/vnd.openofficeorg.extension' => ['oxt'], + 'application/vnd.openstreetmap.data+xml' => ['osm'], + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => ['pptx'], + 'application/vnd.openxmlformats-officedocument.presentationml.slide' => ['sldx'], + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => ['ppsx'], + 'application/vnd.openxmlformats-officedocument.presentationml.template' => ['potx'], + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => ['xlsx'], + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => ['xltx'], + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => ['docx'], + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => ['dotx'], + 'application/vnd.osgeo.mapguide.package' => ['mgp'], + 'application/vnd.osgi.dp' => ['dp'], + 'application/vnd.osgi.subsystem' => ['esa'], + 'application/vnd.palm' => ['pdb', 'pqa', 'oprc'], + 'application/vnd.pawaafile' => ['paw'], + 'application/vnd.pg.format' => ['str'], + 'application/vnd.pg.osasli' => ['ei6'], + 'application/vnd.picsel' => ['efif'], + 'application/vnd.pmi.widget' => ['wg'], + 'application/vnd.pocketlearn' => ['plf'], + 'application/vnd.powerbuilder6' => ['pbd'], + 'application/vnd.previewsystems.box' => ['box'], + 'application/vnd.proteus.magazine' => ['mgz'], + 'application/vnd.publishare-delta-tree' => ['qps'], + 'application/vnd.pvi.ptid1' => ['ptid'], + 'application/vnd.pwg-xhtml-print+xml' => ['xhtm'], + 'application/vnd.quark.quarkxpress' => ['qxd', 'qxt', 'qwd', 'qwt', 'qxl', 'qxb'], + 'application/vnd.rar' => ['rar'], + 'application/vnd.realvnc.bed' => ['bed'], + 'application/vnd.recordare.musicxml' => ['mxl'], + 'application/vnd.recordare.musicxml+xml' => ['musicxml'], + 'application/vnd.rig.cryptonote' => ['cryptonote'], + 'application/vnd.rim.cod' => ['cod'], + 'application/vnd.rn-realmedia' => ['rm'], + 'application/vnd.rn-realmedia-vbr' => ['rmvb'], + 'application/vnd.route66.link66+xml' => ['link66'], + 'application/vnd.sailingtracker.track' => ['st'], + 'application/vnd.seemail' => ['see'], + 'application/vnd.sema' => ['sema'], + 'application/vnd.semd' => ['semd'], + 'application/vnd.semf' => ['semf'], + 'application/vnd.shana.informed.formdata' => ['ifm'], + 'application/vnd.shana.informed.formtemplate' => ['itp'], + 'application/vnd.shana.informed.interchange' => ['iif'], + 'application/vnd.shana.informed.package' => ['ipk'], + 'application/vnd.simtech-mindmapper' => ['twd', 'twds'], + 'application/vnd.smaf' => ['mmf'], + 'application/vnd.smart.teacher' => ['teacher'], + 'application/vnd.software602.filler.form+xml' => ['fo'], + 'application/vnd.solent.sdkm+xml' => ['sdkm', 'sdkd'], + 'application/vnd.spotfire.dxp' => ['dxp'], + 'application/vnd.spotfire.sfs' => ['sfs'], + 'application/vnd.stardivision.calc' => ['sdc'], + 'application/vnd.stardivision.draw' => ['sda'], + 'application/vnd.stardivision.impress' => ['sdd'], + 'application/vnd.stardivision.math' => ['smf'], + 'application/vnd.stardivision.writer' => ['sdw', 'vor'], + 'application/vnd.stardivision.writer-global' => ['sgl'], + 'application/vnd.stepmania.package' => ['smzip'], + 'application/vnd.stepmania.stepchart' => ['sm'], + 'application/vnd.sun.wadl+xml' => ['wadl'], + 'application/vnd.sun.xml.calc' => ['sxc'], + 'application/vnd.sun.xml.calc.template' => ['stc'], + 'application/vnd.sun.xml.draw' => ['sxd'], + 'application/vnd.sun.xml.draw.template' => ['std'], + 'application/vnd.sun.xml.impress' => ['sxi'], + 'application/vnd.sun.xml.impress.template' => ['sti'], + 'application/vnd.sun.xml.math' => ['sxm'], + 'application/vnd.sun.xml.writer' => ['sxw'], + 'application/vnd.sun.xml.writer.global' => ['sxg'], + 'application/vnd.sun.xml.writer.template' => ['stw'], + 'application/vnd.sus-calendar' => ['sus', 'susp'], + 'application/vnd.svd' => ['svd'], + 'application/vnd.symbian.install' => ['sis', 'sisx'], + 'application/vnd.syncml+xml' => ['xsm'], + 'application/vnd.syncml.dm+wbxml' => ['bdm'], + 'application/vnd.syncml.dm+xml' => ['xdm'], + 'application/vnd.syncml.dmddf+xml' => ['ddf'], + 'application/vnd.tao.intent-module-archive' => ['tao'], + 'application/vnd.tcpdump.pcap' => ['pcap', 'cap', 'dmp'], + 'application/vnd.tmobile-livetv' => ['tmo'], + 'application/vnd.trid.tpt' => ['tpt'], + 'application/vnd.triscape.mxs' => ['mxs'], + 'application/vnd.trueapp' => ['tra'], + 'application/vnd.ufdl' => ['ufd', 'ufdl'], + 'application/vnd.uiq.theme' => ['utz'], + 'application/vnd.umajin' => ['umj'], + 'application/vnd.unity' => ['unityweb'], + 'application/vnd.uoml+xml' => ['uoml', 'uo'], + 'application/vnd.vcx' => ['vcx'], + 'application/vnd.visio' => ['vsd', 'vst', 'vss', 'vsw'], + 'application/vnd.visionary' => ['vis'], + 'application/vnd.vsf' => ['vsf'], + 'application/vnd.wap.wbxml' => ['wbxml'], + 'application/vnd.wap.wmlc' => ['wmlc'], + 'application/vnd.wap.wmlscriptc' => ['wmlsc'], + 'application/vnd.webturbo' => ['wtb'], + 'application/vnd.wolfram.player' => ['nbp'], + 'application/vnd.wordperfect' => ['wpd'], + 'application/vnd.wqd' => ['wqd'], + 'application/vnd.wt.stf' => ['stf'], + 'application/vnd.xara' => ['xar'], + 'application/vnd.xfdl' => ['xfdl'], + 'application/vnd.yamaha.hv-dic' => ['hvd'], + 'application/vnd.yamaha.hv-script' => ['hvs'], + 'application/vnd.yamaha.hv-voice' => ['hvp'], + 'application/vnd.yamaha.openscoreformat' => ['osf'], + 'application/vnd.yamaha.openscoreformat.osfpvg+xml' => ['osfpvg'], + 'application/vnd.yamaha.smaf-audio' => ['saf'], + 'application/vnd.yamaha.smaf-phrase' => ['spf'], + 'application/vnd.yellowriver-custom-menu' => ['cmp'], + 'application/vnd.zul' => ['zir', 'zirz'], + 'application/vnd.zzazz.deck+xml' => ['zaz'], + 'application/voicexml+xml' => ['vxml'], + 'application/wasm' => ['wasm'], + 'application/watcherinfo+xml' => ['wif'], + 'application/widget' => ['wgt'], + 'application/winhlp' => ['hlp'], + 'application/wsdl+xml' => ['wsdl'], + 'application/wspolicy+xml' => ['wspolicy'], + 'application/x-7z-compressed' => ['7z', '7zip'], + 'application/x-abiword' => ['abw'], + 'application/x-ace-compressed' => ['ace'], + 'application/x-apple-diskimage' => ['dmg'], + 'application/x-arj' => ['arj'], + 'application/x-authorware-bin' => ['aab', 'x32', 'u32', 'vox'], + 'application/x-authorware-map' => ['aam'], + 'application/x-authorware-seg' => ['aas'], + 'application/x-bcpio' => ['bcpio'], + 'application/x-bdoc' => ['bdoc'], + 'application/x-bittorrent' => ['torrent'], + 'application/x-blorb' => ['blb', 'blorb'], + 'application/x-bzip' => ['bz'], + 'application/x-bzip2' => ['bz2', 'boz'], + 'application/x-cbr' => ['cbr', 'cba', 'cbt', 'cbz', 'cb7'], + 'application/x-cdlink' => ['vcd'], + 'application/x-cfs-compressed' => ['cfs'], + 'application/x-chat' => ['chat'], + 'application/x-chess-pgn' => ['pgn'], + 'application/x-chrome-extension' => ['crx'], + 'application/x-cocoa' => ['cco'], + 'application/x-conference' => ['nsc'], + 'application/x-cpio' => ['cpio'], + 'application/x-csh' => ['csh'], + 'application/x-debian-package' => ['deb', 'udeb'], + 'application/x-dgc-compressed' => ['dgc'], + 'application/x-director' => ['dir', 'dcr', 'dxr', 'cst', 'cct', 'cxt', 'w3d', 'fgd', 'swa'], + 'application/x-doom' => ['wad'], + 'application/x-dtbncx+xml' => ['ncx'], + 'application/x-dtbook+xml' => ['dtb'], + 'application/x-dtbresource+xml' => ['res'], + 'application/x-dvi' => ['dvi'], + 'application/x-envoy' => ['evy'], + 'application/x-eva' => ['eva'], + 'application/x-font-bdf' => ['bdf'], + 'application/x-font-ghostscript' => ['gsf'], + 'application/x-font-linux-psf' => ['psf'], + 'application/x-font-pcf' => ['pcf'], + 'application/x-font-snf' => ['snf'], + 'application/x-font-type1' => ['pfa', 'pfb', 'pfm', 'afm'], + 'application/x-freearc' => ['arc'], + 'application/x-futuresplash' => ['spl'], + 'application/x-gca-compressed' => ['gca'], + 'application/x-glulx' => ['ulx'], + 'application/x-gnumeric' => ['gnumeric'], + 'application/x-gramps-xml' => ['gramps'], + 'application/x-gtar' => ['gtar'], + 'application/x-hdf' => ['hdf'], + 'application/x-httpd-php' => ['php', 'php4', 'php3', 'phtml'], + 'application/x-install-instructions' => ['install'], + 'application/x-iso9660-image' => ['iso'], + 'application/x-iwork-keynote-sffkey' => ['key'], + 'application/x-iwork-numbers-sffnumbers' => ['numbers'], + 'application/x-iwork-pages-sffpages' => ['pages'], + 'application/x-java-archive-diff' => ['jardiff'], + 'application/x-java-jnlp-file' => ['jnlp'], + 'application/x-keepass2' => ['kdbx'], + 'application/x-latex' => ['latex'], + 'application/x-lua-bytecode' => ['luac'], + 'application/x-lzh-compressed' => ['lzh', 'lha'], + 'application/x-makeself' => ['run'], + 'application/x-mie' => ['mie'], + 'application/x-mobipocket-ebook' => ['prc', 'mobi'], + 'application/x-ms-application' => ['application'], + 'application/x-ms-shortcut' => ['lnk'], + 'application/x-ms-wmd' => ['wmd'], + 'application/x-ms-wmz' => ['wmz'], + 'application/x-ms-xbap' => ['xbap'], + 'application/x-msaccess' => ['mdb'], + 'application/x-msbinder' => ['obd'], + 'application/x-mscardfile' => ['crd'], + 'application/x-msclip' => ['clp'], + 'application/x-msdos-program' => ['exe'], + 'application/x-msdownload' => ['exe', 'dll', 'com', 'bat', 'msi'], + 'application/x-msmediaview' => ['mvb', 'm13', 'm14'], + 'application/x-msmetafile' => ['wmf', 'wmz', 'emf', 'emz'], + 'application/x-msmoney' => ['mny'], + 'application/x-mspublisher' => ['pub'], + 'application/x-msschedule' => ['scd'], + 'application/x-msterminal' => ['trm'], + 'application/x-mswrite' => ['wri'], + 'application/x-netcdf' => ['nc', 'cdf'], + 'application/x-ns-proxy-autoconfig' => ['pac'], + 'application/x-nzb' => ['nzb'], + 'application/x-perl' => ['pl', 'pm'], + 'application/x-pilot' => ['prc', 'pdb'], + 'application/x-pkcs12' => ['p12', 'pfx'], + 'application/x-pkcs7-certificates' => ['p7b', 'spc'], + 'application/x-pkcs7-certreqresp' => ['p7r'], + 'application/x-rar-compressed' => ['rar'], + 'application/x-redhat-package-manager' => ['rpm'], + 'application/x-research-info-systems' => ['ris'], + 'application/x-sea' => ['sea'], + 'application/x-sh' => ['sh'], + 'application/x-shar' => ['shar'], + 'application/x-shockwave-flash' => ['swf'], + 'application/x-silverlight-app' => ['xap'], + 'application/x-sql' => ['sql'], + 'application/x-stuffit' => ['sit'], + 'application/x-stuffitx' => ['sitx'], + 'application/x-subrip' => ['srt'], + 'application/x-sv4cpio' => ['sv4cpio'], + 'application/x-sv4crc' => ['sv4crc'], + 'application/x-t3vm-image' => ['t3'], + 'application/x-tads' => ['gam'], + 'application/x-tar' => ['tar', 'tgz'], + 'application/x-tcl' => ['tcl', 'tk'], + 'application/x-tex' => ['tex'], + 'application/x-tex-tfm' => ['tfm'], + 'application/x-texinfo' => ['texinfo', 'texi'], + 'application/x-tgif' => ['obj'], + 'application/x-ustar' => ['ustar'], + 'application/x-virtualbox-hdd' => ['hdd'], + 'application/x-virtualbox-ova' => ['ova'], + 'application/x-virtualbox-ovf' => ['ovf'], + 'application/x-virtualbox-vbox' => ['vbox'], + 'application/x-virtualbox-vbox-extpack' => ['vbox-extpack'], + 'application/x-virtualbox-vdi' => ['vdi'], + 'application/x-virtualbox-vhd' => ['vhd'], + 'application/x-virtualbox-vmdk' => ['vmdk'], + 'application/x-wais-source' => ['src'], + 'application/x-web-app-manifest+json' => ['webapp'], + 'application/x-x509-ca-cert' => ['der', 'crt', 'pem'], + 'application/x-xfig' => ['fig'], + 'application/x-xliff+xml' => ['xlf'], + 'application/x-xpinstall' => ['xpi'], + 'application/x-xz' => ['xz'], + 'application/x-zmachine' => ['z1', 'z2', 'z3', 'z4', 'z5', 'z6', 'z7', 'z8'], + 'application/xaml+xml' => ['xaml'], + 'application/xcap-att+xml' => ['xav'], + 'application/xcap-caps+xml' => ['xca'], + 'application/xcap-diff+xml' => ['xdf'], + 'application/xcap-el+xml' => ['xel'], + 'application/xcap-ns+xml' => ['xns'], + 'application/xenc+xml' => ['xenc'], + 'application/xfdf' => ['xfdf'], + 'application/xhtml+xml' => ['xhtml', 'xht'], + 'application/xliff+xml' => ['xlf'], + 'application/xml' => ['xml', 'xsl', 'xsd', 'rng'], + 'application/xml-dtd' => ['dtd'], + 'application/xop+xml' => ['xop'], + 'application/xproc+xml' => ['xpl'], + 'application/xslt+xml' => ['xsl', 'xslt'], + 'application/xspf+xml' => ['xspf'], + 'application/xv+xml' => ['mxml', 'xhvml', 'xvml', 'xvm'], + 'application/yang' => ['yang'], + 'application/yin+xml' => ['yin'], + 'application/zip' => ['zip'], + 'audio/3gpp' => ['3gpp'], + 'audio/aac' => ['adts', 'aac'], + 'audio/adpcm' => ['adp'], + 'audio/amr' => ['amr'], + 'audio/basic' => ['au', 'snd'], + 'audio/midi' => ['mid', 'midi', 'kar', 'rmi'], + 'audio/mobile-xmf' => ['mxmf'], + 'audio/mp3' => ['mp3'], + 'audio/mp4' => ['m4a', 'mp4a'], + 'audio/mpeg' => ['mpga', 'mp2', 'mp2a', 'mp3', 'm2a', 'm3a'], + 'audio/ogg' => ['oga', 'ogg', 'spx', 'opus'], + 'audio/s3m' => ['s3m'], + 'audio/silk' => ['sil'], + 'audio/vnd.dece.audio' => ['uva', 'uvva'], + 'audio/vnd.digital-winds' => ['eol'], + 'audio/vnd.dra' => ['dra'], + 'audio/vnd.dts' => ['dts'], + 'audio/vnd.dts.hd' => ['dtshd'], + 'audio/vnd.lucent.voice' => ['lvp'], + 'audio/vnd.ms-playready.media.pya' => ['pya'], + 'audio/vnd.nuera.ecelp4800' => ['ecelp4800'], + 'audio/vnd.nuera.ecelp7470' => ['ecelp7470'], + 'audio/vnd.nuera.ecelp9600' => ['ecelp9600'], + 'audio/vnd.rip' => ['rip'], + 'audio/wav' => ['wav'], + 'audio/wave' => ['wav'], + 'audio/webm' => ['weba'], + 'audio/x-aac' => ['aac'], + 'audio/x-aiff' => ['aif', 'aiff', 'aifc'], + 'audio/x-caf' => ['caf'], + 'audio/x-flac' => ['flac'], + 'audio/x-m4a' => ['m4a'], + 'audio/x-matroska' => ['mka'], + 'audio/x-mpegurl' => ['m3u'], + 'audio/x-ms-wax' => ['wax'], + 'audio/x-ms-wma' => ['wma'], + 'audio/x-pn-realaudio' => ['ram', 'ra', 'rm'], + 'audio/x-pn-realaudio-plugin' => ['rmp', 'rpm'], + 'audio/x-realaudio' => ['ra'], + 'audio/x-wav' => ['wav'], + 'audio/xm' => ['xm'], + 'chemical/x-cdx' => ['cdx'], + 'chemical/x-cif' => ['cif'], + 'chemical/x-cmdf' => ['cmdf'], + 'chemical/x-cml' => ['cml'], + 'chemical/x-csml' => ['csml'], + 'chemical/x-xyz' => ['xyz'], + 'font/collection' => ['ttc'], + 'font/otf' => ['otf'], + 'font/ttf' => ['ttf'], + 'font/woff' => ['woff'], + 'font/woff2' => ['woff2'], + 'image/aces' => ['exr'], + 'image/apng' => ['apng'], + 'image/avci' => ['avci'], + 'image/avcs' => ['avcs'], + 'image/avif' => ['avif'], + 'image/bmp' => ['bmp', 'dib'], + 'image/cgm' => ['cgm'], + 'image/dicom-rle' => ['drle'], + 'image/dpx' => ['dpx'], + 'image/emf' => ['emf'], + 'image/fits' => ['fits'], + 'image/g3fax' => ['g3'], + 'image/gif' => ['gif'], + 'image/heic' => ['heic'], + 'image/heic-sequence' => ['heics'], + 'image/heif' => ['heif'], + 'image/heif-sequence' => ['heifs'], + 'image/hej2k' => ['hej2'], + 'image/hsj2' => ['hsj2'], + 'image/ief' => ['ief'], + 'image/jls' => ['jls'], + 'image/jp2' => ['jp2', 'jpg2'], + 'image/jpeg' => ['jpeg', 'jpg', 'jpe'], + 'image/jph' => ['jph'], + 'image/jphc' => ['jhc'], + 'image/jpm' => ['jpm', 'jpgm'], + 'image/jpx' => ['jpx', 'jpf'], + 'image/jxr' => ['jxr'], + 'image/jxra' => ['jxra'], + 'image/jxrs' => ['jxrs'], + 'image/jxs' => ['jxs'], + 'image/jxsc' => ['jxsc'], + 'image/jxsi' => ['jxsi'], + 'image/jxss' => ['jxss'], + 'image/ktx' => ['ktx'], + 'image/ktx2' => ['ktx2'], + 'image/png' => ['png'], + 'image/prs.btif' => ['btif', 'btf'], + 'image/prs.pti' => ['pti'], + 'image/sgi' => ['sgi'], + 'image/svg+xml' => ['svg', 'svgz'], + 'image/t38' => ['t38'], + 'image/tiff' => ['tif', 'tiff'], + 'image/tiff-fx' => ['tfx'], + 'image/vnd.adobe.photoshop' => ['psd'], + 'image/vnd.airzip.accelerator.azv' => ['azv'], + 'image/vnd.dece.graphic' => ['uvi', 'uvvi', 'uvg', 'uvvg'], + 'image/vnd.djvu' => ['djvu', 'djv'], + 'image/vnd.dvb.subtitle' => ['sub'], + 'image/vnd.dwg' => ['dwg'], + 'image/vnd.dxf' => ['dxf'], + 'image/vnd.fastbidsheet' => ['fbs'], + 'image/vnd.fpx' => ['fpx'], + 'image/vnd.fst' => ['fst'], + 'image/vnd.fujixerox.edmics-mmr' => ['mmr'], + 'image/vnd.fujixerox.edmics-rlc' => ['rlc'], + 'image/vnd.microsoft.icon' => ['ico'], + 'image/vnd.ms-dds' => ['dds'], + 'image/vnd.ms-modi' => ['mdi'], + 'image/vnd.ms-photo' => ['wdp'], + 'image/vnd.net-fpx' => ['npx'], + 'image/vnd.pco.b16' => ['b16'], + 'image/vnd.tencent.tap' => ['tap'], + 'image/vnd.valve.source.texture' => ['vtf'], + 'image/vnd.wap.wbmp' => ['wbmp'], + 'image/vnd.xiff' => ['xif'], + 'image/vnd.zbrush.pcx' => ['pcx'], + 'image/webp' => ['webp'], + 'image/wmf' => ['wmf'], + 'image/x-3ds' => ['3ds'], + 'image/x-cmu-raster' => ['ras'], + 'image/x-cmx' => ['cmx'], + 'image/x-freehand' => ['fh', 'fhc', 'fh4', 'fh5', 'fh7'], + 'image/x-icon' => ['ico'], + 'image/x-jng' => ['jng'], + 'image/x-mrsid-image' => ['sid'], + 'image/x-ms-bmp' => ['bmp'], + 'image/x-pcx' => ['pcx'], + 'image/x-pict' => ['pic', 'pct'], + 'image/x-portable-anymap' => ['pnm'], + 'image/x-portable-bitmap' => ['pbm'], + 'image/x-portable-graymap' => ['pgm'], + 'image/x-portable-pixmap' => ['ppm'], + 'image/x-rgb' => ['rgb'], + 'image/x-tga' => ['tga'], + 'image/x-xbitmap' => ['xbm'], + 'image/x-xpixmap' => ['xpm'], + 'image/x-xwindowdump' => ['xwd'], + 'message/disposition-notification' => ['disposition-notification'], + 'message/global' => ['u8msg'], + 'message/global-delivery-status' => ['u8dsn'], + 'message/global-disposition-notification' => ['u8mdn'], + 'message/global-headers' => ['u8hdr'], + 'message/rfc822' => ['eml', 'mime'], + 'message/vnd.wfa.wsc' => ['wsc'], + 'model/3mf' => ['3mf'], + 'model/gltf+json' => ['gltf'], + 'model/gltf-binary' => ['glb'], + 'model/iges' => ['igs', 'iges'], + 'model/jt' => ['jt'], + 'model/mesh' => ['msh', 'mesh', 'silo'], + 'model/mtl' => ['mtl'], + 'model/obj' => ['obj'], + 'model/prc' => ['prc'], + 'model/step+xml' => ['stpx'], + 'model/step+zip' => ['stpz'], + 'model/step-xml+zip' => ['stpxz'], + 'model/stl' => ['stl'], + 'model/u3d' => ['u3d'], + 'model/vnd.cld' => ['cld'], + 'model/vnd.collada+xml' => ['dae'], + 'model/vnd.dwf' => ['dwf'], + 'model/vnd.gdl' => ['gdl'], + 'model/vnd.gtw' => ['gtw'], + 'model/vnd.mts' => ['mts'], + 'model/vnd.opengex' => ['ogex'], + 'model/vnd.parasolid.transmit.binary' => ['x_b'], + 'model/vnd.parasolid.transmit.text' => ['x_t'], + 'model/vnd.pytha.pyox' => ['pyo', 'pyox'], + 'model/vnd.sap.vds' => ['vds'], + 'model/vnd.usda' => ['usda'], + 'model/vnd.usdz+zip' => ['usdz'], + 'model/vnd.valve.source.compiled-map' => ['bsp'], + 'model/vnd.vtu' => ['vtu'], + 'model/vrml' => ['wrl', 'vrml'], + 'model/x3d+binary' => ['x3db', 'x3dbz'], + 'model/x3d+fastinfoset' => ['x3db'], + 'model/x3d+vrml' => ['x3dv', 'x3dvz'], + 'model/x3d+xml' => ['x3d', 'x3dz'], + 'model/x3d-vrml' => ['x3dv'], + 'text/cache-manifest' => ['appcache', 'manifest'], + 'text/calendar' => ['ics', 'ifb'], + 'text/coffeescript' => ['coffee', 'litcoffee'], + 'text/css' => ['css'], + 'text/csv' => ['csv'], + 'text/html' => ['html', 'htm', 'shtml'], + 'text/jade' => ['jade'], + 'text/javascript' => ['js', 'mjs'], + 'text/jsx' => ['jsx'], + 'text/less' => ['less'], + 'text/markdown' => ['md', 'markdown'], + 'text/mathml' => ['mml'], + 'text/mdx' => ['mdx'], + 'text/n3' => ['n3'], + 'text/plain' => ['txt', 'text', 'conf', 'def', 'list', 'log', 'in', 'ini', 'm3u'], + 'text/prs.lines.tag' => ['dsc'], + 'text/richtext' => ['rtx'], + 'text/rtf' => ['rtf'], + 'text/sgml' => ['sgml', 'sgm'], + 'text/shex' => ['shex'], + 'text/slim' => ['slim', 'slm'], + 'text/spdx' => ['spdx'], + 'text/stylus' => ['stylus', 'styl'], + 'text/tab-separated-values' => ['tsv'], + 'text/troff' => ['t', 'tr', 'roff', 'man', 'me', 'ms'], + 'text/turtle' => ['ttl'], + 'text/uri-list' => ['uri', 'uris', 'urls'], + 'text/vcard' => ['vcard'], + 'text/vnd.curl' => ['curl'], + 'text/vnd.curl.dcurl' => ['dcurl'], + 'text/vnd.curl.mcurl' => ['mcurl'], + 'text/vnd.curl.scurl' => ['scurl'], + 'text/vnd.dvb.subtitle' => ['sub'], + 'text/vnd.familysearch.gedcom' => ['ged'], + 'text/vnd.fly' => ['fly'], + 'text/vnd.fmi.flexstor' => ['flx'], + 'text/vnd.graphviz' => ['gv'], + 'text/vnd.in3d.3dml' => ['3dml'], + 'text/vnd.in3d.spot' => ['spot'], + 'text/vnd.sun.j2me.app-descriptor' => ['jad'], + 'text/vnd.wap.wml' => ['wml'], + 'text/vnd.wap.wmlscript' => ['wmls'], + 'text/vtt' => ['vtt'], + 'text/wgsl' => ['wgsl'], + 'text/x-asm' => ['s', 'asm'], + 'text/x-c' => ['c', 'cc', 'cxx', 'cpp', 'h', 'hh', 'dic'], + 'text/x-component' => ['htc'], + 'text/x-fortran' => ['f', 'for', 'f77', 'f90'], + 'text/x-handlebars-template' => ['hbs'], + 'text/x-java-source' => ['java'], + 'text/x-lua' => ['lua'], + 'text/x-markdown' => ['mkd'], + 'text/x-nfo' => ['nfo'], + 'text/x-opml' => ['opml'], + 'text/x-org' => ['org'], + 'text/x-pascal' => ['p', 'pas'], + 'text/x-processing' => ['pde'], + 'text/x-sass' => ['sass'], + 'text/x-scss' => ['scss'], + 'text/x-setext' => ['etx'], + 'text/x-sfv' => ['sfv'], + 'text/x-suse-ymp' => ['ymp'], + 'text/x-uuencode' => ['uu'], + 'text/x-vcalendar' => ['vcs'], + 'text/x-vcard' => ['vcf'], + 'text/xml' => ['xml'], + 'text/yaml' => ['yaml', 'yml'], + 'video/3gpp' => ['3gp', '3gpp'], + 'video/3gpp2' => ['3g2'], + 'video/h261' => ['h261'], + 'video/h263' => ['h263'], + 'video/h264' => ['h264'], + 'video/iso.segment' => ['m4s'], + 'video/jpeg' => ['jpgv'], + 'video/jpm' => ['jpm', 'jpgm'], + 'video/mj2' => ['mj2', 'mjp2'], + 'video/mp2t' => ['ts'], + 'video/mp4' => ['mp4', 'mp4v', 'mpg4', 'f4v'], + 'video/mpeg' => ['mpeg', 'mpg', 'mpe', 'm1v', 'm2v'], + 'video/ogg' => ['ogv'], + 'video/quicktime' => ['qt', 'mov'], + 'video/vnd.dece.hd' => ['uvh', 'uvvh'], + 'video/vnd.dece.mobile' => ['uvm', 'uvvm'], + 'video/vnd.dece.pd' => ['uvp', 'uvvp'], + 'video/vnd.dece.sd' => ['uvs', 'uvvs'], + 'video/vnd.dece.video' => ['uvv', 'uvvv'], + 'video/vnd.dvb.file' => ['dvb'], + 'video/vnd.fvt' => ['fvt'], + 'video/vnd.mpegurl' => ['mxu', 'm4u'], + 'video/vnd.ms-playready.media.pyv' => ['pyv'], + 'video/vnd.uvvu.mp4' => ['uvu', 'uvvu'], + 'video/vnd.vivo' => ['viv'], + 'video/webm' => ['webm'], + 'video/x-f4v' => ['f4v'], + 'video/x-fli' => ['fli'], + 'video/x-flv' => ['flv'], + 'video/x-m4v' => ['m4v'], + 'video/x-matroska' => ['mkv', 'mk3d', 'mks'], + 'video/x-mng' => ['mng'], + 'video/x-ms-asf' => ['asf', 'asx'], + 'video/x-ms-vob' => ['vob'], + 'video/x-ms-wm' => ['wm'], + 'video/x-ms-wmv' => ['wmv'], + 'video/x-ms-wmx' => ['wmx'], + 'video/x-ms-wvx' => ['wvx'], + 'video/x-msvideo' => ['avi'], + 'video/x-sgi-movie' => ['movie'], + 'video/x-smv' => ['smv'], + 'x-conference/x-cooltalk' => ['ice'], + 'application/x-photoshop' => ['psd'], + 'application/smil' => ['smi', 'smil'], + 'application/powerpoint' => ['ppt'], + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => ['ppam'], + 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' => ['pptm', 'potm'], + 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => ['ppsm'], + 'application/wbxml' => ['wbxml'], + 'application/wmlc' => ['wmlc'], + 'application/x-httpd-php-source' => ['phps'], + 'application/x-compress' => ['z'], + 'application/x-rar' => ['rar'], + 'video/vnd.rn-realvideo' => ['rv'], + 'application/vnd.ms-word.template.macroEnabled.12' => ['docm', 'dotm'], + 'application/vnd.ms-excel.sheet.macroEnabled.12' => ['xlsm'], + 'application/vnd.ms-excel.template.macroEnabled.12' => ['xltm'], + 'application/vnd.ms-excel.addin.macroEnabled.12' => ['xlam'], + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => ['xlsb'], + 'application/excel' => ['xl'], + 'application/x-x509-user-cert' => ['pem'], + 'application/x-pkcs10' => ['p10'], + 'application/x-pkcs7-signature' => ['p7a'], + 'application/pgp' => ['pgp'], + 'application/gpg-keys' => ['gpg'], + 'application/x-pkcs7' => ['rsa'], + 'video/3gp' => ['3gp'], + 'audio/acc' => ['aac'], + 'application/vnd.mpegurl' => ['m4u'], + 'application/videolan' => ['vlc'], + 'audio/x-au' => ['au'], + 'audio/ac3' => ['ac3'], + 'text/x-scriptzsh' => ['zsh'], + 'application/cdr' => ['cdr'], + 'application/STEP' => ['step', 'stp'], + 'application/x-ndjson' => ['ndjson'], + 'application/braille' => ['brf'], + ]; + public function lookupMimeType(string $extension): ?string { return self::MIME_TYPES_FOR_EXTENSIONS[$extension] ?? null; } + + public function lookupExtension(string $mimetype): ?string + { + return self::EXTENSIONS_FOR_MIME_TIMES[$mimetype][0] ?? null; + } + + /** + * @return string[] + */ + public function lookupAllExtensions(string $mimetype): array + { + return self::EXTENSIONS_FOR_MIME_TIMES[$mimetype] ?? []; + } } diff --git a/vendor/mockery/mockery/.phpstorm.meta.php b/vendor/mockery/mockery/.phpstorm.meta.php index 6c53f80c..bb7acee5 100644 --- a/vendor/mockery/mockery/.phpstorm.meta.php +++ b/vendor/mockery/mockery/.phpstorm.meta.php @@ -2,10 +2,10 @@ namespace PHPSTORM_META; -override(\Mockery::mock(0), type(0)); -override(\Mockery::spy(0), type(0)); -override(\Mockery::namedMock(0), type(0)); -override(\Mockery::instanceMock(0), type(0)); -override(\mock(0), type(0)); -override(\spy(0), type(0)); -override(\namedMock(0), type(0)); \ No newline at end of file +override(\Mockery::mock(0), map(["" => "@"])); +override(\Mockery::spy(0), map(["" => "@"])); +override(\Mockery::namedMock(0), map(["" => "@"])); +override(\Mockery::instanceMock(0), map(["" => "@"])); +override(\mock(0), map(["" => "@"])); +override(\spy(0), map(["" => "@"])); +override(\namedMock(0), map(["" => "@"])); \ No newline at end of file diff --git a/vendor/mockery/mockery/CHANGELOG.md b/vendor/mockery/mockery/CHANGELOG.md index 4ab24266..2180be21 100644 --- a/vendor/mockery/mockery/CHANGELOG.md +++ b/vendor/mockery/mockery/CHANGELOG.md @@ -1,200 +1,419 @@ -# Change Log +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.6.12] - 2024-05-15 + +### Changed + +- [1420: Update `psalm-baseline.xml` ](https://github.com/mockery/mockery/pull/1420) +- [1419: Update e2e-test.sh](https://github.com/mockery/mockery/pull/1419) +- [1413: Upgrade `phar` tools and `phive.xml` configuration](https://github.com/mockery/mockery/pull/1413) + +### Fixed + +- [1415: Fix mocking anonymous classes](https://github.com/mockery/mockery/pull/1415) +- [1411: Mocking final classes reports unresolvable type by PHPStan](https://github.com/mockery/mockery/issues/1411) +- [1410: Fix PHP Doc Comments](https://github.com/mockery/mockery/pull/1410) + +### Security + +- [1417: Bump `Jinja2` from `3.1.3` to `3.1.4` fix CVE-2024-34064](https://github.com/mockery/mockery/pull/1417) +- [1412: Bump `idna` from `3.6` to `3.7` fix CVE-2024-3651](https://github.com/mockery/mockery/pull/1412) + +## [1.6.11] - 2024-03-21 + +### Fixed + +- [1407: Fix constants map generics doc comments](https://github.com/mockery/mockery/pull/1407) +- [1406: Fix reserved words used to name a class, interface or trait](https://github.com/mockery/mockery/pull/1406) +- [1403: Fix regression - partial construction with trait methods](https://github.com/mockery/mockery/pull/1403) +- [1401: Improve `Mockery::mock()` parameter type compatibility with array typehints](https://github.com/mockery/mockery/pull/1401) + +## [1.6.10] - 2024-03-19 + +### Added + +- [1398: [PHP 8.4] Fixes for implicit nullability deprecation](https://github.com/mockery/mockery/pull/1398) + +### Fixed + +- [1397: Fix mock method $args parameter type](https://github.com/mockery/mockery/pull/1397) +- [1396: Fix `1.6.8` release](https://github.com/mockery/mockery/pull/1396) + +## [1.6.9] - 2024-03-12 + +- [1394: Revert v1.6.8 release](https://github.com/mockery/mockery/pull/1394) + +## [1.6.8] - 2024-03-12 + +- [1393: Changelog v1.6.8](https://github.com/mockery/mockery/pull/1393) +- [1392: Refactor remaining codebase](https://github.com/mockery/mockery/pull/1392) +- [1391: Update actions to use Node 20](https://github.com/mockery/mockery/pull/1391) +- [1390: Update `ReadTheDocs` dependencies](https://github.com/mockery/mockery/pull/1390) +- [1389: Refactor `library/Mockery/Matcher/*`](https://github.com/mockery/mockery/pull/1389) +- [1388: Refactor `library/Mockery/Loader/*`](https://github.com/mockery/mockery/pull/1388) +- [1387: Refactor `library/Mockery/CountValidator/*`](https://github.com/mockery/mockery/pull/1387) +- [1386: Add PHPUnit 10+ attributes](https://github.com/mockery/mockery/pull/1386) +- [1385: Update composer dependencies and clean up](https://github.com/mockery/mockery/pull/1385) +- [1384: Update `psalm-baseline.xml`](https://github.com/mockery/mockery/pull/1384) +- [1383: Refactor `library/helpers.php`](https://github.com/mockery/mockery/pull/1383) +- [1382: Refactor `library/Mockery/VerificationExpectation.php`](https://github.com/mockery/mockery/pull/1382) +- [1381: Refactor `library/Mockery/VerificationDirector.php`](https://github.com/mockery/mockery/pull/1381) +- [1380: Refactor `library/Mockery/QuickDefinitionsConfiguration.php`](https://github.com/mockery/mockery/pull/1380) +- [1379: Refactor `library/Mockery/Undefined.php`](https://github.com/mockery/mockery/pull/1379) +- [1378: Refactor `library/Mockery/Reflector.php`](https://github.com/mockery/mockery/pull/1378) +- [1377: Refactor `library/Mockery/ReceivedMethodCalls.php`](https://github.com/mockery/mockery/pull/1377) +- [1376: Refactor `library/Mockery.php`](https://github.com/mockery/mockery/pull/1376) +- [1375: Refactor `library/Mockery/MockInterface.php`](https://github.com/mockery/mockery/pull/1375) +- [1374: Refactor `library/Mockery/MethodCall.php`](https://github.com/mockery/mockery/pull/1374) +- [1373: Refactor `library/Mockery/LegacyMockInterface.php`](https://github.com/mockery/mockery/pull/1373) +- [1372: Refactor `library/Mockery/Instantiator.php`](https://github.com/mockery/mockery/pull/1372) +- [1371: Refactor `library/Mockery/HigherOrderMessage.php`](https://github.com/mockery/mockery/pull/1371) +- [1370: Refactor `library/Mockery/ExpectsHigherOrderMessage.php`](https://github.com/mockery/mockery/pull/1370) +- [1369: Refactor `library/Mockery/ExpectationInterface.php`](https://github.com/mockery/mockery/pull/1369) +- [1368: Refactor `library/Mockery/ExpectationDirector.php`](https://github.com/mockery/mockery/pull/1368) +- [1367: Refactor `library/Mockery/Expectation.php`](https://github.com/mockery/mockery/pull/1367) +- [1366: Refactor `library/Mockery/Exception.php`](https://github.com/mockery/mockery/pull/1366) +- [1365: Refactor `library/Mockery/Container.php`](https://github.com/mockery/mockery/pull/1365) +- [1364: Refactor `library/Mockery/Configuration.php`](https://github.com/mockery/mockery/pull/1364) +- [1363: Refactor `library/Mockery/CompositeExpectation.php`](https://github.com/mockery/mockery/pull/1363) +- [1362: Refactor `library/Mockery/ClosureWrapper.php`](https://github.com/mockery/mockery/pull/1362) +- [1361: Refactor `library/Mockery.php`](https://github.com/mockery/mockery/pull/1361) +- [1360: Refactor Container](https://github.com/mockery/mockery/pull/1360) +- [1355: Fix the namespace in the SubsetTest class](https://github.com/mockery/mockery/pull/1355) +- [1354: Add array-like objects support to hasKey/hasValue matchers](https://github.com/mockery/mockery/pull/1354) + +## [1.6.7] - 2023-12-09 + +### Added + +- [#1338: Support PHPUnit constraints as matchers](https://github.com/mockery/mockery/pull/1338) +- [#1336: Add factory methods for `IsEqual` and `IsSame` matchers](https://github.com/mockery/mockery/pull/1336) + +### Fixed + +- [#1346: Fix test namespaces](https://github.com/mockery/mockery/pull/1346) +- [#1343: Update documentation default theme and build version](https://github.com/mockery/mockery/pull/1343) +- [#1329: Prevent `shouldNotReceive` from getting overridden by invocation count methods](https://github.com/mockery/mockery/pull/1329) + +### Changed + +- [#1351: Update psalm-baseline.xml](https://github.com/mockery/mockery/pull/1351) +- [#1350: Changelog v1.6.7](https://github.com/mockery/mockery/pull/1350) +- [#1349: Cleanup](https://github.com/mockery/mockery/pull/1349) +- [#1348: Update makefile](https://github.com/mockery/mockery/pull/1348) +- [#1347: Bump phars dependencies](https://github.com/mockery/mockery/pull/1347) +- [#1344: Disabled travis-ci and sensiolabs webhooks](https://github.com/mockery/mockery/issues/1344) +- [#1342: Add `.readthedocs.yml` configuration](https://github.com/mockery/mockery/pull/1342) +- [#1340: docs: Remove misplaced semicolumn from code snippet](https://github.com/mockery/mockery/pull/1340) + +## 1.6.6 (2023-08-08) + +- [#1327: Changelog v1.6.6](https://github.com/mockery/mockery/pull/1327) +- [#1325: Keep the file that caused an error for inspection](https://github.com/mockery/mockery/pull/1325) +- [#1324: Fix Regression - Replace `+` Array Union Operator with `array_merge`](https://github.com/mockery/mockery/pull/1324) + +## 1.6.5 (2023-08-05) + +- [#1322: Changelog v1.6.5](https://github.com/mockery/mockery/pull/1322) +- [#1321: Autoload Test Fixtures Based on PHP Runtime Version](https://github.com/mockery/mockery/pull/1321) +- [#1320: Clean up mocks on destruct](https://github.com/mockery/mockery/pull/1320) +- [#1318: Fix misspelling in docs](https://github.com/mockery/mockery/pull/1318) +- [#1316: Fix compatibility issues with PHP 7.3](https://github.com/mockery/mockery/pull/1316) +- [#1315: Fix PHP 7.3 issues](https://github.com/mockery/mockery/issues/1315) +- [#1314: Add Security Policy](https://github.com/mockery/mockery/pull/1314) +- [#1313: Type declaration for `iterable|object`.](https://github.com/mockery/mockery/pull/1313) +- [#1312: Mock disjunctive normal form types](https://github.com/mockery/mockery/pull/1312) +- [#1299: Test PHP `8.3` language features](https://github.com/mockery/mockery/pull/1299) + +## 1.6.4 (2023-07-19) + +- [#1308: Changelog v1.6.4](https://github.com/mockery/mockery/pull/1308) +- [#1307: Revert `src` to `library` for `1.6.x`](https://github.com/mockery/mockery/pull/1307) + +## 1.6.3 (2023-07-18) + +- [#1304: Remove `extra.branch-alias` and update composer information](https://github.com/mockery/mockery/pull/1304) +- [#1303: Update `.gitattributes`](https://github.com/mockery/mockery/pull/1303) +- [#1302: Changelog v1.6.3](https://github.com/mockery/mockery/pull/1302) +- [#1301: Fix mocking classes with `new` initializers in method and attribute params on PHP 8.1](https://github.com/mockery/mockery/pull/1301) +- [#1298: Update default repository branch to latest release branch](https://github.com/mockery/mockery/issues/1298) +- [#1297: Update `Makefile` for contributors](https://github.com/mockery/mockery/pull/1297) +- [#1294: Correct return types of Mock for phpstan](https://github.com/mockery/mockery/pull/1294) +- [#1290: Rename directory `library` to `src`](https://github.com/mockery/mockery/pull/1290) +- [#1288: Update codecov workflow](https://github.com/mockery/mockery/pull/1288) +- [#1287: Update psalm configuration and workflow](https://github.com/mockery/mockery/pull/1287) +- [#1286: Update phpunit workflow](https://github.com/mockery/mockery/pull/1286) +- [#1285: Enforce the minimum required PHP version](https://github.com/mockery/mockery/pull/1285) +- [#1283: Update license and copyright information](https://github.com/mockery/mockery/pull/1283) +- [#1282: Create `COPYRIGHT.md` file](https://github.com/mockery/mockery/pull/1282) +- [#1279: Bump `vimeo/psalm` from `5.9.0` to `5.12.0`](https://github.com/mockery/mockery/pull/1279) + +## 1.6.2 (2023-06-07) + +- [#1276: Add `IsEqual` Argument Matcher](https://github.com/mockery/mockery/pull/1276) +- [#1275: Add `IsSame` Argument Matcher](https://github.com/mockery/mockery/pull/1275) +- [#1274: Update composer branch alias](https://github.com/mockery/mockery/pull/1274) +- [#1271: Support PHP 8.2 `true` Literal Type](https://github.com/mockery/mockery/pull/1271) +- [#1270: Support PHP 8.0 `false` Literal Type](https://github.com/mockery/mockery/pull/1270) + +## 1.6.1 (2023-06-05) + +- [#1267 Drops support for PHP <7.4](https://github.com/mockery/mockery/pull/1267) +- [#1192 Updated changelog for version 1.5.1 to include changes from #1180](https://github.com/mockery/mockery/pull/1192) +- [#1196 Update example in README.md](https://github.com/mockery/mockery/pull/1196) +- [#1199 Fix function parameter default enum value](https://github.com/mockery/mockery/pull/1199) +- [#1205 Deal with null type in PHP8.2](https://github.com/mockery/mockery/pull/1205) +- [#1208 Import MockeryTestCase fully qualified class name](https://github.com/mockery/mockery/pull/1208) +- [#1210 Add support for target class attributes](https://github.com/mockery/mockery/pull/1210) +- [#1212 docs: Add missing comma](https://github.com/mockery/mockery/pull/1212) +- [#1216 Fixes code generation for intersection types](https://github.com/mockery/mockery/pull/1216) +- [#1217 Add MockeryExceptionInterface](https://github.com/mockery/mockery/pull/1217) +- [#1218 tidy: avoids require](https://github.com/mockery/mockery/pull/1218) +- [#1222 Add .editorconfig](https://github.com/mockery/mockery/pull/1222) +- [#1225 Switch to PSR-4 autoload](https://github.com/mockery/mockery/pull/1225) +- [#1226 Refactoring risky tests](https://github.com/mockery/mockery/pull/1226) +- [#1230 Add vimeo/psalm and psalm/plugin-phpunit](https://github.com/mockery/mockery/pull/1230) +- [#1232 Split PHPUnit TestSuites for PHP 8.2](https://github.com/mockery/mockery/pull/1232) +- [#1233 Bump actions/checkout to v3](https://github.com/mockery/mockery/pull/1233) +- [#1234 Bump nick-invision/retry to v2](https://github.com/mockery/mockery/pull/1234) +- [#1235 Setup Codecov for code coverage](https://github.com/mockery/mockery/pull/1235) +- [#1236 Add Psalm CI Check](https://github.com/mockery/mockery/pull/1236) +- [#1237 Unignore composer.lock file](https://github.com/mockery/mockery/pull/1237) +- [#1239 Prevent CI run duplication](https://github.com/mockery/mockery/pull/1239) +- [#1241 Add PHPUnit workflow for PHP 8.3](https://github.com/mockery/mockery/pull/1241) +- [#1244 Improve ClassAttributesPass for Dynamic Properties](https://github.com/mockery/mockery/pull/1244) +- [#1245 Deprecate hamcrest/hamcrest-php package](https://github.com/mockery/mockery/pull/1245) +- [#1246 Add BUG_REPORT.yml Issue template](https://github.com/mockery/mockery/pull/1246) +- [#1250 Deprecate PHP <=8.0](https://github.com/mockery/mockery/issues/1250) +- [#1253 Prevent array to string conversion when serialising a Subset matcher](https://github.com/mockery/mockery/issues/1253) + +## 1.6.0 (2023-06-05) [DELETED] + +This tag was deleted due to a mistake with the composer.json PHP version +constraint, see [#1266](https://github.com/mockery/mockery/issues/1266) + +## 1.3.6 (2022-09-07) + +- PHP 8.2 | Fix "Use of "parent" in callables is deprecated" notice #1169 + +## 1.5.1 (2022-09-07) + +- [PHP 8.2] Various tests: explicitly declare properties #1170 +- [PHP 8.2] Fix "Use of "parent" in callables is deprecated" notice #1169 +- [PHP 8.1] Support intersection types #1164 +- Handle final `__toString` methods #1162 +- Only count assertions on expectations which can fail a test #1180 ## 1.5.0 (2022-01-20) -* Override default call count expectations via expects() #1146 -* Mock methods with static return types #1157 -* Mock methods with mixed return type #1156 -* Mock classes with new in initializers on PHP 8.1 #1160 -* Removes redundant PHPUnitConstraint #1158 +- Override default call count expectations via expects() #1146 +- Mock methods with static return types #1157 +- Mock methods with mixed return type #1156 +- Mock classes with new in initializers on PHP 8.1 #1160 +- Removes redundant PHPUnitConstraint #1158 ## 1.4.4 (2021-09-13) -* Fixes auto-generated return values #1144 -* Adds support for tentative types #1130 -* Fixes for PHP 8.1 Support (#1130 and #1140) -* Add method that allows defining a set of arguments the mock should yield #1133 -* Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120 +- Fixes auto-generated return values #1144 +- Adds support for tentative types #1130 +- Fixes for PHP 8.1 Support (#1130 and #1140) +- Add method that allows defining a set of arguments the mock should yield #1133 +- Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120 + +## 1.3.5 (2021-09-13) + +- Fix auto-generated return values with union types #1143 +- Adds support for tentative types #1130 +- Fixes for PHP 8.1 Support (#1130 and #1140) +- Add method that allows defining a set of arguments the mock should yield #1133 +- Added option to configure default matchers for objects `\Mockery::getConfiguration()->setDefaultMatcher($class, $matcherClass)` #1120 ## 1.4.3 (2021-02-24) -* Fixes calls to fetchMock before initialisation #1113 -* Allow shouldIgnoreMissing() to behave in a recursive fashion #1097 -* Custom object formatters #766 (Needs Docs) -* Fix crash on a union type including null #1106 +- Fixes calls to fetchMock before initialisation #1113 +- Allow shouldIgnoreMissing() to behave in a recursive fashion #1097 +- Custom object formatters #766 (Needs Docs) +- Fix crash on a union type including null #1106 ## 1.3.4 (2021-02-24) -* Fixes calls to fetchMock before initialisation #1113 -* Fix crash on a union type including null #1106 +- Fixes calls to fetchMock before initialisation #1113 +- Fix crash on a union type including null #1106 ## 1.4.2 (2020-08-11) -* Fix array to string conversion in ConstantsPass (#1086) -* Fixed nullable PHP 8.0 union types (#1088, #1089) -* Fixed support for PHP 8.0 parent type (#1088, #1089) -* Fixed PHP 8.0 mixed type support (#1088, #1089) -* Fixed PHP 8.0 union return types (#1088, #1089) +- Fix array to string conversion in ConstantsPass (#1086) +- Fixed nullable PHP 8.0 union types (#1088, #1089) +- Fixed support for PHP 8.0 parent type (#1088, #1089) +- Fixed PHP 8.0 mixed type support (#1088, #1089) +- Fixed PHP 8.0 union return types (#1088, #1089) ## 1.4.1 (2020-07-09) -* Allow quick definitions to use 'at least once' expectation +- Allow quick definitions to use 'at least once' expectation `\Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce(true)` (#1056) -* Added provisional support for PHP 8.0 (#1068, #1072,#1079) -* Fix mocking methods with iterable return type without specifying a return value (#1075) +- Added provisional support for PHP 8.0 (#1068, #1072,#1079) +- Fix mocking methods with iterable return type without specifying a return value (#1075) ## 1.3.3 (2020-08-11) -* Fix array to string conversion in ConstantsPass (#1086) -* Fixed nullable PHP 8.0 union types (#1088) -* Fixed support for PHP 8.0 parent type (#1088) -* Fixed PHP 8.0 mixed type support (#1088) -* Fixed PHP 8.0 union return types (#1088) +- Fix array to string conversion in ConstantsPass (#1086) +- Fixed nullable PHP 8.0 union types (#1088) +- Fixed support for PHP 8.0 parent type (#1088) +- Fixed PHP 8.0 mixed type support (#1088) +- Fixed PHP 8.0 union return types (#1088) ## 1.3.2 (2020-07-09) -* Fix mocking with anonymous classes (#1039) -* Fix andAnyOthers() to properly match earlier expectations (#1051) -* Added provisional support for PHP 8.0 (#1068, #1072,#1079) -* Fix mocking methods with iterable return type without specifying a return value (#1075) +- Fix mocking with anonymous classes (#1039) +- Fix andAnyOthers() to properly match earlier expectations (#1051) +- Added provisional support for PHP 8.0 (#1068, #1072,#1079) +- Fix mocking methods with iterable return type without specifying a return value (#1075) ## 1.4.0 (2020-05-19) -* Fix mocking with anonymous classes (#1039) -* Fix andAnyOthers() to properly match earlier expectations (#1051) -* Drops support for PHP < 7.3 and PHPUnit < 8 (#1059) +- Fix mocking with anonymous classes (#1039) +- Fix andAnyOthers() to properly match earlier expectations (#1051) +- Drops support for PHP < 7.3 and PHPUnit < 8 (#1059) ## 1.3.1 (2019-12-26) -* Revert improved exception debugging due to BC breaks (#1032) +- Revert improved exception debugging due to BC breaks (#1032) ## 1.3.0 (2019-11-24) -* Added capture `Mockery::capture` convenience matcher (#1020) -* Added `andReturnArg` to echo back an argument passed to a an expectation (#992) -* Improved exception debugging (#1000) -* Fixed `andSet` to not reuse properties between mock objects (#1012) +- Added capture `Mockery::capture` convenience matcher (#1020) +- Added `andReturnArg` to echo back an argument passed to a an expectation (#992) +- Improved exception debugging (#1000) +- Fixed `andSet` to not reuse properties between mock objects (#1012) ## 1.2.4 (2019-09-30) -* Fix a bug introduced with previous release, for empty method definition lists (#1009) +- Fix a bug introduced with previous release, for empty method definition lists (#1009) ## 1.2.3 (2019-08-07) -* Allow mocking classes that have allows and expects methods (#868) -* Allow passing thru __call method in all mock types (experimental) (#969) -* Add support for `!` to blacklist methods (#959) -* Added `withSomeOfArgs` to partial match a list of args (#967) -* Fix chained demeter calls with type hint (#956) +- Allow mocking classes that have allows and expects methods (#868) +- Allow passing thru __call method in all mock types (experimental) (#969) +- Add support for `!` to blacklist methods (#959) +- Added `withSomeOfArgs` to partial match a list of args (#967) +- Fix chained demeter calls with type hint (#956) ## 1.2.2 (2019-02-13) -* Fix a BC breaking change for PHP 5.6/PHPUnit 5.7.27 (#947) +- Fix a BC breaking change for PHP 5.6/PHPUnit 5.7.27 (#947) ## 1.2.1 (2019-02-07) -* Support for PHPUnit 8 (#942) -* Allow mocking static methods called on instance (#938) +- Support for PHPUnit 8 (#942) +- Allow mocking static methods called on instance (#938) ## 1.2.0 (2018-10-02) -* Starts counting default expectations towards count (#910) -* Adds workaround for some HHVM return types (#909) -* Adds PhpStorm metadata support for autocomplete etc (#904) -* Further attempts to support multiple PHPUnit versions (#903) -* Allows setting constructor expectations on instance mocks (#900) -* Adds workaround for HHVM memoization decorator (#893) -* Adds experimental support for callable spys (#712) +- Starts counting default expectations towards count (#910) +- Adds workaround for some HHVM return types (#909) +- Adds PhpStorm metadata support for autocomplete etc (#904) +- Further attempts to support multiple PHPUnit versions (#903) +- Allows setting constructor expectations on instance mocks (#900) +- Adds workaround for HHVM memoization decorator (#893) +- Adds experimental support for callable spys (#712) ## 1.1.0 (2018-05-08) -* Allows use of string method names in allows and expects (#794) -* Finalises allows and expects syntax in API (#799) -* Search for handlers in a case instensitive way (#801) -* Deprecate allowMockingMethodsUnnecessarily (#808) -* Fix risky tests (#769) -* Fix namespace in TestListener (#812) -* Fixed conflicting mock names (#813) -* Clean elses (#819) -* Updated protected method mocking exception message (#826) -* Map of constants to mock (#829) -* Simplify foreach with `in_array` function (#830) -* Typehinted return value on Expectation#verify. (#832) -* Fix shouldNotHaveReceived with HigherOrderMessage (#842) -* Deprecates shouldDeferMissing (#839) -* Adds support for return type hints in Demeter chains (#848) -* Adds shouldNotReceive to composite expectation (#847) -* Fix internal error when using --static-backup (#845) -* Adds `andAnyOtherArgs` as an optional argument matcher (#860) -* Fixes namespace qualifying with namespaced named mocks (#872) -* Added possibility to add Constructor-Expections on hard dependencies, read: Mockery::mock('overload:...') (#781) +- Allows use of string method names in allows and expects (#794) +- Finalises allows and expects syntax in API (#799) +- Search for handlers in a case instensitive way (#801) +- Deprecate allowMockingMethodsUnnecessarily (#808) +- Fix risky tests (#769) +- Fix namespace in TestListener (#812) +- Fixed conflicting mock names (#813) +- Clean elses (#819) +- Updated protected method mocking exception message (#826) +- Map of constants to mock (#829) +- Simplify foreach with `in_array` function (#830) +- Typehinted return value on Expectation#verify. (#832) +- Fix shouldNotHaveReceived with HigherOrderMessage (#842) +- Deprecates shouldDeferMissing (#839) +- Adds support for return type hints in Demeter chains (#848) +- Adds shouldNotReceive to composite expectation (#847) +- Fix internal error when using --static-backup (#845) +- Adds `andAnyOtherArgs` as an optional argument matcher (#860) +- Fixes namespace qualifying with namespaced named mocks (#872) +- Added possibility to add Constructor-Expections on hard dependencies, read: Mockery::mock('overload:...') (#781) ## 1.0.0 (2017-09-06) -* Destructors (`__destruct`) are stubbed out where it makes sense -* Allow passing a closure argument to `withArgs()` to validate multiple arguments at once. -* `Mockery\Adapter\Phpunit\TestListener` has been rewritten because it +- Destructors (`__destruct`) are stubbed out where it makes sense +- Allow passing a closure argument to `withArgs()` to validate multiple arguments at once. +- `Mockery\Adapter\Phpunit\TestListener` has been rewritten because it incorrectly marked some tests as risky. It will no longer verify mock expectations but instead check that tests do that themselves. PHPUnit 6 is required if you want to use this fail safe. -* Removes SPL Class Loader -* Removed object recorder feature -* Bumped minimum PHP version to 5.6 -* `andThrow` will now throw anything `\Throwable` -* Adds `allows` and `expects` syntax -* Adds optional global helpers for `mock`, `namedMock` and `spy` -* Adds ability to create objects using traits -* `Mockery\Matcher\MustBe` was deprecated -* Marked `Mockery\MockInterface` as internal -* Subset matcher matches recursively -* BC BREAK - Spies return `null` by default from ignored (non-mocked) methods with nullable return type -* Removed extracting getter methods of object instances -* BC BREAK - Remove implicit regex matching when trying to match string arguments, introduce `\Mockery::pattern()` when regex matching is needed -* Fix Mockery not getting closed in cases of failing test cases -* Fix Mockery not setting properties on overloaded instance mocks -* BC BREAK - Fix Mockery not trying default expectations if there is any concrete expectation -* BC BREAK - Mockery's PHPUnit integration will mark a test as risky if it +- Removes SPL Class Loader +- Removed object recorder feature +- Bumped minimum PHP version to 5.6 +- `andThrow` will now throw anything `\Throwable` +- Adds `allows` and `expects` syntax +- Adds optional global helpers for `mock`, `namedMock` and `spy` +- Adds ability to create objects using traits +- `Mockery\Matcher\MustBe` was deprecated +- Marked `Mockery\MockInterface` as internal +- Subset matcher matches recursively +- BC BREAK - Spies return `null` by default from ignored (non-mocked) methods with nullable return type +- Removed extracting getter methods of object instances +- BC BREAK - Remove implicit regex matching when trying to match string arguments, introduce `\Mockery::pattern()` when regex matching is needed +- Fix Mockery not getting closed in cases of failing test cases +- Fix Mockery not setting properties on overloaded instance mocks +- BC BREAK - Fix Mockery not trying default expectations if there is any concrete expectation +- BC BREAK - Mockery's PHPUnit integration will mark a test as risky if it thinks one it's exceptions has been swallowed in PHPUnit > 5.7.6. Use `$e->dismiss()` to dismiss. ## 0.9.4 (XXXX-XX-XX) -* `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods` +- `shouldIgnoreMissing` will respect global `allowMockingNonExistentMethods` config -* Some support for variadic parameters -* Hamcrest is now a required dependency -* Instance mocks now respect `shouldIgnoreMissing` call on control instance -* This will be the *last version to support PHP 5.3* -* Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait -* Added `makePartial` to `Mockery\MockInterface` as it was missing +- Some support for variadic parameters +- Hamcrest is now a required dependency +- Instance mocks now respect `shouldIgnoreMissing` call on control instance +- This will be the *last version to support PHP 5.3* +- Added `Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration` trait +- Added `makePartial` to `Mockery\MockInterface` as it was missing ## 0.9.3 (2014-12-22) -* Added a basic spy implementation -* Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit +- Added a basic spy implementation +- Added `Mockery\Adapter\Phpunit\MockeryTestCase` for more reliable PHPUnit integration ## 0.9.2 (2014-09-03) -* Some workarounds for the serialisation problems created by changes to PHP in 5.5.13, 5.4.29, +- Some workarounds for the serialisation problems created by changes to PHP in 5.5.13, 5.4.29, 5.6. -* Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and +- Demeter chains attempt to reuse doubles as they see fit, so for foo->bar and foo->baz, we'll attempt to use the same foo ## 0.9.1 (2014-05-02) -* Allow specifying consecutive exceptions to be thrown with `andThrowExceptions` -* Allow specifying methods which can be mocked when using +- Allow specifying consecutive exceptions to be thrown with `andThrowExceptions` +- Allow specifying methods which can be mocked when using `Mockery\Configuration::allowMockingNonExistentMethods(false)` with `Mockery\MockInterface::shouldAllowMockingMethod($methodName)` -* Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()` -* `shouldIgnoreMissing` now takes an optional value that will be return instead +- Added andReturnSelf method: `$mock->shouldReceive("foo")->andReturnSelf()` +- `shouldIgnoreMissing` now takes an optional value that will be return instead of null, e.g. `$mock->shouldIgnoreMissing($mock)` ## 0.9.0 (2014-02-05) -* Allow mocking classes with final __wakeup() method -* Quick definitions are now always `byDefault` -* Allow mocking of protected methods with `shouldAllowMockingProtectedMethods` -* Support official Hamcrest package -* Generator completely rewritten -* Easily create named mocks with namedMock +- Allow mocking classes with final __wakeup() method +- Quick definitions are now always `byDefault` +- Allow mocking of protected methods with `shouldAllowMockingProtectedMethods` +- Support official Hamcrest package +- Generator completely rewritten +- Easily create named mocks with namedMock diff --git a/vendor/mockery/mockery/CONTRIBUTING.md b/vendor/mockery/mockery/CONTRIBUTING.md index b714f3f4..d828fb30 100644 --- a/vendor/mockery/mockery/CONTRIBUTING.md +++ b/vendor/mockery/mockery/CONTRIBUTING.md @@ -6,17 +6,15 @@ We'd love you to help out with mockery and no contribution is too small. ## Reporting Bugs -Issues can be reported on the [issue -tracker](https://github.com/padraic/mockery/issues). Please try and report any -bugs with a minimal reproducible example, it will make things easier for other +Issues can be reported on the [issue tracker](https://github.com/mockery/mockery/issues). +Please try and report any bugs with a minimal reproducible example, it will make things easier for other contributors and your problems will hopefully be resolved quickly. ## Requesting Features We're always interested to hear about your ideas and you can request features by -creating a ticket in the [issue -tracker](https://github.com/padraic/mockery/issues). We can't always guarantee +creating a ticket in the [issue tracker](https://github.com/mockery/mockery/issues). We can't always guarantee someone will jump on it straight away, but putting it out there to see if anyone else is interested is a good idea. @@ -33,24 +31,20 @@ and [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standards, but we'll probably merge any code that looks close enough. -* Fork the [repository](https://github.com/padraic/mockery) on GitHub +* Fork the [repository](https://github.com/mockery/mockery) on GitHub * Add the code for your feature or bug * Add some tests for your feature or bug * Optionally, but preferably, write some documentation * Optionally, update the CHANGELOG.md file with your feature or [BC](http://en.wikipedia.org/wiki/Backward_compatibility) break -* Send a [Pull - Request](https://help.github.com/articles/creating-a-pull-request) to the +* Send a [Pull Request](https://help.github.com/articles/creating-a-pull-request) to the correct target branch (see below) If you have a big change or would like to discuss something, create an issue in -the [issue tracker](https://github.com/padraic/mockery/issues) or jump in to -\#mockery on freenode +the [issue tracker](https://github.com/mockery/mockery/issues) or jump in to \#mockery on freenode -Any code you contribute must be licensed under the [BSD 3-Clause -License](http://opensource.org/licenses/BSD-3-Clause). - +Any code you contribute must be licensed under the [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause). ## Target Branch @@ -67,7 +61,7 @@ To run the unit tests for Mockery, clone the git repository, download Composer u the instructions at [http://getcomposer.org/download/](http://getcomposer.org/download/), then install the dependencies with `php /path/to/composer.phar install`. -This will install the required PHPUnit and Hamcrest dev dependencies and create the +This will install the required dev dependencies and create the autoload files required by the unit tests. You may run the `vendor/bin/phpunit` command to run the unit tests. If everything goes to plan, there will be no failed tests! diff --git a/vendor/mockery/mockery/LICENSE b/vendor/mockery/mockery/LICENSE index 2e127a65..1a9030ce 100644 --- a/vendor/mockery/mockery/LICENSE +++ b/vendor/mockery/mockery/LICENSE @@ -1,27 +1,29 @@ -Copyright (c) 2010, Pádraic Brady +BSD 3-Clause License + +Copyright (c) 2009-2023, Pádraic Brady All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - * The name of Pádraic Brady may not be used to endorse or promote - products derived from this software without specific prior written - permission. +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md index 55771dfb..26977342 100644 --- a/vendor/mockery/mockery/README.md +++ b/vendor/mockery/mockery/README.md @@ -2,6 +2,9 @@ Mockery ======= [![Build Status](https://github.com/mockery/mockery/actions/workflows/tests.yml/badge.svg)](https://github.com/mockery/mockery/actions) +[![Supported PHP Version](https://badgen.net/packagist/php/mockery/mockery?color=8892bf)](https://www.php.net/supported-versions) +[![Code Coverage](https://codecov.io/gh/mockery/mockery/branch/1.6.x/graph/badge.svg?token=oxHwVM56bT)](https://codecov.io/gh/mockery/mockery) +[![Type Coverage](https://shepherd.dev/github/mockery/mockery/coverage.svg)](https://shepherd.dev/github/mockery/mockery) [![Latest Stable Version](https://poser.pugx.org/mockery/mockery/v/stable.svg)](https://packagist.org/packages/mockery/mockery) [![Total Downloads](https://poser.pugx.org/mockery/mockery/downloads.svg)](https://packagist.org/packages/mockery/mockery) @@ -167,7 +170,7 @@ $double->expects()->add($book)->twice(); If you have used Mockery before, you might see something new in the example above — we created a method expectation using `expects`, instead of the "old" `shouldReceive` syntax. This is a new feature of Mockery v1, but same as with -`accepts` in the previous section, it can be written in the "old" style. +`allows` in the previous section, it can be written in the "old" style. For new users of Mockery, the above example can also be written as: diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json index 43caba8c..6f03cf2d 100644 --- a/vendor/mockery/mockery/composer.json +++ b/vendor/mockery/mockery/composer.json @@ -1,9 +1,8 @@ { "name": "mockery/mockery", "description": "Mockery is a simple yet flexible PHP mock object framework", - "scripts": { - "docs": "phpdoc -d library -t docs/api" - }, + "license": "BSD-3-Clause", + "type": "library", "keywords": [ "bdd", "library", @@ -16,47 +15,105 @@ "test double", "testing" ], - "homepage": "https://github.com/mockery/mockery", - "license": "BSD-3-Clause", "authors": [ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], + "homepage": "https://github.com/mockery/mockery", + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery", + "docs": "https://docs.mockery.io/", + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories" + }, "require": { - "php": "^7.3 || ^8.0", + "php": ">=7.3", "lib-pcre": ">=7.0", "hamcrest/hamcrest-php": "^2.0.1" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "conflict": { "phpunit/phpunit": "<8.0" }, "autoload": { - "psr-0": { - "Mockery": "library/" - } + "psr-4": { + "Mockery\\": "library/Mockery" + }, + "files": [ + "library/helpers.php", + "library/Mockery.php" + ] }, "autoload-dev": { "psr-4": { + "Fixture\\": "tests/Fixture/", + "Mockery\\Tests\\Unit\\": "tests/Unit", "test\\": "tests/" - } + }, + "files": [ + "fixtures/autoload.php", + "vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php" + ] }, "config": { - "preferred-install": "dist" + "optimize-autoloader": true, + "platform": { + "php": "7.3.999" + }, + "preferred-install": "dist", + "sort-packages": true }, - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } + "scripts": { + "check": [ + "@composer validate", + "@ecs", + "@test" + ], + "docs": "vendor/bin/phpdoc -d library -t docs/api", + "ecs": [ + "@ecs:fix", + "@ecs:check" + ], + "ecs:check": "ecs check --clear-cache || true", + "ecs:fix": "ecs check --clear-cache --fix", + "phive": [ + "tools/phive update --force-accept-unsigned", + "tools/phive purge" + ], + "phpunit": "vendor/bin/phpunit --do-not-cache-result --colors=always", + "phpunit:coverage": "@phpunit --coverage-clover=coverage.xml", + "psalm": "tools/psalm --no-cache --show-info=true", + "psalm:alter": "tools/psalm --no-cache --alter --allow-backwards-incompatible-changes=false --safe-types", + "psalm:baseline": "@psalm --no-diff --set-baseline=psalm-baseline.xml", + "psalm:dry-run": "@psalm:alter --issues=all --dry-run", + "psalm:fix": "@psalm:alter --issues=UnnecessaryVarAnnotation,MissingPureAnnotation,MissingImmutableAnnotation", + "psalm:security": "@psalm --no-diff --taint-analysis", + "psalm:shepherd": "@psalm --no-diff --shepherd --stats --output-format=github", + "test": [ + "@phpunit --stop-on-defect", + "@psalm", + "@psalm:security", + "@psalm:dry-run" + ] } } diff --git a/vendor/mockery/mockery/docs/conf.py b/vendor/mockery/mockery/docs/conf.py index 901f0405..d0f69600 100644 --- a/vendor/mockery/mockery/docs/conf.py +++ b/vendor/mockery/mockery/docs/conf.py @@ -30,6 +30,7 @@ import os # ones. extensions = [ 'sphinx.ext.todo', + 'sphinx_rtd_theme', ] # Add any paths that contain templates here, relative to this directory. @@ -53,9 +54,9 @@ copyright = u'Pádraic Brady, Dave Marshall and contributors' # built documents. # # The short X.Y version. -version = '1.0' +version = '1.6' # The full version, including alpha/beta/rc tags. -release = '1.0-alpha' +release = '1.6.x' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -100,7 +101,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -256,7 +257,7 @@ if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - print sphinx_rtd_theme.get_html_theme_path() + print(sphinx_rtd_theme.get_html_theme_path()) # load PhpLexer from sphinx.highlighting import lexers diff --git a/vendor/mockery/mockery/docs/getting_started/upgrading.rst b/vendor/mockery/mockery/docs/getting_started/upgrading.rst index 7201e597..8a17dfda 100644 --- a/vendor/mockery/mockery/docs/getting_started/upgrading.rst +++ b/vendor/mockery/mockery/docs/getting_started/upgrading.rst @@ -30,7 +30,7 @@ Read the documentation for a detailed overview of ":doc:`/reference/phpunit_inte +++++++++++++++++++++++++++++++++++++++++ As of 1.0.0 the ``\Mockery\Matcher\MustBe`` matcher is deprecated and will be removed in -Mockery 2.0.0. We recommend instead to use the PHPUnit or Hamcrest equivalents of the +Mockery 2.0.0. We recommend instead to use the PHPUnit equivalents of the MustBe matcher. ``allows`` and ``expects`` diff --git a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst index 6f8f8c3f..b675514b 100644 --- a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst +++ b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst @@ -419,7 +419,7 @@ additional modifier: \Mockery::mock('MyClass')->shouldIgnoreMissing()->asUndefined(); The returned object is nothing more than a placeholder so if, by some act of -fate, it's erroneously used somewhere it shouldn't it will likely not pass a +fate, it's erroneously used somewhere it shouldn't, it will likely not pass a logic check. We have encountered the ``makePartial()`` method before, as it is the method we diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst index 65cf2a23..4430e978 100644 --- a/vendor/mockery/mockery/docs/reference/expectations.rst +++ b/vendor/mockery/mockery/docs/reference/expectations.rst @@ -448,6 +448,34 @@ This is actually identical to using ``atLeast()->times($min)->atMost()->times($m but is provided as a shorthand. It may be followed by a ``times()`` call with no parameter to preserve the APIs natural language readability. +Multiple Calls with Different Expectations +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If a method is expected to get called multiple times with different arguments +and/or return values we can simply repeat the expectations. The same of course +also works if we expect multiple calls to different methods. + +.. code-block:: php + + $mock = \Mockery::mock('MyClass'); + // Expectations for the 1st call + $mock->shouldReceive('name_of_method') + ->once() + ->with('arg1') + ->andReturn($value1) + + // 2nd call to same method + ->shouldReceive('name_of_method') + ->once() + ->with('arg2') + ->andReturn($value2) + + // final call to another method + ->shouldReceive('other_method') + ->once() + ->with('other') + ->andReturn($value_other); + Expectation Declaration Utilities --------------------------------- diff --git a/vendor/mockery/mockery/docs/reference/index.rst b/vendor/mockery/mockery/docs/reference/index.rst index 1e5bf048..7d6a0389 100644 --- a/vendor/mockery/mockery/docs/reference/index.rst +++ b/vendor/mockery/mockery/docs/reference/index.rst @@ -9,6 +9,7 @@ Reference argument_validation alternative_should_receive_syntax spies + instance_mocking partial_mocks protected_methods public_properties diff --git a/vendor/mockery/mockery/docs/reference/spies.rst b/vendor/mockery/mockery/docs/reference/spies.rst index 77f37f3d..16639186 100644 --- a/vendor/mockery/mockery/docs/reference/spies.rst +++ b/vendor/mockery/mockery/docs/reference/spies.rst @@ -17,8 +17,8 @@ our tests more clear. Spies also allow us to follow the more familiar Arrange-Act-Assert or Given-When-Then style within our tests. With mocks, we have to follow a less familiar style, something along the lines of Arrange-Expect-Act-Assert, where -we have to tell our mocks what to expect before we act on the sut, then assert -that those expectations where met: +we have to tell our mocks what to expect before we act on the SUT, then assert +that those expectations were met: .. code-block:: php diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php index 95abd1b9..1370cea0 100644 --- a/vendor/mockery/mockery/library/Mockery.php +++ b/vendor/mockery/mockery/library/Mockery.php @@ -1,76 +1,125 @@ */ private static $_filesToCleanUp = []; /** - * Defines the global helper functions + * Return instance of AndAnyOtherArgs matcher. * - * @return void + * @return AndAnyOtherArgs */ - public static function globalHelpers() + public static function andAnyOtherArgs() { - require_once __DIR__ . '/helpers.php'; + return new AndAnyOtherArgs(); + } + + /** + * Return instance of AndAnyOtherArgs matcher. + * + * An alternative name to `andAnyOtherArgs` so + * the API stays closer to `any` as well. + * + * @return AndAnyOtherArgs + */ + public static function andAnyOthers() + { + return new AndAnyOtherArgs(); + } + + /** + * Return instance of ANY matcher. + * + * @return Any + */ + public static function any() + { + return new Any(); + } + + /** + * Return instance of ANYOF matcher. + * + * @template TAnyOf + * + * @param TAnyOf ...$args + * + * @return AnyOf + */ + public static function anyOf(...$args) + { + return new AnyOf($args); } /** @@ -80,105 +129,26 @@ class Mockery */ public static function builtInTypes() { - return array( - 'array', - 'bool', - 'callable', - 'float', - 'int', - 'iterable', - 'object', - 'self', - 'string', - 'void', - ); + return ['array', 'bool', 'callable', 'float', 'int', 'iterable', 'object', 'self', 'string', 'void']; } /** - * @param string $type - * @return bool + * Return instance of CLOSURE matcher. * - * @deprecated since 1.3.2 and will be removed in 2.0. + * @template TReference + * + * @param TReference $reference + * + * @return ClosureMatcher */ - public static function isBuiltInType($type) + public static function capture(&$reference) { - return in_array($type, \Mockery::builtInTypes()); - } + $closure = static function ($argument) use (&$reference) { + $reference = $argument; + return true; + }; - /** - * Static shortcut to \Mockery\Container::mock(). - * - * @param mixed ...$args - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public static function mock(...$args) - { - return call_user_func_array(array(self::getContainer(), 'mock'), $args); - } - - /** - * Static and semantic shortcut for getting a mock from the container - * and applying the spy's expected behavior into it. - * - * @param mixed ...$args - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public static function spy(...$args) - { - if (count($args) && $args[0] instanceof \Closure) { - $args[0] = new ClosureWrapper($args[0]); - } - - return call_user_func_array(array(self::getContainer(), 'mock'), $args)->shouldIgnoreMissing(); - } - - /** - * Static and Semantic shortcut to \Mockery\Container::mock(). - * - * @param mixed ...$args - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public static function instanceMock(...$args) - { - return call_user_func_array(array(self::getContainer(), 'mock'), $args); - } - - /** - * Static shortcut to \Mockery\Container::mock(), first argument names the mock. - * - * @param mixed ...$args - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public static function namedMock(...$args) - { - $name = array_shift($args); - - $builder = new MockConfigurationBuilder(); - $builder->setName($name); - - array_unshift($args, $builder); - - return call_user_func_array(array(self::getContainer(), 'mock'), $args); - } - - /** - * Static shortcut to \Mockery\Container::self(). - * - * @throws LogicException - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public static function self() - { - if (is_null(self::$_container)) { - throw new \LogicException('You have not declared any mocks yet'); - } - - return self::$_container->self(); + return new ClosureMatcher($closure); } /** @@ -190,27 +160,80 @@ class Mockery public static function close() { foreach (self::$_filesToCleanUp as $fileName) { - @unlink($fileName); + @\unlink($fileName); } + self::$_filesToCleanUp = []; - if (is_null(self::$_container)) { + if (self::$_container === null) { return; } $container = self::$_container; + self::$_container = null; $container->mockery_teardown(); + $container->mockery_close(); } + /** + * Return instance of CONTAINS matcher. + * + * @template TContains + * + * @param TContains $args + * + * @return Contains + */ + public static function contains(...$args) + { + return new Contains($args); + } + + /** + * @param class-string $fqn + * + * @return void + */ + public static function declareClass($fqn) + { + static::declareType($fqn, 'class'); + } + + /** + * @param class-string $fqn + * + * @return void + */ + public static function declareInterface($fqn) + { + static::declareType($fqn, 'interface'); + } + + /** + * Return instance of DUCKTYPE matcher. + * + * @template TDucktype + * + * @param TDucktype ...$args + * + * @return Ducktype + */ + public static function ducktype(...$args) + { + return new Ducktype($args); + } + /** * Static fetching of a mock associated with a name or explicit class poser. * - * @param string $name + * @template TFetchMock of object * - * @return \Mockery\Mock + * @param class-string $name + * + * @return null|(LegacyMockInterface&MockInterface&TFetchMock) */ public static function fetchMock($name) { @@ -218,45 +241,89 @@ class Mockery } /** - * Lazy loader and getter for - * the container property. + * Utility method to format method name and arguments into a string. * - * @return Mockery\Container + * @param string $method + * + * @return string + */ + public static function formatArgs($method, ?array $arguments = null) + { + if ($arguments === null) { + return $method . '()'; + } + + $formattedArguments = []; + foreach ($arguments as $argument) { + $formattedArguments[] = self::formatArgument($argument); + } + + return $method . '(' . \implode(', ', $formattedArguments) . ')'; + } + + /** + * Utility function to format objects to printable arrays. + * + * @return string + */ + public static function formatObjects(?array $objects = null) + { + static $formatting; + + if ($formatting) { + return '[Recursion]'; + } + + if ($objects === null) { + return ''; + } + + $objects = \array_filter($objects, 'is_object'); + if ($objects === []) { + return ''; + } + + $formatting = true; + $parts = []; + + foreach ($objects as $object) { + $parts[\get_class($object)] = self::objectToArray($object); + } + + $formatting = false; + + return 'Objects: ( ' . \var_export($parts, true) . ')'; + } + + /** + * Lazy loader and Getter for the global + * configuration container. + * + * @return Configuration + */ + public static function getConfiguration() + { + if (self::$_config === null) { + self::$_config = new Configuration(); + } + + return self::$_config; + } + + /** + * Lazy loader and getter for the container property. + * + * @return Container */ public static function getContainer() { - if (is_null(self::$_container)) { - self::$_container = new Mockery\Container(self::getGenerator(), self::getLoader()); + if (self::$_container === null) { + self::$_container = new Container(self::getGenerator(), self::getLoader()); } return self::$_container; } - /** - * Setter for the $_generator static property. - * - * @param \Mockery\Generator\Generator $generator - */ - public static function setGenerator(Generator $generator) - { - self::$_generator = $generator; - } - - /** - * Lazy loader method and getter for - * the generator property. - * - * @return Generator - */ - public static function getGenerator() - { - if (is_null(self::$_generator)) { - self::$_generator = self::getDefaultGenerator(); - } - - return self::$_generator; - } - /** * Creates and returns a default generator * used inside this class. @@ -268,31 +335,6 @@ class Mockery return new CachingGenerator(StringManipulationGenerator::withDefaultPasses()); } - /** - * Setter for the $_loader static property. - * - * @param Loader $loader - */ - public static function setLoader(Loader $loader) - { - self::$_loader = $loader; - } - - /** - * Lazy loader method and getter for - * the $_loader property. - * - * @return Loader - */ - public static function getLoader() - { - if (is_null(self::$_loader)) { - self::$_loader = self::getDefaultLoader(); - } - - return self::$_loader; - } - /** * Gets an EvalLoader to be used as default. * @@ -304,15 +346,268 @@ class Mockery } /** - * Set the container. + * Lazy loader method and getter for + * the generator property. * - * @param \Mockery\Container $container - * - * @return \Mockery\Container + * @return Generator */ - public static function setContainer(Mockery\Container $container) + public static function getGenerator() { - return self::$_container = $container; + if (self::$_generator === null) { + self::$_generator = self::getDefaultGenerator(); + } + + return self::$_generator; + } + + /** + * Lazy loader method and getter for + * the $_loader property. + * + * @return Loader + */ + public static function getLoader() + { + if (self::$_loader === null) { + self::$_loader = self::getDefaultLoader(); + } + + return self::$_loader; + } + + /** + * Defines the global helper functions + * + * @return void + */ + public static function globalHelpers() + { + require_once __DIR__ . '/helpers.php'; + } + + /** + * Return instance of HASKEY matcher. + * + * @template THasKey + * + * @param THasKey $key + * + * @return HasKey + */ + public static function hasKey($key) + { + return new HasKey($key); + } + + /** + * Return instance of HASVALUE matcher. + * + * @template THasValue + * + * @param THasValue $val + * + * @return HasValue + */ + public static function hasValue($val) + { + return new HasValue($val); + } + + /** + * Static and Semantic shortcut to Container::mock(). + * + * @template TInstanceMock + * + * @param array|TInstanceMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TInstanceMock + */ + public static function instanceMock(...$args) + { + return self::getContainer()->mock(...$args); + } + + /** + * @param string $type + * + * @return bool + * + * @deprecated since 1.3.2 and will be removed in 2.0. + */ + public static function isBuiltInType($type) + { + return \in_array($type, self::builtInTypes(), true); + } + + /** + * Return instance of IsEqual matcher. + * + * @template TExpected + * + * @param TExpected $expected + */ + public static function isEqual($expected): IsEqual + { + return new IsEqual($expected); + } + + /** + * Return instance of IsSame matcher. + * + * @template TExpected + * + * @param TExpected $expected + */ + public static function isSame($expected): IsSame + { + return new IsSame($expected); + } + + /** + * Static shortcut to Container::mock(). + * + * @template TMock of object + * + * @param array|TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TMock + */ + public static function mock(...$args) + { + return self::getContainer()->mock(...$args); + } + + /** + * Return instance of MUSTBE matcher. + * + * @template TExpected + * + * @param TExpected $expected + * + * @return MustBe + */ + public static function mustBe($expected) + { + return new MustBe($expected); + } + + /** + * Static shortcut to Container::mock(), first argument names the mock. + * + * @template TNamedMock + * + * @param array|TNamedMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TNamedMock + */ + public static function namedMock(...$args) + { + $name = \array_shift($args); + + $builder = new MockConfigurationBuilder(); + $builder->setName($name); + + \array_unshift($args, $builder); + + return self::getContainer()->mock(...$args); + } + + /** + * Return instance of NOT matcher. + * + * @template TNotExpected + * + * @param TNotExpected $expected + * + * @return Not + */ + public static function not($expected) + { + return new Not($expected); + } + + /** + * Return instance of NOTANYOF matcher. + * + * @template TNotAnyOf + * + * @param TNotAnyOf ...$args + * + * @return NotAnyOf + */ + public static function notAnyOf(...$args) + { + return new NotAnyOf($args); + } + + /** + * Return instance of CLOSURE matcher. + * + * @template TClosure of Closure + * + * @param TClosure $closure + * + * @return ClosureMatcher + */ + public static function on($closure) + { + return new ClosureMatcher($closure); + } + + /** + * Utility function to parse shouldReceive() arguments and generate + * expectations from such as needed. + * + * @template TReturnArgs + * + * @param TReturnArgs ...$args + * @param Closure $add + * + * @return CompositeExpectation + */ + public static function parseShouldReturnArgs(LegacyMockInterface $mock, $args, $add) + { + $composite = new CompositeExpectation(); + + foreach ($args as $arg) { + if (\is_string($arg)) { + $composite->add(self::buildDemeterChain($mock, $arg, $add)); + + continue; + } + + if (\is_array($arg)) { + foreach ($arg as $k => $v) { + $composite->add(self::buildDemeterChain($mock, $k, $add)->andReturn($v)); + } + } + } + + return $composite; + } + + /** + * Return instance of PATTERN matcher. + * + * @template TPatter + * + * @param TPatter $expected + * + * @return Pattern + */ + public static function pattern($expected) + { + return new Pattern($expected); + } + + /** + * Register a file to be deleted on tearDown. + * + * @param string $fileName + */ + public static function registerFileForCleanUp($fileName) + { + self::$_filesToCleanUp[] = $fileName; } /** @@ -326,380 +621,271 @@ class Mockery } /** - * Return instance of ANY matcher. + * Static shortcut to Container::self(). * - * @return \Mockery\Matcher\Any + * @throws LogicException + * + * @return LegacyMockInterface|MockInterface */ - public static function any() + public static function self() { - return new \Mockery\Matcher\Any(); + if (self::$_container === null) { + throw new LogicException('You have not declared any mocks yet'); + } + + return self::$_container->self(); } /** - * Return instance of AndAnyOtherArgs matcher. + * Set the container. * - * An alternative name to `andAnyOtherArgs` so - * the API stays closer to `any` as well. - * - * @return \Mockery\Matcher\AndAnyOtherArgs + * @return Container */ - public static function andAnyOthers() + public static function setContainer(Container $container) { - return new \Mockery\Matcher\AndAnyOtherArgs(); + return self::$_container = $container; } /** - * Return instance of AndAnyOtherArgs matcher. - * - * @return \Mockery\Matcher\AndAnyOtherArgs + * Setter for the $_generator static property. */ - public static function andAnyOtherArgs() + public static function setGenerator(Generator $generator) { - return new \Mockery\Matcher\AndAnyOtherArgs(); + self::$_generator = $generator; } /** - * Return instance of TYPE matcher. - * - * @param mixed $expected - * - * @return \Mockery\Matcher\Type + * Setter for the $_loader static property. */ - public static function type($expected) + public static function setLoader(Loader $loader) { - return new \Mockery\Matcher\Type($expected); + self::$_loader = $loader; } /** - * Return instance of DUCKTYPE matcher. + * Static and semantic shortcut for getting a mock from the container + * and applying the spy's expected behavior into it. * - * @param array ...$args + * @template TSpy * - * @return \Mockery\Matcher\Ducktype + * @param array|TSpy|Closure(LegacyMockInterface&MockInterface&TSpy):LegacyMockInterface&MockInterface&TSpy|array> $args + * + * @return LegacyMockInterface&MockInterface&TSpy */ - public static function ducktype(...$args) + public static function spy(...$args) { - return new \Mockery\Matcher\Ducktype($args); + if ($args !== [] && $args[0] instanceof Closure) { + $args[0] = new ClosureWrapper($args[0]); + } + + return self::getContainer()->mock(...$args)->shouldIgnoreMissing(); } /** * Return instance of SUBSET matcher. * - * @param array $part * @param bool $strict - (Optional) True for strict comparison, false for loose * - * @return \Mockery\Matcher\Subset + * @return Subset */ public static function subset(array $part, $strict = true) { - return new \Mockery\Matcher\Subset($part, $strict); + return new Subset($part, $strict); } /** - * Return instance of CONTAINS matcher. + * Return instance of TYPE matcher. * - * @param mixed $args + * @template TExpectedType * - * @return \Mockery\Matcher\Contains + * @param TExpectedType $expected + * + * @return Type */ - public static function contains(...$args) + public static function type($expected) { - return new \Mockery\Matcher\Contains($args); + return new Type($expected); } /** - * Return instance of HASKEY matcher. + * Sets up expectations on the members of the CompositeExpectation and + * builds up any demeter chain that was passed to shouldReceive. * - * @param mixed $key + * @param string $arg + * @param Closure $add * - * @return \Mockery\Matcher\HasKey + * @throws MockeryException + * + * @return ExpectationInterface */ - public static function hasKey($key) + protected static function buildDemeterChain(LegacyMockInterface $mock, $arg, $add) { - return new \Mockery\Matcher\HasKey($key); - } + $container = $mock->mockery_getContainer(); + $methodNames = \explode('->', $arg); - /** - * Return instance of HASVALUE matcher. - * - * @param mixed $val - * - * @return \Mockery\Matcher\HasValue - */ - public static function hasValue($val) - { - return new \Mockery\Matcher\HasValue($val); - } + \reset($methodNames); - /** - * Return instance of CLOSURE matcher. - * - * @param $reference - * - * @return \Mockery\Matcher\Closure - */ - public static function capture(&$reference) - { - $closure = function ($argument) use (&$reference) { - $reference = $argument; - return true; + if ( + ! $mock->mockery_isAnonymous() + && ! self::getConfiguration()->mockingNonExistentMethodsAllowed() + && ! \in_array(\current($methodNames), $mock->mockery_getMockableMethods(), true) + ) { + throw new MockeryException( + "Mockery's configuration currently forbids mocking the method " + . \current($methodNames) . ' as it does not exist on the class or object ' + . 'being mocked' + ); + } + + /** @var Closure $nextExp */ + $nextExp = static function ($method) use ($add) { + return $add($method); }; - return new \Mockery\Matcher\Closure($closure); - } + $parent = \get_class($mock); - /** - * Return instance of CLOSURE matcher. - * - * @param mixed $closure - * - * @return \Mockery\Matcher\Closure - */ - public static function on($closure) - { - return new \Mockery\Matcher\Closure($closure); - } + /** @var null|ExpectationInterface $expectations */ + $expectations = null; + while (true) { + $method = \array_shift($methodNames); + $expectations = $mock->mockery_getExpectationsFor($method); - /** - * Return instance of MUSTBE matcher. - * - * @param mixed $expected - * - * @return \Mockery\Matcher\MustBe - */ - public static function mustBe($expected) - { - return new \Mockery\Matcher\MustBe($expected); - } + if ($expectations === null || self::noMoreElementsInChain($methodNames)) { + $expectations = $nextExp($method); + if (self::noMoreElementsInChain($methodNames)) { + break; + } - /** - * Return instance of NOT matcher. - * - * @param mixed $expected - * - * @return \Mockery\Matcher\Not - */ - public static function not($expected) - { - return new \Mockery\Matcher\Not($expected); - } + $mock = self::getNewDemeterMock($container, $parent, $method, $expectations); + } else { + $demeterMockKey = $container->getKeyOfDemeterMockFor($method, $parent); + if ($demeterMockKey !== null) { + $mock = self::getExistingDemeterMock($container, $demeterMockKey); + } + } - /** - * Return instance of ANYOF matcher. - * - * @param array ...$args - * - * @return \Mockery\Matcher\AnyOf - */ - public static function anyOf(...$args) - { - return new \Mockery\Matcher\AnyOf($args); - } + $parent .= '->' . $method; - /** - * Return instance of NOTANYOF matcher. - * - * @param array ...$args - * - * @return \Mockery\Matcher\NotAnyOf - */ - public static function notAnyOf(...$args) - { - return new \Mockery\Matcher\NotAnyOf($args); - } - - /** - * Return instance of PATTERN matcher. - * - * @param mixed $expected - * - * @return \Mockery\Matcher\Pattern - */ - public static function pattern($expected) - { - return new \Mockery\Matcher\Pattern($expected); - } - - /** - * Lazy loader and Getter for the global - * configuration container. - * - * @return \Mockery\Configuration - */ - public static function getConfiguration() - { - if (is_null(self::$_config)) { - self::$_config = new \Mockery\Configuration(); + $nextExp = static function ($n) use ($mock) { + return $mock->allows($n); + }; } - return self::$_config; + return $expectations; } /** - * Utility method to format method name and arguments into a string. + * Utility method for recursively generating a representation of the given array. * - * @param string $method - * @param array $arguments + * @template TArray or array * - * @return string + * @param TArray $argument + * @param int $nesting + * + * @return TArray */ - public static function formatArgs($method, array $arguments = null) + private static function cleanupArray($argument, $nesting = 3) { - if (is_null($arguments)) { - return $method . '()'; + if ($nesting === 0) { + return '...'; } - $formattedArguments = array(); - foreach ($arguments as $argument) { - $formattedArguments[] = self::formatArgument($argument); + foreach ($argument as $key => $value) { + if (\is_array($value)) { + $argument[$key] = self::cleanupArray($value, $nesting - 1); + + continue; + } + + if (\is_object($value)) { + $argument[$key] = self::objectToArray($value, $nesting - 1); + } } - return $method . '(' . implode(', ', $formattedArguments) . ')'; + return $argument; } /** - * Gets the string representation - * of any passed argument. + * Utility method used for recursively generating + * an object or array representation. * - * @param mixed $argument - * @param int $depth + * @template TArgument + * + * @param TArgument $argument + * @param int $nesting * * @return mixed */ - private static function formatArgument($argument, $depth = 0) + private static function cleanupNesting($argument, $nesting) { - if ($argument instanceof MatcherAbstract) { - return (string) $argument; + if (\is_object($argument)) { + $object = self::objectToArray($argument, $nesting - 1); + $object['class'] = \get_class($argument); + + return $object; } - if (is_object($argument)) { - return 'object(' . get_class($argument) . ')'; + if (\is_array($argument)) { + return self::cleanupArray($argument, $nesting - 1); } - if (is_int($argument) || is_float($argument)) { - return $argument; - } - - if (is_array($argument)) { - if ($depth === 1) { - $argument = '[...]'; - } else { - $sample = array(); - foreach ($argument as $key => $value) { - $key = is_int($key) ? $key : "'$key'"; - $value = self::formatArgument($value, $depth + 1); - $sample[] = "$key => $value"; - } - - $argument = "[" . implode(", ", $sample) . "]"; - } - - return ((strlen($argument) > 1000) ? substr($argument, 0, 1000) . '...]' : $argument); - } - - if (is_bool($argument)) { - return $argument ? 'true' : 'false'; - } - - if (is_resource($argument)) { - return 'resource(...)'; - } - - if (is_null($argument)) { - return 'NULL'; - } - - return "'" . (string) $argument . "'"; + return $argument; } /** - * Utility function to format objects to printable arrays. - * - * @param array $objects - * - * @return string + * @param string $fqn + * @param string $type */ - public static function formatObjects(array $objects = null) + private static function declareType($fqn, $type): void { - static $formatting; + $targetCode = ' self::extractInstancePublicProperties($object, $nesting)); - }; - - $class = get_class($object); - - $formatter = self::getConfiguration()->getObjectFormatter($class, $defaultFormatter); - - $array = array( - 'class' => $class, - 'identity' => '#' . md5(spl_object_hash($object)) - ); - - $array = array_merge($array, $formatter($object, $nesting)); - - return $array; + self::registerFileForCleanUp($fileName); } /** * Returns all public instance properties. * - * @param mixed $object - * @param int $nesting + * @param object $object + * @param int $nesting * - * @return array + * @return array */ private static function extractInstancePublicProperties($object, $nesting) { - $reflection = new \ReflectionClass(get_class($object)); - $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); - $cleanedProperties = array(); + $reflection = new ReflectionClass($object); + $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC); + $cleanedProperties = []; foreach ($properties as $publicProperty) { - if (!$publicProperty->isStatic()) { + if (! $publicProperty->isStatic()) { $name = $publicProperty->getName(); try { - $cleanedProperties[$name] = self::cleanupNesting($object->$name, $nesting); - } catch (\Exception $exception) { + $cleanedProperties[$name] = self::cleanupNesting($object->{$name}, $nesting); + } catch (Exception $exception) { $cleanedProperties[$name] = $exception->getMessage(); } } @@ -709,190 +895,119 @@ class Mockery } /** - * Utility method used for recursively generating - * an object or array representation. + * Gets the string representation + * of any passed argument. * * @param mixed $argument - * @param int $nesting + * @param int $depth * * @return mixed */ - private static function cleanupNesting($argument, $nesting) + private static function formatArgument($argument, $depth = 0) { - if (is_object($argument)) { - $object = self::objectToArray($argument, $nesting - 1); - $object['class'] = get_class($argument); - - return $object; + if ($argument instanceof MatcherInterface) { + return (string) $argument; } - if (is_array($argument)) { - return self::cleanupArray($argument, $nesting - 1); + if (\is_object($argument)) { + return 'object(' . \get_class($argument) . ')'; } - return $argument; - } - - /** - * Utility method for recursively - * gerating a representation - * of the given array. - * - * @param array $argument - * @param int $nesting - * - * @return mixed - */ - private static function cleanupArray($argument, $nesting = 3) - { - if ($nesting == 0) { - return '...'; + if (\is_int($argument) || \is_float($argument)) { + return $argument; } - foreach ($argument as $key => $value) { - if (is_array($value)) { - $argument[$key] = self::cleanupArray($value, $nesting - 1); - } elseif (is_object($value)) { - $argument[$key] = self::objectToArray($value, $nesting - 1); - } - } - - return $argument; - } - - /** - * Utility function to parse shouldReceive() arguments and generate - * expectations from such as needed. - * - * @param Mockery\LegacyMockInterface $mock - * @param array ...$args - * @param callable $add - * @return \Mockery\CompositeExpectation - */ - public static function parseShouldReturnArgs(\Mockery\LegacyMockInterface $mock, $args, $add) - { - $composite = new \Mockery\CompositeExpectation(); - - foreach ($args as $arg) { - if (is_array($arg)) { - foreach ($arg as $k => $v) { - $expectation = self::buildDemeterChain($mock, $k, $add)->andReturn($v); - $composite->add($expectation); - } - } elseif (is_string($arg)) { - $expectation = self::buildDemeterChain($mock, $arg, $add); - $composite->add($expectation); - } - } - - return $composite; - } - - /** - * Sets up expectations on the members of the CompositeExpectation and - * builds up any demeter chain that was passed to shouldReceive. - * - * @param \Mockery\LegacyMockInterface $mock - * @param string $arg - * @param callable $add - * @throws Mockery\Exception - * @return \Mockery\ExpectationInterface - */ - protected static function buildDemeterChain(\Mockery\LegacyMockInterface $mock, $arg, $add) - { - /** @var Mockery\Container $container */ - $container = $mock->mockery_getContainer(); - $methodNames = explode('->', $arg); - reset($methodNames); - - if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() - && !$mock->mockery_isAnonymous() - && !in_array(current($methodNames), $mock->mockery_getMockableMethods()) - ) { - throw new \Mockery\Exception( - 'Mockery\'s configuration currently forbids mocking the method ' - . current($methodNames) . ' as it does not exist on the class or object ' - . 'being mocked' - ); - } - - /** @var ExpectationInterface|null $expectations */ - $expectations = null; - - /** @var Callable $nextExp */ - $nextExp = function ($method) use ($add) { - return $add($method); - }; - - $parent = get_class($mock); - - while (true) { - $method = array_shift($methodNames); - $expectations = $mock->mockery_getExpectationsFor($method); - - if (is_null($expectations) || self::noMoreElementsInChain($methodNames)) { - $expectations = $nextExp($method); - if (self::noMoreElementsInChain($methodNames)) { - break; - } - - $mock = self::getNewDemeterMock($container, $parent, $method, $expectations); + if (\is_array($argument)) { + if ($depth === 1) { + $argument = '[...]'; } else { - $demeterMockKey = $container->getKeyOfDemeterMockFor($method, $parent); - if ($demeterMockKey) { - $mock = self::getExistingDemeterMock($container, $demeterMockKey); + $sample = []; + foreach ($argument as $key => $value) { + $key = \is_int($key) ? $key : \sprintf("'%s'", $key); + $value = self::formatArgument($value, $depth + 1); + $sample[] = \sprintf('%s => %s', $key, $value); } + + $argument = '[' . \implode(', ', $sample) . ']'; } - $parent .= '->' . $method; - - $nextExp = function ($n) use ($mock) { - return $mock->shouldReceive($n); - }; + return (\strlen($argument) > 1000) ? \substr($argument, 0, 1000) . '...]' : $argument; } - return $expectations; + if (\is_bool($argument)) { + return $argument ? 'true' : 'false'; + } + + if (\is_resource($argument)) { + return 'resource(...)'; + } + + if ($argument === null) { + return 'NULL'; + } + + return "'" . $argument . "'"; + } + + /** + * Gets a specific demeter mock from the ones kept by the container. + * + * @template TMock of object + * + * @param class-string $demeterMockKey + * + * @return null|(LegacyMockInterface&MockInterface&TMock) + */ + private static function getExistingDemeterMock(Container $container, $demeterMockKey) + { + return $container->getMocks()[$demeterMockKey] ?? null; } /** * Gets a new demeter configured * mock from the container. * - * @param \Mockery\Container $container * @param string $parent * @param string $method - * @param Mockery\ExpectationInterface $exp * - * @return \Mockery\Mock + * @return LegacyMockInterface&MockInterface */ - private static function getNewDemeterMock( - Mockery\Container $container, - $parent, - $method, - Mockery\ExpectationInterface $exp - ) { - $newMockName = 'demeter_' . md5($parent) . '_' . $method; + private static function getNewDemeterMock(Container $container, $parent, $method, ExpectationInterface $exp) + { + $newMockName = 'demeter_' . \md5($parent) . '_' . $method; $parRef = null; - $parRefMethod = null; - $parRefMethodRetType = null; $parentMock = $exp->getMock(); if ($parentMock !== null) { $parRef = new ReflectionObject($parentMock); } - if ($parRef !== null && $parRef->hasMethod($method)) { + if ($parRef instanceof ReflectionObject && $parRef->hasMethod($method)) { $parRefMethod = $parRef->getMethod($method); $parRefMethodRetType = Reflector::getReturnType($parRefMethod, true); - if ($parRefMethodRetType !== null && $parRefMethodRetType !== 'mixed') { - $nameBuilder = new MockNameBuilder(); - $nameBuilder->addPart('\\' . $newMockName); - $mock = self::namedMock($nameBuilder->build(), $parRefMethodRetType); - $exp->andReturn($mock); + if ($parRefMethodRetType !== null) { + $returnTypes = \explode('|', $parRefMethodRetType); - return $mock; + $filteredReturnTypes = array_filter($returnTypes, static function (string $type): bool { + return ! Reflector::isReservedWord($type); + }); + + if ($filteredReturnTypes !== []) { + $nameBuilder = new MockNameBuilder(); + + $nameBuilder->addPart('\\' . $newMockName); + + $mock = self::namedMock( + $nameBuilder->build(), + ...$filteredReturnTypes + ); + + $exp->andReturn($mock); + + return $mock; + } } } @@ -902,82 +1017,46 @@ class Mockery return $mock; } - /** - * Gets an specific demeter mock from - * the ones kept by the container. - * - * @param \Mockery\Container $container - * @param string $demeterMockKey - * - * @return mixed - */ - private static function getExistingDemeterMock( - Mockery\Container $container, - $demeterMockKey - ) { - $mocks = $container->getMocks(); - $mock = $mocks[$demeterMockKey]; - - return $mock; - } - /** * Checks if the passed array representing a demeter * chain with the method names is empty. * - * @param array $methodNames - * * @return bool */ private static function noMoreElementsInChain(array $methodNames) { - return empty($methodNames); - } - - public static function declareClass($fqn) - { - return static::declareType($fqn, "class"); - } - - public static function declareInterface($fqn) - { - return static::declareType($fqn, "interface"); - } - - private static function declareType($fqn, $type) - { - $targetCode = " self::extractInstancePublicProperties($object, $nesting), + ]; + }; + + $class = \get_class($object); + + $formatter = self::getConfiguration()->getObjectFormatter($class, $defaultFormatter); + + $array = [ + 'class' => $class, + 'identity' => '#' . \md5(\spl_object_hash($object)), + ]; + + return \array_merge($array, $formatter($object, $nesting)); } } diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php index 472f6fbc..a6d5b8fe 100644 --- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php @@ -1,26 +1,20 @@ addToAssertionCount(Mockery::getContainer()->mockery_getExpectationCount()); + } + + protected function checkMockeryExceptions() + { + if (! method_exists($this, 'markAsRisky')) { + return; + } + + foreach (Mockery::getContainer()->mockery_thrownExceptions() as $e) { + if (! $e->dismissed()) { + $this->markAsRisky(); + } + } + } + + protected function closeMockery() + { + Mockery::close(); + $this->mockeryOpen = false; + } + /** * Performs assertions shared by all tests of a test case. This method is * called before execution of a test ends and before the tearDown method. @@ -45,41 +63,10 @@ trait MockeryPHPUnitIntegration parent::assertPostConditions(); } - protected function addMockeryExpectationsToAssertionCount() - { - $this->addToAssertionCount(Mockery::getContainer()->mockery_getExpectationCount()); - } - - protected function checkMockeryExceptions() - { - if (!method_exists($this, "markAsRisky")) { - return; - } - - foreach (Mockery::getContainer()->mockery_thrownExceptions() as $e) { - if (!$e->dismissed()) { - $this->markAsRisky(); - } - } - } - - protected function closeMockery() - { - Mockery::close(); - $this->mockeryOpen = false; - } - - /** - * @before - */ - protected function startMockery() - { - $this->mockeryOpen = true; - } - /** * @after */ + #[After] protected function purgeMockeryContainer() { if ($this->mockeryOpen) { @@ -87,4 +74,13 @@ trait MockeryPHPUnitIntegration Mockery::close(); } } + + /** + * @before + */ + #[Before] + protected function startMockery() + { + $this->mockeryOpen = true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php index 68fc89ef..e4a80b5f 100644 --- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditions.php @@ -1,21 +1,11 @@ getBlacklistedDirectories(); - Blacklist::addDirectory(\dirname((new \ReflectionClass(\Mockery::class))->getFileName())); + (new Blacklist())->getBlacklistedDirectories(); + Blacklist::addDirectory(dirname((new ReflectionClass(Mockery::class))->getFileName())); } else { - Blacklist::$blacklistedClassNames[\Mockery::class] = 1; + Blacklist::$blacklistedClassNames[Mockery::class] = 1; } } } diff --git a/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php index 35ca16db..fae88712 100644 --- a/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php +++ b/vendor/mockery/mockery/library/Mockery/ClosureWrapper.php @@ -1,27 +1,18 @@ closure = $closure; } + /** + * @return mixed + */ public function __invoke() { - return call_user_func_array($this->closure, func_get_args()); + return ($this->closure)(...func_get_args()); } } diff --git a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php index 52314322..fa03c399 100644 --- a/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php +++ b/vendor/mockery/mockery/library/Mockery/CompositeExpectation.php @@ -1,38 +1,64 @@ */ - protected $_expectations = array(); + protected $_expectations = []; + + /** + * Intercept any expectation calls and direct against all expectations + * + * @param string $method + * + * @return self + */ + public function __call($method, array $args) + { + foreach ($this->_expectations as $expectation) { + $expectation->{$method}(...$args); + } + + return $this; + } + + /** + * Return the string summary of this composite expectation + * + * @return string + */ + public function __toString() + { + $parts = array_map(static function (ExpectationInterface $expectation): string { + return (string) $expectation; + }, $this->_expectations); + + return '[' . implode(', ', $parts) . ']'; + } /** * Add an expectation to the composite * - * @param \Mockery\Expectation|\Mockery\CompositeExpectation $expectation + * @param ExpectationInterface|HigherOrderMessage $expectation + * * @return void */ public function add($expectation) @@ -52,26 +78,24 @@ class CompositeExpectation implements ExpectationInterface * Set a return value, or sequential queue of return values * * @param mixed ...$args + * * @return self */ public function andReturns(...$args) { - return call_user_func_array([$this, 'andReturn'], $args); + return $this->andReturn(...$args); } /** - * Intercept any expectation calls and direct against all expectations + * Return the parent mock of the first expectation * - * @param string $method - * @param array $args - * @return self + * @return LegacyMockInterface&MockInterface */ - public function __call($method, array $args) + public function getMock() { - foreach ($this->_expectations as $expectation) { - call_user_func_array(array($expectation, $method), $args); - } - return $this; + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock(); } /** @@ -86,22 +110,10 @@ class CompositeExpectation implements ExpectationInterface return $first->getOrderNumber(); } - /** - * Return the parent mock of the first expectation - * - * @return \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - public function getMock() - { - reset($this->_expectations); - $first = current($this->_expectations); - return $first->getMock(); - } - /** * Mockery API alias to getMock * - * @return \Mockery\LegacyMockInterface|\Mockery\MockInterface + * @return LegacyMockInterface&MockInterface */ public function mock() { @@ -109,46 +121,30 @@ class CompositeExpectation implements ExpectationInterface } /** - * Starts a new expectation addition on the first mock which is the primary - * target outside of a demeter chain + * Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain * * @param mixed ...$args - * @return \Mockery\Expectation - */ - public function shouldReceive(...$args) - { - reset($this->_expectations); - $first = current($this->_expectations); - return call_user_func_array(array($first->getMock(), 'shouldReceive'), $args); - } - - /** - * Starts a new expectation addition on the first mock which is the primary - * target outside of a demeter chain * - * @param mixed ...$args - * @return \Mockery\Expectation + * @return Expectation */ public function shouldNotReceive(...$args) { reset($this->_expectations); $first = current($this->_expectations); - return call_user_func_array(array($first->getMock(), 'shouldNotReceive'), $args); + return $first->getMock()->shouldNotReceive(...$args); } /** - * Return the string summary of this composite expectation + * Starts a new expectation addition on the first mock which is the primary target, outside of a demeter chain * - * @return string + * @param mixed ...$args + * + * @return Expectation */ - public function __toString() + public function shouldReceive(...$args) { - $return = '['; - $parts = array(); - foreach ($this->_expectations as $exp) { - $parts[] = (string) $exp; - } - $return .= implode(', ', $parts) . ']'; - return $return; + reset($this->_expectations); + $first = current($this->_expectations); + return $first->getMock()->shouldReceive(...$args); } } diff --git a/vendor/mockery/mockery/library/Mockery/Configuration.php b/vendor/mockery/mockery/library/Mockery/Configuration.php index bce05f3c..d415d9e0 100644 --- a/vendor/mockery/mockery/library/Mockery/Configuration.php +++ b/vendor/mockery/mockery/library/Mockery/Configuration.php @@ -1,35 +1,36 @@ ['MY_CONST' => 123, 'OTHER_CONST' => 'foo']] + * + * @var array|scalar>> + */ + protected $_constantsMap = []; + + /** + * Default argument matchers + * + * e.g. ['class' => 'matcher'] + * + * @var array + */ + protected $_defaultMatchers = []; /** * Parameter map for use with PHP internal classes. * - * @var array + * e.g. ['class' => ['method' => ['param1', 'param2']]] + * + * @var array>> */ - protected $_internalClassParamMap = array(); + protected $_internalClassParamMap = []; - protected $_constantsMap = array(); + /** + * Custom object formatters + * + * e.g. ['class' => static fn($object) => 'formatted'] + * + * @var array + */ + protected $_objectFormatters = []; + + /** + * @var QuickDefinitionsConfiguration + */ + protected $_quickDefinitionsConfiguration; /** * Boolean assertion is reflection caching enabled or not. It should be @@ -67,129 +103,35 @@ class Configuration $this->_quickDefinitionsConfiguration = new QuickDefinitionsConfiguration(); } - /** - * Custom object formatters - * - * @var array - */ - protected $_objectFormatters = array(); - - /** - * Default argument matchers - * - * @var array - */ - protected $_defaultMatchers = array(); - - /** - * Set boolean to allow/prevent mocking of non-existent methods - * - * @param bool $flag - */ - public function allowMockingNonExistentMethods($flag = true) - { - $this->_allowMockingNonExistentMethod = (bool) $flag; - } - - /** - * Return flag indicating whether mocking non-existent methods allowed - * - * @return bool - */ - public function mockingNonExistentMethodsAllowed() - { - return $this->_allowMockingNonExistentMethod; - } - /** * Set boolean to allow/prevent unnecessary mocking of methods * * @param bool $flag * + * @return void + * * @deprecated since 1.4.0 */ public function allowMockingMethodsUnnecessarily($flag = true) { - @trigger_error(sprintf("The %s method is deprecated and will be removed in a future version of Mockery", __METHOD__), E_USER_DEPRECATED); + @trigger_error( + sprintf('The %s method is deprecated and will be removed in a future version of Mockery', __METHOD__), + E_USER_DEPRECATED + ); $this->_allowMockingMethodsUnnecessarily = (bool) $flag; } /** - * Return flag indicating whether mocking non-existent methods allowed + * Set boolean to allow/prevent mocking of non-existent methods * - * @return bool + * @param bool $flag * - * @deprecated since 1.4.0 + * @return void */ - public function mockingMethodsUnnecessarilyAllowed() + public function allowMockingNonExistentMethods($flag = true) { - @trigger_error(sprintf("The %s method is deprecated and will be removed in a future version of Mockery", __METHOD__), E_USER_DEPRECATED); - - return $this->_allowMockingMethodsUnnecessarily; - } - - /** - * Set a parameter map (array of param signature strings) for the method - * of an internal PHP class. - * - * @param string $class - * @param string $method - * @param array $map - */ - public function setInternalClassMethodParamMap($class, $method, array $map) - { - if (\PHP_MAJOR_VERSION > 7) { - throw new \LogicException('Internal class parameter overriding is not available in PHP 8. Incompatible signatures have been reclassified as fatal errors.'); - } - - if (!isset($this->_internalClassParamMap[strtolower($class)])) { - $this->_internalClassParamMap[strtolower($class)] = array(); - } - $this->_internalClassParamMap[strtolower($class)][strtolower($method)] = $map; - } - - /** - * Remove all overridden parameter maps from internal PHP classes. - */ - public function resetInternalClassMethodParamMaps() - { - $this->_internalClassParamMap = array(); - } - - /** - * Get the parameter map of an internal PHP class method - * - * @return array|null - */ - public function getInternalClassMethodParamMap($class, $method) - { - if (isset($this->_internalClassParamMap[strtolower($class)][strtolower($method)])) { - return $this->_internalClassParamMap[strtolower($class)][strtolower($method)]; - } - } - - public function getInternalClassMethodParamMaps() - { - return $this->_internalClassParamMap; - } - - public function setConstantsMap(array $map) - { - $this->_constantsMap = $map; - } - - public function getConstantsMap() - { - return $this->_constantsMap; - } - - /** - * Returns the quick definitions configuration - */ - public function getQuickDefinitions(): QuickDefinitionsConfiguration - { - return $this->_quickDefinitionsConfiguration; + $this->_allowMockingNonExistentMethod = (bool) $flag; } /** @@ -199,6 +141,8 @@ class Configuration * PHPUnit's --static-backup option. * * @see https://github.com/mockery/mockery/issues/268 + * + * @return void */ public function disableReflectionCache() { @@ -212,72 +156,251 @@ class Configuration * PHPUnit's --static-backup option. * * @see https://github.com/mockery/mockery/issues/268 + * + * @return void */ public function enableReflectionCache() { $this->_reflectionCacheEnabled = true; } + /** + * Get the map of constants to be used in the mock generator + * + * @return array|scalar>> + */ + public function getConstantsMap() + { + return $this->_constantsMap; + } + + /** + * Get the default matcher for a given class + * + * @param class-string $class + * + * @return null|class-string + */ + public function getDefaultMatcher($class) + { + $classes = []; + + $parentClass = $class; + + do { + $classes[] = $parentClass; + + $parentClass = get_parent_class($parentClass); + } while ($parentClass !== false); + + $classesAndInterfaces = array_merge($classes, class_implements($class)); + + foreach ($classesAndInterfaces as $type) { + if (array_key_exists($type, $this->_defaultMatchers)) { + return $this->_defaultMatchers[$type]; + } + } + + return null; + } + + /** + * Get the parameter map of an internal PHP class method + * + * @param class-string $class + * @param string $method + * + * @return null|array + */ + public function getInternalClassMethodParamMap($class, $method) + { + $class = strtolower($class); + $method = strtolower($method); + if (! array_key_exists($class, $this->_internalClassParamMap)) { + return null; + } + + if (! array_key_exists($method, $this->_internalClassParamMap[$class])) { + return null; + } + + return $this->_internalClassParamMap[$class][$method]; + } + + /** + * Get the parameter maps of internal PHP classes + * + * @return array>> + */ + public function getInternalClassMethodParamMaps() + { + return $this->_internalClassParamMap; + } + + /** + * Get the object formatter for a class + * + * @param class-string $class + * @param Closure $defaultFormatter + * + * @return Closure + */ + public function getObjectFormatter($class, $defaultFormatter) + { + $parentClass = $class; + + do { + $classes[] = $parentClass; + + $parentClass = get_parent_class($parentClass); + } while ($parentClass !== false); + + $classesAndInterfaces = array_merge($classes, class_implements($class)); + + foreach ($classesAndInterfaces as $type) { + if (array_key_exists($type, $this->_objectFormatters)) { + return $this->_objectFormatters[$type]; + } + } + + return $defaultFormatter; + } + + /** + * Returns the quick definitions configuration + */ + public function getQuickDefinitions(): QuickDefinitionsConfiguration + { + return $this->_quickDefinitionsConfiguration; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + * + * @deprecated since 1.4.0 + */ + public function mockingMethodsUnnecessarilyAllowed() + { + @trigger_error( + sprintf('The %s method is deprecated and will be removed in a future version of Mockery', __METHOD__), + E_USER_DEPRECATED + ); + + return $this->_allowMockingMethodsUnnecessarily; + } + + /** + * Return flag indicating whether mocking non-existent methods allowed + * + * @return bool + */ + public function mockingNonExistentMethodsAllowed() + { + return $this->_allowMockingNonExistentMethod; + } + /** * Is reflection cache enabled? + * + * @return bool */ public function reflectionCacheEnabled() { return $this->_reflectionCacheEnabled; } + /** + * Remove all overridden parameter maps from internal PHP classes. + * + * @return void + */ + public function resetInternalClassMethodParamMaps() + { + $this->_internalClassParamMap = []; + } + + /** + * Set a map of constants to be used in the mock generator + * + * e.g. ['MyClass' => ['MY_CONST' => 123, 'ARRAY_CONST' => ['foo', 'bar']]] + * + * @param array|scalar>> $map + * + * @return void + */ + public function setConstantsMap(array $map) + { + $this->_constantsMap = $map; + } + + /** + * @param class-string $class + * @param class-string $matcherClass + * + * @throws InvalidArgumentException + * + * @return void + */ + public function setDefaultMatcher($class, $matcherClass) + { + $isHamcrest = is_a($matcherClass, Matcher::class, true) + || is_a($matcherClass, Hamcrest_Matcher::class, true); + + if ($isHamcrest) { + @trigger_error('Hamcrest package has been deprecated and will be removed in 2.0', E_USER_DEPRECATED); + } + + if (! $isHamcrest && ! is_a($matcherClass, MatcherInterface::class, true)) { + throw new InvalidArgumentException(sprintf( + "Matcher class must implement %s, '%s' given.", + MatcherInterface::class, + $matcherClass + )); + } + + $this->_defaultMatchers[$class] = $matcherClass; + } + + /** + * Set a parameter map (array of param signature strings) for the method of an internal PHP class. + * + * @param class-string $class + * @param string $method + * @param list $map + * + * @throws LogicException + * + * @return void + */ + public function setInternalClassMethodParamMap($class, $method, array $map) + { + if (PHP_MAJOR_VERSION > 7) { + throw new LogicException( + 'Internal class parameter overriding is not available in PHP 8. Incompatible signatures have been reclassified as fatal errors.' + ); + } + + $class = strtolower($class); + + if (! array_key_exists($class, $this->_internalClassParamMap)) { + $this->_internalClassParamMap[$class] = []; + } + + $this->_internalClassParamMap[$class][strtolower($method)] = $map; + } + + /** + * Set a custom object formatter for a class + * + * @param class-string $class + * @param Closure $formatterCallback + * + * @return void + */ public function setObjectFormatter($class, $formatterCallback) { $this->_objectFormatters[$class] = $formatterCallback; } - - public function getObjectFormatter($class, $defaultFormatter) - { - $parentClass = $class; - do { - $classes[] = $parentClass; - $parentClass = get_parent_class($parentClass); - } while ($parentClass); - $classesAndInterfaces = array_merge($classes, class_implements($class)); - foreach ($classesAndInterfaces as $type) { - if (isset($this->_objectFormatters[$type])) { - return $this->_objectFormatters[$type]; - } - } - return $defaultFormatter; - } - - /** - * @param string $class - * @param string $matcherClass - */ - public function setDefaultMatcher($class, $matcherClass) - { - if (!is_a($matcherClass, \Mockery\Matcher\MatcherAbstract::class, true) && - !is_a($matcherClass, \Hamcrest\Matcher::class, true) && - !is_a($matcherClass, \Hamcrest_Matcher::class, true) - ) { - throw new \InvalidArgumentException( - "Matcher class must be either Hamcrest matcher or extend \Mockery\Matcher\MatcherAbstract, " . - "'$matcherClass' given." - ); - } - $this->_defaultMatchers[$class] = $matcherClass; - } - - public function getDefaultMatcher($class) - { - $parentClass = $class; - do { - $classes[] = $parentClass; - $parentClass = get_parent_class($parentClass); - } while ($parentClass); - $classesAndInterfaces = array_merge($classes, class_implements($class)); - foreach ($classesAndInterfaces as $type) { - if (isset($this->_defaultMatchers[$type])) { - return $this->_defaultMatchers[$type]; - } - } - return null; - } } diff --git a/vendor/mockery/mockery/library/Mockery/Container.php b/vendor/mockery/mockery/library/Mockery/Container.php index 196dc996..ddba8884 100644 --- a/vendor/mockery/mockery/library/Mockery/Container.php +++ b/vendor/mockery/mockery/library/Mockery/Container.php @@ -1,39 +1,63 @@ + */ + protected $_groups = []; + /** * @var LoaderInterface */ protected $_loader; /** - * @var array + * Store of mock objects + * + * @var array|array-key,LegacyMockInterface&MockInterface&TMockObject> */ - protected $_namedMocks = array(); + protected $_mocks = []; - public function __construct(Generator $generator = null, LoaderInterface $loader = null) + /** + * @var array + */ + protected $_namedMocks = []; + + /** + * @var Instantiator + */ + protected $instantiator; + + public function __construct(?Generator $generator = null, ?LoaderInterface $loader = null, ?Instantiator $instantiator = null) { - $this->_generator = $generator ?: \Mockery::getDefaultGenerator(); - $this->_loader = $loader ?: \Mockery::getDefaultLoader(); + $this->_generator = $generator instanceof Generator ? $generator : Mockery::getDefaultGenerator(); + $this->_loader = $loader instanceof LoaderInterface ? $loader : Mockery::getDefaultLoader(); + $this->instantiator = $instantiator instanceof Instantiator ? $instantiator : new Instantiator(); + } + + /** + * Return a specific remembered mock according to the array index it + * was stored to in this container instance + * + * @template TMock of object + * + * @param class-string $reference + * + * @return null|(LegacyMockInterface&MockInterface&TMock) + */ + public function fetchMock($reference) + { + return $this->_mocks[$reference] ?? null; + } + + /** + * @return Generator + */ + public function getGenerator() + { + return $this->_generator; + } + + /** + * @param string $method + * @param string $parent + * + * @return null|string + */ + public function getKeyOfDemeterMockFor($method, $parent) + { + $keys = array_keys($this->_mocks); + + $match = preg_grep('/__demeter_' . md5($parent) . sprintf('_%s$/', $method), $keys); + if ($match === false) { + return null; + } + + if ($match === []) { + return null; + } + + return array_values($match)[0]; + } + + /** + * @return LoaderInterface + */ + public function getLoader() + { + return $this->_loader; + } + + /** + * @template TMock of object + * @return array|array-key,LegacyMockInterface&MockInterface&TMockObject> + */ + public function getMocks() + { + return $this->_mocks; + } + + /** + * @return void + */ + public function instanceMock() + { + } + + /** + * see http://php.net/manual/en/language.oop5.basic.php + * + * @param string $className + * + * @return bool + */ + public function isValidClassName($className) + { + if ($className[0] === '\\') { + $className = substr($className, 1); // remove the first backslash + } + + // all the namespaces and class name should match the regex + return array_filter( + explode('\\', $className), + static function ($name): bool { + return ! preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name); + } + ) === []; } /** @@ -85,119 +213,179 @@ class Container * names or partials - just so long as it's something that can be mocked. * I'll refactor it one day so it's easier to follow. * - * @param array ...$args + * @template TMock of object * - * @return Mock - * @throws Exception\RuntimeException + * @param array|TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @throws ReflectionException|RuntimeException + * + * @return LegacyMockInterface&MockInterface&TMock */ public function mock(...$args) { + /** @var null|MockConfigurationBuilder $builder */ + $builder = null; + /** @var null|callable $expectationClosure */ $expectationClosure = null; - $quickdefs = array(); + $partialMethods = null; + $quickDefinitions = []; $constructorArgs = null; - $blocks = array(); - $class = null; + $blocks = []; if (count($args) > 1) { - $finalArg = end($args); - reset($args); + $finalArg = array_pop($args); + if (is_callable($finalArg) && is_object($finalArg)) { - $expectationClosure = array_pop($args); + $expectationClosure = $finalArg; + } else { + $args[] = $finalArg; } } - $builder = new MockConfigurationBuilder(); - foreach ($args as $k => $arg) { if ($arg instanceof MockConfigurationBuilder) { $builder = $arg; + unset($args[$k]); } } + reset($args); - $builder->setParameterOverrides(\Mockery::getConfiguration()->getInternalClassMethodParamMaps()); - $builder->setConstantsMap(\Mockery::getConfiguration()->getConstantsMap()); + $builder = $builder ?? new MockConfigurationBuilder(); + $mockeryConfiguration = Mockery::getConfiguration(); + $builder->setParameterOverrides($mockeryConfiguration->getInternalClassMethodParamMaps()); + $builder->setConstantsMap($mockeryConfiguration->getConstantsMap()); - while (count($args) > 0) { + while ($args !== []) { $arg = array_shift($args); + // check for multiple interfaces if (is_string($arg)) { foreach (explode('|', $arg) as $type) { if ($arg === 'null') { // skip PHP 8 'null's - } elseif (strpos($type, ',') && !strpos($type, ']')) { + continue; + } + + if (strpos($type, ',') && !strpos($type, ']')) { $interfaces = explode(',', str_replace(' ', '', $type)); + $builder->addTargets($interfaces); - } elseif (substr($type, 0, 6) == 'alias:') { + + continue; + } + + if (strpos($type, 'alias:') === 0) { $type = str_replace('alias:', '', $type); + $builder->addTarget('stdClass'); $builder->setName($type); - } elseif (substr($type, 0, 9) == 'overload:') { + + continue; + } + + if (strpos($type, 'overload:') === 0) { $type = str_replace('overload:', '', $type); + $builder->setInstanceMock(true); $builder->addTarget('stdClass'); $builder->setName($type); - } elseif (substr($type, strlen($type)-1, 1) == ']') { + + continue; + } + + if ($type[strlen($type) - 1] === ']') { $parts = explode('[', $type); - if (!class_exists($parts[0], true) && !interface_exists($parts[0], true)) { - throw new \Mockery\Exception('Can only create a partial mock from' - . ' an existing class or interface'); - } + $class = $parts[0]; - $parts[1] = str_replace(' ', '', $parts[1]); - $partialMethods = array_filter(explode(',', strtolower(rtrim($parts[1], ']')))); + + if (! class_exists($class, true) && ! interface_exists($class, true)) { + throw new Exception('Can only create a partial mock from an existing class or interface'); + } + $builder->addTarget($class); + + $partialMethods = array_filter( + explode(',', strtolower(rtrim(str_replace(' ', '', $parts[1]), ']'))) + ); + foreach ($partialMethods as $partialMethod) { if ($partialMethod[0] === '!') { $builder->addBlackListedMethod(substr($partialMethod, 1)); + continue; } + $builder->addWhiteListedMethod($partialMethod); } - } elseif (class_exists($type, true) || interface_exists($type, true) || trait_exists($type, true)) { - $builder->addTarget($type); - } elseif (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() && (!class_exists($type, true) && !interface_exists($type, true))) { - throw new \Mockery\Exception("Mockery can't find '$type' so can't mock it"); - } else { - if (!$this->isValidClassName($type)) { - throw new \Mockery\Exception('Class name contains invalid characters'); - } - $builder->addTarget($type); + + continue; } - break; // unions are "sum" types and not "intersections", and so we must only process the first part + + if (class_exists($type, true) || interface_exists($type, true) || trait_exists($type, true)) { + $builder->addTarget($type); + + continue; + } + + if (! $mockeryConfiguration->mockingNonExistentMethodsAllowed()) { + throw new Exception(sprintf("Mockery can't find '%s' so can't mock it", $type)); + } + + if (! $this->isValidClassName($type)) { + throw new Exception('Class name contains invalid characters'); + } + + $builder->addTarget($type); + + // unions are "sum" types and not "intersections", and so we must only process the first part + break; } - } elseif (is_object($arg)) { + + continue; + } + + if (is_object($arg)) { $builder->addTarget($arg); - } elseif (is_array($arg)) { - if (!empty($arg) && array_keys($arg) !== range(0, count($arg) - 1)) { + + continue; + } + + if (is_array($arg)) { + if ([] !== $arg && array_keys($arg) !== range(0, count($arg) - 1)) { // if associative array if (array_key_exists(self::BLOCKS, $arg)) { $blocks = $arg[self::BLOCKS]; } + unset($arg[self::BLOCKS]); - $quickdefs = $arg; - } else { - $constructorArgs = $arg; + + $quickDefinitions = $arg; + + continue; } - } else { - throw new \Mockery\Exception( - 'Unable to parse arguments sent to ' - . get_class($this) . '::mock()' - ); + + $constructorArgs = $arg; + + continue; } + + throw new Exception(sprintf( + 'Unable to parse arguments sent to %s::mock()', get_class($this) + )); } $builder->addBlackListedMethods($blocks); - if (!is_null($constructorArgs)) { - $builder->addBlackListedMethod("__construct"); // we need to pass through + if ($constructorArgs !== null) { + $builder->addBlackListedMethod('__construct'); // we need to pass through } else { $builder->setMockOriginalDestructor(true); } - if (!empty($partialMethods) && $constructorArgs === null) { - $constructorArgs = array(); + if ($partialMethods !== null && $constructorArgs === null) { + $constructorArgs = []; } $config = $builder->getMockConfiguration(); @@ -206,114 +394,44 @@ class Container $def = $this->getGenerator()->generate($config); - if (class_exists($def->getClassName(), $attemptAutoload = false)) { - $rfc = new \ReflectionClass($def->getClassName()); - if (!$rfc->implementsInterface("Mockery\LegacyMockInterface")) { - throw new \Mockery\Exception\RuntimeException("Could not load mock {$def->getClassName()}, class already exists"); + $className = $def->getClassName(); + if (class_exists($className, $attemptAutoload = false)) { + $rfc = new ReflectionClass($className); + if (! $rfc->implementsInterface(LegacyMockInterface::class)) { + throw new RuntimeException(sprintf('Could not load mock %s, class already exists', $className)); } } $this->getLoader()->load($def); - $mock = $this->_getInstance($def->getClassName(), $constructorArgs); + $mock = $this->_getInstance($className, $constructorArgs); $mock->mockery_init($this, $config->getTargetObject(), $config->isInstanceMock()); - if (!empty($quickdefs)) { - if (\Mockery::getConfiguration()->getQuickDefinitions()->shouldBeCalledAtLeastOnce()) { - $mock->shouldReceive($quickdefs)->atLeast()->once(); + if ($quickDefinitions !== []) { + if ($mockeryConfiguration->getQuickDefinitions()->shouldBeCalledAtLeastOnce()) { + $mock->shouldReceive($quickDefinitions)->atLeast()->once(); } else { - $mock->shouldReceive($quickdefs)->byDefault(); + $mock->shouldReceive($quickDefinitions)->byDefault(); } } - if (!empty($expectationClosure)) { + + // if the last parameter passed to mock() is a closure, + if ($expectationClosure instanceof Closure) { + // call the closure with the mock object $expectationClosure($mock); } - $this->rememberMock($mock); - return $mock; - } - public function instanceMock() - { - } - - public function getLoader() - { - return $this->_loader; - } - - public function getGenerator() - { - return $this->_generator; + return $this->rememberMock($mock); } /** - * @param string $method - * @param string $parent - * @return string|null - */ - public function getKeyOfDemeterMockFor($method, $parent) - { - $keys = array_keys($this->_mocks); - $match = preg_grep("/__demeter_" . md5($parent) . "_{$method}$/", $keys); - if (count($match) == 1) { - $res = array_values($match); - if (count($res) > 0) { - return $res[0]; - } - } - return null; - } - - /** - * @return array - */ - public function getMocks() - { - return $this->_mocks; - } - - /** - * Tear down tasks for this container + * Fetch the next available allocation order number * - * @throws \Exception - * @return void + * @return int */ - public function mockery_teardown() + public function mockery_allocateOrder() { - try { - $this->mockery_verify(); - } catch (\Exception $e) { - $this->mockery_close(); - throw $e; - } - } - - /** - * Verify the container mocks - * - * @return void - */ - public function mockery_verify() - { - foreach ($this->_mocks as $mock) { - $mock->mockery_verify(); - } - } - - /** - * Retrieves all exceptions thrown by mocks - * - * @return array - */ - public function mockery_thrownExceptions() - { - $e = []; - - foreach ($this->_mocks as $mock) { - $e = array_merge($e, $mock->mockery_thrownExceptions()); - } - - return $e; + return ++$this->_allocatedOrder; } /** @@ -326,51 +444,8 @@ class Container foreach ($this->_mocks as $mock) { $mock->mockery_teardown(); } - $this->_mocks = array(); - } - /** - * Fetch the next available allocation order number - * - * @return int - */ - public function mockery_allocateOrder() - { - $this->_allocatedOrder += 1; - return $this->_allocatedOrder; - } - - /** - * Set ordering for a group - * - * @param mixed $group - * @param int $order - */ - public function mockery_setGroup($group, $order) - { - $this->_groups[$group] = $order; - } - - /** - * Fetch array of ordered groups - * - * @return array - */ - public function mockery_getGroups() - { - return $this->_groups; - } - - /** - * Set current ordered number - * - * @param int $order - * @return int The current order number that was set - */ - public function mockery_setCurrentOrder($order) - { - $this->_currentOrder = $order; - return $this->_currentOrder; + $this->_mocks = []; } /** @@ -383,30 +458,6 @@ class Container return $this->_currentOrder; } - /** - * Validate the current mock's ordering - * - * @param string $method - * @param int $order - * @throws \Mockery\Exception - * @return void - */ - public function mockery_validateOrder($method, $order, \Mockery\LegacyMockInterface $mock) - { - if ($order < $this->_currentOrder) { - $exception = new \Mockery\Exception\InvalidOrderException( - 'Method ' . $method . ' called out of order: expected order ' - . $order . ', was ' . $this->_currentOrder - ); - $exception->setMock($mock) - ->setMethodName($method) - ->setExpectedOrder($order) - ->setActualOrder($this->_currentOrder); - throw $exception; - } - $this->mockery_setCurrentOrder($order); - } - /** * Gets the count of expectations on the mocks * @@ -418,36 +469,151 @@ class Container foreach ($this->_mocks as $mock) { $count += $mock->mockery_getExpectationCount(); } + return $count; } + /** + * Fetch array of ordered groups + * + * @return array + */ + public function mockery_getGroups() + { + return $this->_groups; + } + + /** + * Set current ordered number + * + * @param int $order + * + * @return int The current order number that was set + */ + public function mockery_setCurrentOrder($order) + { + return $this->_currentOrder = $order; + } + + /** + * Set ordering for a group + * + * @param string $group + * @param int $order + * + * @return void + */ + public function mockery_setGroup($group, $order) + { + $this->_groups[$group] = $order; + } + + /** + * Tear down tasks for this container + * + * @throws PHPException + */ + public function mockery_teardown() + { + try { + $this->mockery_verify(); + } catch (PHPException $phpException) { + $this->mockery_close(); + + throw $phpException; + } + } + + /** + * Retrieves all exceptions thrown by mocks + * + * @return array + */ + public function mockery_thrownExceptions() + { + /** @var array $exceptions */ + $exceptions = []; + + foreach ($this->_mocks as $mock) { + foreach ($mock->mockery_thrownExceptions() as $exception) { + $exceptions[] = $exception; + } + } + + return $exceptions; + } + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * + * @throws Exception + */ + public function mockery_validateOrder($method, $order, LegacyMockInterface $mock) + { + if ($order < $this->_currentOrder) { + $exception = new InvalidOrderException( + sprintf( + 'Method %s called out of order: expected order %d, was %d', + $method, + $order, + $this->_currentOrder + ) + ); + + $exception->setMock($mock) + ->setMethodName($method) + ->setExpectedOrder($order) + ->setActualOrder($this->_currentOrder); + + throw $exception; + } + + $this->mockery_setCurrentOrder($order); + } + + /** + * Verify the container mocks + */ + public function mockery_verify() + { + foreach ($this->_mocks as $mock) { + $mock->mockery_verify(); + } + } + /** * Store a mock and set its container reference * - * @param \Mockery\Mock $mock - * @return \Mockery\LegacyMockInterface|\Mockery\MockInterface + * @template TRememberMock of object + * + * @param LegacyMockInterface&MockInterface&TRememberMock $mock + * + * @return LegacyMockInterface&MockInterface&TRememberMock */ - public function rememberMock(\Mockery\LegacyMockInterface $mock) + public function rememberMock(LegacyMockInterface $mock) { - if (!isset($this->_mocks[get_class($mock)])) { - $this->_mocks[get_class($mock)] = $mock; - } else { - /** - * This condition triggers for an instance mock where origin mock - * is already remembered - */ - $this->_mocks[] = $mock; + $class = get_class($mock); + + if (! array_key_exists($class, $this->_mocks)) { + return $this->_mocks[$class] = $mock; } - return $mock; + + /** + * This condition triggers for an instance mock where origin mock + * is already remembered + */ + return $this->_mocks[] = $mock; } /** - * Retrieve the last remembered mock object, which is the same as saying - * retrieve the current mock being programmed where you have yet to call - * mock() to change it - thus why the method name is "self" since it will be - * be used during the programming of the same mock. + * Retrieve the last remembered mock object, + * which is the same as saying retrieve the current mock being programmed where you have yet to call mock() + * to change it thus why the method name is "self" since it will be used during the programming of the same mock. * - * @return \Mockery\Mock + * @return LegacyMockInterface|MockInterface */ public function self() { @@ -457,35 +623,32 @@ class Container } /** - * Return a specific remembered mock according to the array index it - * was stored to in this container instance + * @template TMock of object + * @template TMixed * - * @return \Mockery\Mock + * @param class-string $mockName + * @param null|array $constructorArgs + * + * @return TMock */ - public function fetchMock($reference) - { - if (isset($this->_mocks[$reference])) { - return $this->_mocks[$reference]; - } - } - protected function _getInstance($mockName, $constructorArgs = null) { if ($constructorArgs !== null) { - $r = new \ReflectionClass($mockName); - return $r->newInstanceArgs($constructorArgs); + return (new ReflectionClass($mockName))->newInstanceArgs($constructorArgs); } try { - $instantiator = new Instantiator(); - $instance = $instantiator->instantiate($mockName); - } catch (\Exception $ex) { + $instance = $this->instantiator->instantiate($mockName); + } catch (PHPException $phpException) { + /** @var class-string $internalMockName */ $internalMockName = $mockName . '_Internal'; - if (!class_exists($internalMockName)) { - eval("class $internalMockName extends $mockName {" . - 'public function __construct() {}' . - '}'); + if (! class_exists($internalMockName)) { + eval(sprintf( + 'class %s extends %s { public function __construct() {} }', + $internalMockName, + $mockName + )); } $instance = new $internalMockName(); @@ -498,38 +661,18 @@ class Container { $name = $config->getName(); - if (!$name) { + if ($name === null) { return; } $hash = $config->getHash(); - if (isset($this->_namedMocks[$name])) { - if ($hash !== $this->_namedMocks[$name]) { - throw new \Mockery\Exception( - "The mock named '$name' has been already defined with a different mock configuration" - ); - } + if (array_key_exists($name, $this->_namedMocks) && $hash !== $this->_namedMocks[$name]) { + throw new Exception( + sprintf("The mock named '%s' has been already defined with a different mock configuration", $name) + ); } $this->_namedMocks[$name] = $hash; } - - /** - * see http://php.net/manual/en/language.oop5.basic.php - * @param string $className - * @return bool - */ - public function isValidClassName($className) - { - $pos = strpos($className, '\\'); - if ($pos === 0) { - $className = substr($className, 1); // remove the first backslash - } - // all the namespaces and class name should match the regex - $invalidNames = array_filter(explode('\\', $className), function ($name) { - return !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name); - }); - return empty($invalidNames); - } } diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php index f6ac130e..f250d755 100644 --- a/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtLeast.php @@ -1,26 +1,18 @@ _limit > $n) { - $exception = new Mockery\Exception\InvalidCountException( + $exception = new InvalidCountException( 'Method ' . (string) $this->_expectation . ' from ' . $this->_expectation->getMock()->mockery_getName() . ' should be called' . PHP_EOL . ' at least ' . $this->_limit . ' times but called ' . $n . ' times.' ); + $exception->setMock($this->_expectation->getMock()) ->setMethodName((string) $this->_expectation) ->setExpectedCountComparative('>=') diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php index 4d23e28d..11bbe37c 100644 --- a/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/AtMost.php @@ -1,26 +1,18 @@ _limit < $n) { - $exception = new Mockery\Exception\InvalidCountException( + $exception = new InvalidCountException( 'Method ' . (string) $this->_expectation . ' from ' . $this->_expectation->getMock()->mockery_getName() . ' should be called' . PHP_EOL diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php index ae3b0bfe..3ecfde3a 100644 --- a/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/CountValidatorAbstract.php @@ -1,31 +1,23 @@ _expectation = $expectation; $this->_limit = $limit; @@ -52,17 +43,19 @@ abstract class CountValidatorAbstract * Checks if the validator can accept an additional nth call * * @param int $n + * * @return bool */ public function isEligible($n) { - return ($n < $this->_limit); + return $n < $this->_limit; } /** * Validate the call count against this validator * * @param int $n + * * @return bool */ abstract public function validate($n); diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php index 504f080d..df2c97b7 100644 --- a/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exact.php @@ -1,26 +1,18 @@ _limit !== $n) { $because = $this->_expectation->getExceptionMessage(); - $exception = new Mockery\Exception\InvalidCountException( + $exception = new InvalidCountException( 'Method ' . (string) $this->_expectation . ' from ' . $this->_expectation->getMock()->mockery_getName() . ' should be called' . PHP_EOL diff --git a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php index b43aad3e..b1c20cd4 100644 --- a/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php +++ b/vendor/mockery/mockery/library/Mockery/CountValidator/Exception.php @@ -1,25 +1,18 @@ dismissed = true; - // we sometimes stack them - if ($this->getPrevious() && $this->getPrevious() instanceof BadMethodCallException) { - $this->getPrevious()->dismiss(); + $previous = $this->getPrevious(); + if (! $previous instanceof self) { + return; } + + $previous->dismiss(); } + /** + * @return bool + */ public function dismissed() { return $this->dismissed; diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php index ccf5c76f..d76e275e 100644 --- a/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php +++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidArgumentException.php @@ -1,25 +1,15 @@ mockObject = $mock; - return $this; + return $this->actual; } - public function setMethodName($name) + /** + * @return int + */ + public function getExpectedCount() { - $this->method = $name; - return $this; + return $this->expected; } + /** + * @return string + */ + public function getExpectedCountComparative() + { + return $this->expectedComparative; + } + + /** + * @return string|null + */ + public function getMethodName() + { + return $this->method; + } + + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @throws RuntimeException + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return ''; + } + + return $mock->mockery_getName(); + } + + /** + * @param int $count + * @return self + */ public function setActualCount($count) { $this->actual = $count; return $this; } + /** + * @param int $count + * @return self + */ public function setExpectedCount($count) { $this->expected = $count; return $this; } + /** + * @param string $comp + * @return self + */ public function setExpectedCountComparative($comp) { - if (!in_array($comp, array('=', '>', '<', '>=', '<='))) { - throw new RuntimeException( - 'Illegal comparative for expected call counts set: ' . $comp - ); + if (! in_array($comp, ['=', '>', '<', '>=', '<='], true)) { + throw new RuntimeException('Illegal comparative for expected call counts set: ' . $comp); } + $this->expectedComparative = $comp; return $this; } - public function getMock() + /** + * @param string $name + * @return self + */ + public function setMethodName($name) { - return $this->mockObject; + $this->method = $name; + return $this; } - public function getMethodName() + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) { - return $this->method; - } - - public function getActualCount() - { - return $this->actual; - } - - public function getExpectedCount() - { - return $this->expected; - } - - public function getMockName() - { - return $this->getMock()->mockery_getName(); - } - - public function getExpectedCountComparative() - { - return $this->expectedComparative; + $this->mockObject = $mock; + return $this; } } diff --git a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php index 50b8049e..cf5bb70d 100644 --- a/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php +++ b/vendor/mockery/mockery/library/Mockery/Exception/InvalidOrderException.php @@ -1,83 +1,125 @@ mockObject = $mock; - return $this; + return $this->actual; } - public function setMethodName($name) + /** + * @return int + */ + public function getExpectedOrder() { - $this->method = $name; - return $this; + return $this->expected; } + /** + * @return string|null + */ + public function getMethodName() + { + return $this->method; + } + + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return $mock; + } + + return $mock->mockery_getName(); + } + + /** + * @param int $count + * + * @return self + */ public function setActualOrder($count) { $this->actual = $count; return $this; } + /** + * @param int $count + * + * @return self + */ public function setExpectedOrder($count) { $this->expected = $count; return $this; } - public function getMock() + /** + * @param string $name + * + * @return self + */ + public function setMethodName($name) { - return $this->mockObject; + $this->method = $name; + return $this; } - public function getMethodName() + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) { - return $this->method; - } - - public function getActualOrder() - { - return $this->actual; - } - - public function getExpectedOrder() - { - return $this->expected; - } - - public function getMockName() - { - return $this->getMock()->mockery_getName(); + $this->mockObject = $mock; + return $this; } } diff --git a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php index fe5f3515..ad5dbfb0 100644 --- a/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php +++ b/vendor/mockery/mockery/library/Mockery/Exception/NoMatchingExpectationException.php @@ -1,70 +1,102 @@ + */ + protected $actual = []; + + /** + * @var string|null + */ protected $method = null; - protected $actual = array(); - + /** + * @var LegacyMockInterface|null + */ protected $mockObject = null; - public function setMock(Mockery\LegacyMockInterface $mock) + /** + * @return array + */ + public function getActualArguments() { - $this->mockObject = $mock; - return $this; + return $this->actual; } - public function setMethodName($name) + /** + * @return string|null + */ + public function getMethodName() { - $this->method = $name; - return $this; + return $this->method; } + /** + * @return LegacyMockInterface|null + */ + public function getMock() + { + return $this->mockObject; + } + + /** + * @return string|null + */ + public function getMockName() + { + $mock = $this->getMock(); + + if ($mock === null) { + return $mock; + } + + return $mock->mockery_getName(); + } + + /** + * @todo Rename param `count` to `args` + * @template TMixed + * + * @param array $count + * @return self + */ public function setActualArguments($count) { $this->actual = $count; return $this; } - public function getMock() + /** + * @param string $name + * @return self + */ + public function setMethodName($name) { - return $this->mockObject; + $this->method = $name; + return $this; } - public function getMethodName() + /** + * @return self + */ + public function setMock(LegacyMockInterface $mock) { - return $this->method; - } - - public function getActualArguments() - { - return $this->actual; - } - - public function getMockName() - { - return $this->getMock()->mockery_getName(); + $this->mockObject = $mock; + return $this; } } diff --git a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php index 4b2f53c2..5d4f643d 100644 --- a/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php +++ b/vendor/mockery/mockery/library/Mockery/Exception/RuntimeException.php @@ -1,25 +1,17 @@ _mock = $mock; $this->_name = $name; $this->withAnyArgs(); } + /** + * Cloning logic + */ + public function __clone() + { + $newValidators = []; + + $countValidators = $this->_countValidators; + + foreach ($countValidators as $validator) { + $newValidators[] = clone $validator; + } + + $this->_countValidators = $newValidators; + } + /** * Return a string with the method name and arguments formatted * - * @param string $name Name of the expected method - * @param array $args List of arguments to the method * @return string */ public function __toString() { - return \Mockery::formatArgs($this->_name, $this->_expectedArgs); - } - - /** - * Verify the current call, i.e. that the given arguments match those - * of this expectation - * - * @param array $args - * @return mixed - */ - public function verifyCall(array $args) - { - $this->validateOrder(); - $this->_actualCount++; - if (true === $this->_passthru) { - return $this->_mock->mockery_callSubjectMethod($this->_name, $args); - } - - $return = $this->_getReturnValue($args); - $this->throwAsNecessary($return); - $this->_setValues(); - - return $return; - } - - /** - * Throws an exception if the expectation has been configured to do so - * - * @throws \Throwable - * @return void - */ - private function throwAsNecessary($return) - { - if (!$this->_throw) { - return; - } - - if ($return instanceof \Throwable) { - throw $return; - } - - return; - } - - /** - * Sets public properties with queued values to the mock object - * - * @param array $args - * @return mixed - */ - protected function _setValues() - { - $mockClass = get_class($this->_mock); - $container = $this->_mock->mockery_getContainer(); - /** @var Mock[] $mocks */ - $mocks = $container->getMocks(); - foreach ($this->_setQueue as $name => &$values) { - if (count($values) > 0) { - $value = array_shift($values); - $this->_mock->{$name} = $value; - foreach ($mocks as $mock) { - if (is_a($mock, $mockClass) && $mock->mockery_isInstance()) { - $mock->{$name} = $value; - } - } - } - } - } - - /** - * Fetch the return value for the matching args - * - * @param array $args - * @return mixed - */ - protected function _getReturnValue(array $args) - { - if (count($this->_closureQueue) > 1) { - return call_user_func_array(array_shift($this->_closureQueue), $args); - } elseif (count($this->_closureQueue) > 0) { - return call_user_func_array(current($this->_closureQueue), $args); - } elseif (count($this->_returnQueue) > 1) { - return array_shift($this->_returnQueue); - } elseif (count($this->_returnQueue) > 0) { - return current($this->_returnQueue); - } - - return $this->_mock->mockery_returnValueForMethod($this->_name); - } - - /** - * Checks if this expectation is eligible for additional calls - * - * @return bool - */ - public function isEligible() - { - foreach ($this->_countValidators as $validator) { - if (!$validator->isEligible($this->_actualCount)) { - return false; - } - } - return true; - } - - /** - * Check if there is a constraint on call count - * - * @return bool - */ - public function isCallCountConstrained() - { - return (count($this->_countValidators) > 0); - } - - /** - * Verify call order - * - * @return void - */ - public function validateOrder() - { - if ($this->_orderNumber) { - $this->_mock->mockery_validateOrder((string) $this, $this->_orderNumber, $this->_mock); - } - if ($this->_globalOrderNumber) { - $this->_mock->mockery_getContainer() - ->mockery_validateOrder((string) $this, $this->_globalOrderNumber, $this->_mock); - } - } - - /** - * Verify this expectation - * - * @return void - */ - public function verify() - { - foreach ($this->_countValidators as $validator) { - $validator->validate($this->_actualCount); - } - } - - /** - * Check if the registered expectation is an ArgumentListMatcher - * @return bool - */ - private function isArgumentListMatcher() - { - return (count($this->_expectedArgs) === 1 && ($this->_expectedArgs[0] instanceof ArgumentListMatcher)); - } - - private function isAndAnyOtherArgumentsMatcher($expectedArg) - { - return $expectedArg instanceof AndAnyOtherArgs; - } - - /** - * Check if passed arguments match an argument expectation - * - * @param array $args - * @return bool - */ - public function matchArgs(array $args) - { - if ($this->isArgumentListMatcher()) { - return $this->_matchArg($this->_expectedArgs[0], $args); - } - $argCount = count($args); - if ($argCount !== count((array) $this->_expectedArgs)) { - $lastExpectedArgument = end($this->_expectedArgs); - reset($this->_expectedArgs); - - if ($this->isAndAnyOtherArgumentsMatcher($lastExpectedArgument)) { - $args = array_slice($args, 0, array_search($lastExpectedArgument, $this->_expectedArgs, true)); - return $this->_matchArgs($args); - } - - return false; - } - - return $this->_matchArgs($args); - } - - /** - * Check if the passed arguments match the expectations, one by one. - * - * @param array $args - * @return bool - */ - protected function _matchArgs($args) - { - $argCount = count($args); - for ($i=0; $i<$argCount; $i++) { - $param =& $args[$i]; - if (!$this->_matchArg($this->_expectedArgs[$i], $param)) { - return false; - } - } - return true; - } - - /** - * Check if passed argument matches an argument expectation - * - * @param mixed $expected - * @param mixed $actual - * @return bool - */ - protected function _matchArg($expected, &$actual) - { - if ($expected === $actual) { - return true; - } - if (!is_object($expected) && !is_object($actual) && $expected == $actual) { - return true; - } - if (is_string($expected) && is_object($actual)) { - $result = $actual instanceof $expected; - if ($result) { - return true; - } - } - if (is_object($expected)) { - $matcher = \Mockery::getConfiguration()->getDefaultMatcher(get_class($expected)); - if ($matcher !== null) { - $expected = new $matcher($expected); - } - } - if ($expected instanceof \Mockery\Matcher\MatcherAbstract) { - return $expected->match($actual); - } - if ($expected instanceof \Hamcrest\Matcher || $expected instanceof \Hamcrest_Matcher) { - return $expected->matches($actual); - } - return false; - } - - /** - * Expected argument setter for the expectation - * - * @param mixed ...$args - * - * @return self - */ - public function with(...$args) - { - return $this->withArgs($args); - } - - /** - * Expected arguments for the expectation passed as an array - * - * @param array $arguments - * @return self - */ - private function withArgsInArray(array $arguments) - { - if (empty($arguments)) { - return $this->withNoArgs(); - } - $this->_expectedArgs = $arguments; - return $this; - } - - /** - * Expected arguments have to be matched by the given closure. - * - * @param Closure $closure - * @return self - */ - private function withArgsMatchedByClosure(Closure $closure) - { - $this->_expectedArgs = [new MultiArgumentClosure($closure)]; - return $this; - } - - /** - * Expected arguments for the expectation passed as an array or a closure that matches each passed argument on - * each function call. - * - * @param array|Closure $argsOrClosure - * @return self - */ - public function withArgs($argsOrClosure) - { - if (is_array($argsOrClosure)) { - $this->withArgsInArray($argsOrClosure); - } elseif ($argsOrClosure instanceof Closure) { - $this->withArgsMatchedByClosure($argsOrClosure); - } else { - throw new \InvalidArgumentException(sprintf('Call to %s with an invalid argument (%s), only array and ' . - 'closure are allowed', __METHOD__, $argsOrClosure)); - } - return $this; - } - - /** - * Set with() as no arguments expected - * - * @return self - */ - public function withNoArgs() - { - $this->_expectedArgs = [new NoArgs()]; - return $this; - } - - /** - * Set expectation that any arguments are acceptable - * - * @return self - */ - public function withAnyArgs() - { - $this->_expectedArgs = [new AnyArgs()]; - return $this; - } - - /** - * Expected arguments should partially match the real arguments - * - * @param mixed ...$expectedArgs - * @return self - */ - public function withSomeOfArgs(...$expectedArgs) - { - return $this->withArgs(function (...$args) use ($expectedArgs) { - foreach ($expectedArgs as $expectedArg) { - if (!in_array($expectedArg, $args, true)) { - return false; - } - } - return true; - }); + return Mockery::formatArgs($this->_name, $this->_expectedArgs); } /** * Set a return value, or sequential queue of return values * * @param mixed ...$args + * * @return self */ public function andReturn(...$args) { $this->_returnQueue = $args; + return $this; } + /** + * Sets up a closure to return the nth argument from the expected method call + * + * @param int $index + * + * @return self + */ + public function andReturnArg($index) + { + if (! is_int($index) || $index < 0) { + throw new InvalidArgumentException( + 'Invalid argument index supplied. Index must be a non-negative integer.' + ); + } + + $closure = static function (...$args) use ($index) { + if (array_key_exists($index, $args)) { + return $args[$index]; + } + + throw new OutOfBoundsException( + 'Cannot return an argument value. No argument exists for the index ' . $index + ); + }; + + $this->_closureQueue = [$closure]; + + return $this; + } + + /** + * @return self + */ + public function andReturnFalse() + { + return $this->andReturn(false); + } + + /** + * Return null. This is merely a language construct for Mock describing. + * + * @return self + */ + public function andReturnNull() + { + return $this->andReturn(null); + } + /** * Set a return value, or sequential queue of return values * * @param mixed ...$args + * * @return self */ public function andReturns(...$args) { - return call_user_func_array([$this, 'andReturn'], $args); + return $this->andReturn(...$args); } /** @@ -537,51 +295,11 @@ class Expectation implements ExpectationInterface } /** - * Set a sequential queue of return values with an array - * - * @param array $values * @return self */ - public function andReturnValues(array $values) + public function andReturnTrue() { - call_user_func_array(array($this, 'andReturn'), $values); - return $this; - } - - /** - * Set a closure or sequence of closures with which to generate return - * values. The arguments passed to the expected method are passed to the - * closures as parameters. - * - * @param callable ...$args - * @return self - */ - public function andReturnUsing(...$args) - { - $this->_closureQueue = $args; - return $this; - } - - /** - * Sets up a closure to return the nth argument from the expected method call - * - * @param int $index - * @return self - */ - public function andReturnArg($index) - { - if (!is_int($index) || $index < 0) { - throw new \InvalidArgumentException("Invalid argument index supplied. Index must be a non-negative integer."); - } - $closure = function (...$args) use ($index) { - if (array_key_exists($index, $args)) { - return $args[$index]; - } - throw new \OutOfBoundsException("Cannot return an argument value. No argument exists for the index $index"); - }; - - $this->_closureQueue = [$closure]; - return $this; + return $this->andReturn(true); } /** @@ -591,152 +309,281 @@ class Expectation implements ExpectationInterface */ public function andReturnUndefined() { - $this->andReturn(new \Mockery\Undefined()); + return $this->andReturn(new Undefined()); + } + + /** + * Set a closure or sequence of closures with which to generate return + * values. The arguments passed to the expected method are passed to the + * closures as parameters. + * + * @param callable ...$args + * + * @return self + */ + public function andReturnUsing(...$args) + { + $this->_closureQueue = $args; + return $this; } /** - * Return null. This is merely a language construct for Mock describing. + * Set a sequential queue of return values with an array * * @return self */ - public function andReturnNull() + public function andReturnValues(array $values) { - return $this->andReturn(null); - } - - public function andReturnFalse() - { - return $this->andReturn(false); - } - - public function andReturnTrue() - { - return $this->andReturn(true); - } - - /** - * Set Exception class and arguments to that class to be thrown - * - * @param string|\Exception $exception - * @param string $message - * @param int $code - * @param \Exception $previous - * @return self - */ - public function andThrow($exception, $message = '', $code = 0, \Exception $previous = null) - { - $this->_throw = true; - if (is_object($exception)) { - $this->andReturn($exception); - } else { - $this->andReturn(new $exception($message, $code, $previous)); - } - return $this; - } - - public function andThrows($exception, $message = '', $code = 0, \Exception $previous = null) - { - return $this->andThrow($exception, $message, $code, $previous); - } - - /** - * Set Exception classes to be thrown - * - * @param array $exceptions - * @return self - */ - public function andThrowExceptions(array $exceptions) - { - $this->_throw = true; - foreach ($exceptions as $exception) { - if (!is_object($exception)) { - throw new Exception('You must pass an array of exception objects to andThrowExceptions'); - } - } - return $this->andReturnValues($exceptions); + return $this->andReturn(...$values); } /** * Register values to be set to a public property each time this expectation occurs * * @param string $name - * @param array ...$values + * @param array ...$values + * * @return self */ public function andSet($name, ...$values) { $this->_setQueue[$name] = $values; + return $this; } + /** + * Set Exception class and arguments to that class to be thrown + * + * @param string|Throwable $exception + * @param string $message + * @param int $code + * + * @return self + */ + public function andThrow($exception, $message = '', $code = 0, ?\Exception $previous = null) + { + $this->_throw = true; + + if (is_object($exception)) { + return $this->andReturn($exception); + } + + return $this->andReturn(new $exception($message, $code, $previous)); + } + + /** + * Set Exception classes to be thrown + * + * @return self + */ + public function andThrowExceptions(array $exceptions) + { + $this->_throw = true; + + foreach ($exceptions as $exception) { + if (! is_object($exception)) { + throw new Exception('You must pass an array of exception objects to andThrowExceptions'); + } + } + + return $this->andReturnValues($exceptions); + } + + public function andThrows($exception, $message = '', $code = 0, ?\Exception $previous = null) + { + return $this->andThrow($exception, $message, $code, $previous); + } + /** * Sets up a closure that will yield each of the provided args * * @param mixed ...$args + * * @return self */ public function andYield(...$args) { - $this->_closureQueue = [ - static function () use ($args) { - foreach ($args as $arg) { - yield $arg; - } - }, - ]; + $closure = static function () use ($args) { + foreach ($args as $arg) { + yield $arg; + } + }; + + $this->_closureQueue = [$closure]; return $this; } /** - * Alias to andSet(). Allows the natural English construct - * - set('foo', 'bar')->andReturn('bar') + * Sets next count validator to the AtLeast instance * - * @param string $name - * @param mixed $value * @return self */ - public function set($name, $value) + public function atLeast() { - return call_user_func_array(array($this, 'andSet'), func_get_args()); + $this->_countValidatorClass = AtLeast::class; + + return $this; } /** - * Indicates this expectation should occur zero or more times + * Sets next count validator to the AtMost instance * * @return self */ - public function zeroOrMoreTimes() + public function atMost() { - $this->atLeast()->never(); + $this->_countValidatorClass = AtMost::class; + + return $this; } /** - * Indicates the number of times this expectation should occur + * Set the exception message + * + * @param string $message + * + * @return $this + */ + public function because($message) + { + $this->_because = $message; + + return $this; + } + + /** + * Shorthand for setting minimum and maximum constraints on call counts + * + * @param int $minimum + * @param int $maximum + */ + public function between($minimum, $maximum) + { + return $this->atLeast()->times($minimum)->atMost()->times($maximum); + } + + /** + * Mark this expectation as being a default * - * @param int $limit - * @throws \InvalidArgumentException * @return self */ - public function times($limit = null) + public function byDefault() { - if (is_null($limit)) { - return $this; - } - if (!is_int($limit)) { - throw new \InvalidArgumentException('The passed Times limit should be an integer value'); - } - $this->_countValidators[$this->_countValidatorClass] = new $this->_countValidatorClass($this, $limit); + $director = $this->_mock->mockery_getExpectationsFor($this->_name); - if ('Mockery\CountValidator\Exact' !== $this->_countValidatorClass) { - $this->_countValidatorClass = 'Mockery\CountValidator\Exact'; - unset($this->_countValidators[$this->_countValidatorClass]); + if ($director instanceof ExpectationDirector) { + $director->makeExpectationDefault($this); } return $this; } + /** + * @return null|string + */ + public function getExceptionMessage() + { + return $this->_because; + } + + /** + * Return the parent mock of the expectation + * + * @return LegacyMockInterface|MockInterface + */ + public function getMock() + { + return $this->_mock; + } + + public function getName() + { + return $this->_name; + } + + /** + * Return order number + * + * @return int + */ + public function getOrderNumber() + { + return $this->_orderNumber; + } + + /** + * Indicates call order should apply globally + * + * @return self + */ + public function globally() + { + $this->_globally = true; + + return $this; + } + + /** + * Check if there is a constraint on call count + * + * @return bool + */ + public function isCallCountConstrained() + { + return $this->_countValidators !== []; + } + + /** + * Checks if this expectation is eligible for additional calls + * + * @return bool + */ + public function isEligible() + { + foreach ($this->_countValidators as $validator) { + if (! $validator->isEligible($this->_actualCount)) { + return false; + } + } + + return true; + } + + /** + * Check if passed arguments match an argument expectation + * + * @return bool + */ + public function matchArgs(array $args) + { + if ($this->isArgumentListMatcher()) { + return $this->_matchArg($this->_expectedArgs[0], $args); + } + + $argCount = count($args); + + $expectedArgsCount = count($this->_expectedArgs); + + if ($argCount === $expectedArgsCount) { + return $this->_matchArgs($args); + } + + $lastExpectedArgument = $this->_expectedArgs[$expectedArgsCount - 1]; + + if ($lastExpectedArgument instanceof AndAnyOtherArgs) { + $firstCorrespondingKey = array_search($lastExpectedArgument, $this->_expectedArgs, true); + + $args = array_slice($args, 0, $firstCorrespondingKey); + + return $this->_matchArgs($args); + } + + return false; + } + /** * Indicates that this expectation is never expected to be called * @@ -757,6 +604,100 @@ class Expectation implements ExpectationInterface return $this->times(1); } + /** + * Indicates that this expectation must be called in a specific given order + * + * @param string $group Name of the ordered group + * + * @return self + */ + public function ordered($group = null) + { + if ($this->_globally) { + $this->_globalOrderNumber = $this->_defineOrdered($group, $this->_mock->mockery_getContainer()); + } else { + $this->_orderNumber = $this->_defineOrdered($group, $this->_mock); + } + + $this->_globally = false; + + return $this; + } + + /** + * Flag this expectation as calling the original class method with + * the provided arguments instead of using a return value queue. + * + * @return self + */ + public function passthru() + { + if ($this->_mock instanceof Mock) { + throw new Exception( + 'Mock Objects not created from a loaded/existing class are incapable of passing method calls through to a parent class' + ); + } + + $this->_passthru = true; + + return $this; + } + + /** + * Alias to andSet(). Allows the natural English construct + * - set('foo', 'bar')->andReturn('bar') + * + * @param string $name + * @param mixed $value + * + * @return self + */ + public function set($name, $value) + { + return $this->andSet(...func_get_args()); + } + + /** + * Indicates the number of times this expectation should occur + * + * @param int $limit + * + * @throws InvalidArgumentException + * + * @return self + */ + public function times($limit = null) + { + if ($limit === null) { + return $this; + } + + if (! is_int($limit)) { + throw new InvalidArgumentException('The passed Times limit should be an integer value'); + } + + if ($this->_expectedCount === 0) { + @trigger_error(self::ERROR_ZERO_INVOCATION, E_USER_DEPRECATED); + // throw new \InvalidArgumentException(self::ERROR_ZERO_INVOCATION); + } + + if ($limit === 0) { + $this->_countValidators = []; + } + + $this->_expectedCount = $limit; + + $this->_countValidators[$this->_countValidatorClass] = new $this->_countValidatorClass($this, $limit); + + if ($this->_countValidatorClass !== Exact::class) { + $this->_countValidatorClass = Exact::class; + + unset($this->_countValidators[$this->_countValidatorClass]); + } + + return $this; + } + /** * Indicates that this expectation is expected exactly twice * @@ -768,173 +709,377 @@ class Expectation implements ExpectationInterface } /** - * Sets next count validator to the AtLeast instance + * Verify call order * - * @return self + * @return void */ - public function atLeast() + public function validateOrder() { - $this->_countValidatorClass = 'Mockery\CountValidator\AtLeast'; - return $this; - } - - /** - * Sets next count validator to the AtMost instance - * - * @return self - */ - public function atMost() - { - $this->_countValidatorClass = 'Mockery\CountValidator\AtMost'; - return $this; - } - - /** - * Shorthand for setting minimum and maximum constraints on call counts - * - * @param int $minimum - * @param int $maximum - */ - public function between($minimum, $maximum) - { - return $this->atLeast()->times($minimum)->atMost()->times($maximum); - } - - - /** - * Set the exception message - * - * @param string $message - * @return $this - */ - public function because($message) - { - $this->_because = $message; - return $this; - } - - /** - * Indicates that this expectation must be called in a specific given order - * - * @param string $group Name of the ordered group - * @return self - */ - public function ordered($group = null) - { - if ($this->_globally) { - $this->_globalOrderNumber = $this->_defineOrdered($group, $this->_mock->mockery_getContainer()); - } else { - $this->_orderNumber = $this->_defineOrdered($group, $this->_mock); + if ($this->_orderNumber) { + $this->_mock->mockery_validateOrder((string) $this, $this->_orderNumber, $this->_mock); } - $this->_globally = false; + + if ($this->_globalOrderNumber) { + $this->_mock->mockery_getContainer()->mockery_validateOrder( + (string) $this, + $this->_globalOrderNumber, + $this->_mock + ); + } + } + + /** + * Verify this expectation + * + * @return void + */ + public function verify() + { + foreach ($this->_countValidators as $validator) { + $validator->validate($this->_actualCount); + } + } + + /** + * Verify the current call, i.e. that the given arguments match those + * of this expectation + * + * @throws Throwable + * + * @return mixed + */ + public function verifyCall(array $args) + { + $this->validateOrder(); + + ++$this->_actualCount; + + if ($this->_passthru === true) { + return $this->_mock->mockery_callSubjectMethod($this->_name, $args); + } + + $return = $this->_getReturnValue($args); + + $this->throwAsNecessary($return); + + $this->_setValues(); + + return $return; + } + + /** + * Expected argument setter for the expectation + * + * @param mixed ...$args + * + * @return self + */ + public function with(...$args) + { + return $this->withArgs($args); + } + + /** + * Set expectation that any arguments are acceptable + * + * @return self + */ + public function withAnyArgs() + { + $this->_expectedArgs = [new AnyArgs()]; + return $this; } /** - * Indicates call order should apply globally + * Expected arguments for the expectation passed as an array or a closure that matches each passed argument on + * each function call. + * + * @param array|Closure $argsOrClosure * * @return self */ - public function globally() + public function withArgs($argsOrClosure) { - $this->_globally = true; + if (is_array($argsOrClosure)) { + return $this->withArgsInArray($argsOrClosure); + } + + if ($argsOrClosure instanceof Closure) { + return $this->withArgsMatchedByClosure($argsOrClosure); + } + + throw new InvalidArgumentException(sprintf( + 'Call to %s with an invalid argument (%s), only array and closure are allowed', + __METHOD__, + $argsOrClosure + )); + } + + /** + * Set with() as no arguments expected + * + * @return self + */ + public function withNoArgs() + { + $this->_expectedArgs = [new NoArgs()]; + return $this; } + /** + * Expected arguments should partially match the real arguments + * + * @param mixed ...$expectedArgs + * + * @return self + */ + public function withSomeOfArgs(...$expectedArgs) + { + return $this->withArgs(static function (...$args) use ($expectedArgs): bool { + foreach ($expectedArgs as $expectedArg) { + if (! in_array($expectedArg, $args, true)) { + return false; + } + } + + return true; + }); + } + + /** + * Indicates this expectation should occur zero or more times + * + * @return self + */ + public function zeroOrMoreTimes() + { + return $this->atLeast()->never(); + } + /** * Setup the ordering tracking on the mock or mock container * * @param string $group * @param object $ordering + * * @return int */ protected function _defineOrdered($group, $ordering) { $groups = $ordering->mockery_getGroups(); - if (is_null($group)) { - $result = $ordering->mockery_allocateOrder(); - } elseif (isset($groups[$group])) { - $result = $groups[$group]; - } else { - $result = $ordering->mockery_allocateOrder(); - $ordering->mockery_setGroup($group, $result); + if ($group === null) { + return $ordering->mockery_allocateOrder(); } + + if (array_key_exists($group, $groups)) { + return $groups[$group]; + } + + $result = $ordering->mockery_allocateOrder(); + + $ordering->mockery_setGroup($group, $result); + return $result; } /** - * Return order number + * Fetch the return value for the matching args * - * @return int + * @return mixed */ - public function getOrderNumber() + protected function _getReturnValue(array $args) { - return $this->_orderNumber; + $closureQueueCount = count($this->_closureQueue); + + if ($closureQueueCount > 1) { + return array_shift($this->_closureQueue)(...$args); + } + + if ($closureQueueCount > 0) { + return current($this->_closureQueue)(...$args); + } + + $returnQueueCount = count($this->_returnQueue); + + if ($returnQueueCount > 1) { + return array_shift($this->_returnQueue); + } + + if ($returnQueueCount > 0) { + return current($this->_returnQueue); + } + + return $this->_mock->mockery_returnValueForMethod($this->_name); } /** - * Mark this expectation as being a default + * Check if passed argument matches an argument expectation + * + * @param mixed $expected + * @param mixed $actual + * + * @return bool + */ + protected function _matchArg($expected, &$actual) + { + if ($expected === $actual) { + return true; + } + + if ($expected instanceof MatcherInterface) { + return $expected->match($actual); + } + + if ($expected instanceof Constraint) { + return (bool) $expected->evaluate($actual, '', true); + } + + if ($expected instanceof Matcher || $expected instanceof Hamcrest_Matcher) { + @trigger_error('Hamcrest package has been deprecated and will be removed in 2.0', E_USER_DEPRECATED); + + return $expected->matches($actual); + } + + if (is_object($expected)) { + $matcher = Mockery::getConfiguration()->getDefaultMatcher(get_class($expected)); + + return $matcher === null ? false : $this->_matchArg(new $matcher($expected), $actual); + } + + if (is_object($actual) && is_string($expected) && $actual instanceof $expected) { + return true; + } + + return $expected == $actual; + } + + /** + * Check if the passed arguments match the expectations, one by one. + * + * @param array $args + * + * @return bool + */ + protected function _matchArgs($args) + { + for ($index = 0, $argCount = count($args); $index < $argCount; ++$index) { + $param = &$args[$index]; + + if (! $this->_matchArg($this->_expectedArgs[$index], $param)) { + return false; + } + } + + return true; + } + + /** + * Sets public properties with queued values to the mock object + * + * @return void + */ + protected function _setValues() + { + $mockClass = get_class($this->_mock); + + $container = $this->_mock->mockery_getContainer(); + + $mocks = $container->getMocks(); + + foreach ($this->_setQueue as $name => &$values) { + if ($values === []) { + continue; + } + + $value = array_shift($values); + + $this->_mock->{$name} = $value; + + foreach ($mocks as $mock) { + if (! $mock instanceof $mockClass) { + continue; + } + + if (! $mock->mockery_isInstance()) { + continue; + } + + $mock->{$name} = $value; + } + } + } + + /** + * @template TExpectedArg + * + * @param TExpectedArg $expectedArg + * + * @return bool + */ + private function isAndAnyOtherArgumentsMatcher($expectedArg) + { + return $expectedArg instanceof AndAnyOtherArgs; + } + + /** + * Check if the registered expectation is an ArgumentListMatcher + * + * @return bool + */ + private function isArgumentListMatcher() + { + return $this->_expectedArgs !== [] && $this->_expectedArgs[0] instanceof ArgumentListMatcher; + } + + /** + * Throws an exception if the expectation has been configured to do so + * + * @param Throwable $return + * + * @throws Throwable + * + * @return void + */ + private function throwAsNecessary($return) + { + if (! $this->_throw) { + return; + } + + if (! $return instanceof Throwable) { + return; + } + + throw $return; + } + + /** + * Expected arguments for the expectation passed as an array * * @return self */ - public function byDefault() + private function withArgsInArray(array $arguments) { - $director = $this->_mock->mockery_getExpectationsFor($this->_name); - if (!empty($director)) { - $director->makeExpectationDefault($this); + if ($arguments === []) { + return $this->withNoArgs(); } + + $this->_expectedArgs = $arguments; + return $this; } /** - * Return the parent mock of the expectation - * - * @return \Mockery\LegacyMockInterface|\Mockery\MockInterface - */ - public function getMock() - { - return $this->_mock; - } - - /** - * Flag this expectation as calling the original class method with the - * any provided arguments instead of using a return value queue. + * Expected arguments have to be matched by the given closure. * * @return self */ - public function passthru() + private function withArgsMatchedByClosure(Closure $closure) { - if ($this->_mock instanceof Mock) { - throw new Exception( - 'Mock Objects not created from a loaded/existing class are ' - . 'incapable of passing method calls through to a parent class' - ); - } - $this->_passthru = true; + $this->_expectedArgs = [new MultiArgumentClosure($closure)]; + return $this; } - - /** - * Cloning logic - * - */ - public function __clone() - { - $newValidators = array(); - $countValidators = $this->_countValidators; - foreach ($countValidators as $validator) { - $newValidators[] = clone $validator; - } - $this->_countValidators = $newValidators; - } - - public function getName() - { - return $this->_name; - } - - public function getExceptionMessage() - { - return $this->_because; - } } diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php index 1310c1b3..286268b8 100644 --- a/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php +++ b/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php @@ -1,47 +1,39 @@ */ - protected $_name = null; - - /** - * Mock object the director is attached to - * - * @var \Mockery\MockInterface|\Mockery\LegacyMockInterface - */ - protected $_mock = null; + protected $_defaults = []; /** * Stores an array of all expectations for this mock * - * @var array + * @var list */ - protected $_expectations = array(); + protected $_expectations = []; /** * The expected order of next call @@ -51,19 +43,25 @@ class ExpectationDirector protected $_expectedOrder = null; /** - * Stores an array of all default expectations for this mock + * Mock object the director is attached to * - * @var array + * @var LegacyMockInterface|MockInterface */ - protected $_defaults = array(); + protected $_mock = null; + + /** + * Method name the director is directing + * + * @var string + */ + protected $_name = null; /** * Constructor * * @param string $name - * @param \Mockery\LegacyMockInterface $mock */ - public function __construct($name, \Mockery\LegacyMockInterface $mock) + public function __construct($name, LegacyMockInterface $mock) { $this->_name = $name; $this->_mock = $mock; @@ -71,10 +69,8 @@ class ExpectationDirector /** * Add a new expectation to the director - * - * @param \Mockery\Expectation $expectation */ - public function addExpectation(\Mockery\Expectation $expectation) + public function addExpectation(Expectation $expectation) { $this->_expectations[] = $expectation; } @@ -82,124 +78,56 @@ class ExpectationDirector /** * Handle a method call being directed by this instance * - * @param array $args * @return mixed */ public function call(array $args) { $expectation = $this->findExpectation($args); - if (is_null($expectation)) { - $exception = new \Mockery\Exception\NoMatchingExpectationException( - 'No matching handler found for ' - . $this->_mock->mockery_getName() . '::' - . \Mockery::formatArgs($this->_name, $args) - . '. Either the method was unexpected or its arguments matched' - . ' no expected argument list for this method' - . PHP_EOL . PHP_EOL - . \Mockery::formatObjects($args) - ); - $exception->setMock($this->_mock) - ->setMethodName($this->_name) - ->setActualArguments($args); - throw $exception; + if ($expectation !== null) { + return $expectation->verifyCall($args); } - return $expectation->verifyCall($args); - } - /** - * Verify all expectations of the director - * - * @throws \Mockery\CountValidator\Exception - * @return void - */ - public function verify() - { - if (!empty($this->_expectations)) { - foreach ($this->_expectations as $exp) { - $exp->verify(); - } - } else { - foreach ($this->_defaults as $exp) { - $exp->verify(); - } - } + $exception = new NoMatchingExpectationException( + 'No matching handler found for ' + . $this->_mock->mockery_getName() . '::' + . Mockery::formatArgs($this->_name, $args) + . '. Either the method was unexpected or its arguments matched' + . ' no expected argument list for this method' + . PHP_EOL . PHP_EOL + . Mockery::formatObjects($args) + ); + + $exception->setMock($this->_mock) + ->setMethodName($this->_name) + ->setActualArguments($args); + + throw $exception; } /** * Attempt to locate an expectation matching the provided args * - * @param array $args * @return mixed */ public function findExpectation(array $args) { $expectation = null; - if (!empty($this->_expectations)) { + if ($this->_expectations !== []) { $expectation = $this->_findExpectationIn($this->_expectations, $args); } - if ($expectation === null && !empty($this->_defaults)) { - $expectation = $this->_findExpectationIn($this->_defaults, $args); + if ($expectation === null && $this->_defaults !== []) { + return $this->_findExpectationIn($this->_defaults, $args); } return $expectation; } - /** - * Make the given expectation a default for all others assuming it was - * correctly created last - * - * @param \Mockery\Expectation $expectation - */ - public function makeExpectationDefault(\Mockery\Expectation $expectation) - { - $last = end($this->_expectations); - if ($last === $expectation) { - array_pop($this->_expectations); - array_unshift($this->_defaults, $expectation); - } else { - throw new \Mockery\Exception( - 'Cannot turn a previously defined expectation into a default' - ); - } - } - - /** - * Search current array of expectations for a match - * - * @param array $expectations - * @param array $args - * @return mixed - */ - protected function _findExpectationIn(array $expectations, array $args) - { - foreach ($expectations as $exp) { - if ($exp->isEligible() && $exp->matchArgs($args)) { - return $exp; - } - } - foreach ($expectations as $exp) { - if ($exp->matchArgs($args)) { - return $exp; - } - } - } - /** * Return all expectations assigned to this director * - * @return array - */ - public function getExpectations() - { - return $this->_expectations; - } - - /** - * Return all expectations assigned to this director - * - * @return array + * @return array */ public function getDefaultExpectations() { @@ -213,6 +141,102 @@ class ExpectationDirector */ public function getExpectationCount() { - return count($this->getExpectations()) ?: count($this->getDefaultExpectations()); + $count = 0; + + $expectations = $this->getExpectations(); + + if ($expectations === []) { + $expectations = $this->getDefaultExpectations(); + } + + foreach ($expectations as $expectation) { + if ($expectation->isCallCountConstrained()) { + ++$count; + } + } + + return $count; + } + + /** + * Return all expectations assigned to this director + * + * @return array + */ + public function getExpectations() + { + return $this->_expectations; + } + + /** + * Make the given expectation a default for all others assuming it was correctly created last + * + * @throws Exception + * + * @return void + */ + public function makeExpectationDefault(Expectation $expectation) + { + if (end($this->_expectations) === $expectation) { + array_pop($this->_expectations); + + array_unshift($this->_defaults, $expectation); + + return; + } + + throw new Exception('Cannot turn a previously defined expectation into a default'); + } + + /** + * Verify all expectations of the director + * + * @throws Exception + * + * @return void + */ + public function verify() + { + if ($this->_expectations !== []) { + foreach ($this->_expectations as $expectation) { + $expectation->verify(); + } + + return; + } + + foreach ($this->_defaults as $expectation) { + $expectation->verify(); + } + } + + /** + * Search current array of expectations for a match + * + * @param array $expectations + * + * @return null|ExpectationInterface + */ + protected function _findExpectationIn(array $expectations, array $args) + { + foreach ($expectations as $expectation) { + if (! $expectation->isEligible()) { + continue; + } + + if (! $expectation->matchArgs($args)) { + continue; + } + + return $expectation; + } + + foreach ($expectations as $expectation) { + if ($expectation->matchArgs($args)) { + return $expectation; + } + } + + return null; } } diff --git a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php index f1295ad3..29c27d3a 100644 --- a/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php +++ b/vendor/mockery/mockery/library/Mockery/ExpectationInterface.php @@ -1,22 +1,11 @@ + */ + protected $cache = []; + + /** + * @var Generator + */ protected $generator; - protected $cache = array(); public function __construct(Generator $generator) { $this->generator = $generator; } + /** + * @return string + */ public function generate(MockConfiguration $config) { $hash = $config->getHash(); - if (isset($this->cache[$hash])) { + + if (array_key_exists($hash, $this->cache)) { return $this->cache[$hash]; } - $definition = $this->generator->generate($config); - $this->cache[$hash] = $definition; - - return $definition; + return $this->cache[$hash] = $this->generator->generate($config); } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php index 7463f1d1..f2a3f327 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/DefinedTargetClass.php @@ -1,96 +1,140 @@ rfc = $rfc; - $this->name = $alias === null ? $rfc->getName() : $alias; + $this->name = $alias ?? $rfc->getName(); } + /** + * @return class-string + */ + public function __toString() + { + return $this->name; + } + + /** + * @param class-string $name + * @param class-string|null $alias + * @return self + */ public static function factory($name, $alias = null) { - return new self(new \ReflectionClass($name), $alias); + return new self(new ReflectionClass($name), $alias); } + /** + * @return list + */ + public function getAttributes() + { + if (PHP_VERSION_ID < 80000) { + return []; + } + + return array_unique( + array_merge( + ['\AllowDynamicProperties'], + array_map( + static function (ReflectionAttribute $attribute): string { + return '\\' . $attribute->getName(); + }, + $this->rfc->getAttributes() + ) + ) + ); + } + + /** + * @return array + */ + public function getInterfaces() + { + return array_map( + static function (ReflectionClass $interface): self { + return new self($interface); + }, + $this->rfc->getInterfaces() + ); + } + + /** + * @return list + */ + public function getMethods() + { + return array_map( + static function (ReflectionMethod $method): Method { + return new Method($method); + }, + $this->rfc->getMethods() + ); + } + + /** + * @return class-string + */ public function getName() { return $this->name; } - public function isAbstract() - { - return $this->rfc->isAbstract(); - } - - public function isFinal() - { - return $this->rfc->isFinal(); - } - - public function getMethods() - { - return array_map(function ($method) { - return new Method($method); - }, $this->rfc->getMethods()); - } - - public function getInterfaces() - { - $class = __CLASS__; - return array_map(function ($interface) use ($class) { - return new $class($interface); - }, $this->rfc->getInterfaces()); - } - - public function __toString() - { - return $this->getName(); - } - + /** + * @return string + */ public function getNamespaceName() { return $this->rfc->getNamespaceName(); } - public function inNamespace() - { - return $this->rfc->inNamespace(); - } - + /** + * @return string + */ public function getShortName() { return $this->rfc->getShortName(); } - public function implementsInterface($interface) - { - return $this->rfc->implementsInterface($interface); - } - + /** + * @return bool + */ public function hasInternalAncestor() { if ($this->rfc->isInternal()) { @@ -102,9 +146,43 @@ class DefinedTargetClass implements TargetClassInterface if ($parent->isInternal()) { return true; } + $child = $parent; } return false; } + + /** + * @param class-string $interface + * @return bool + */ + public function implementsInterface($interface) + { + return $this->rfc->implementsInterface($interface); + } + + /** + * @return bool + */ + public function inNamespace() + { + return $this->rfc->inNamespace(); + } + + /** + * @return bool + */ + public function isAbstract() + { + return $this->rfc->isAbstract(); + } + + /** + * @return bool + */ + public function isFinal() + { + return $this->rfc->isFinal(); + } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php index 459a93cc..9dc59c83 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/Generator.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/Generator.php @@ -1,27 +1,19 @@ method = $method; } + /** + * @template TArgs + * @template TMixed + * + * @param string $method + * @param array $args + * + * @return TMixed + */ public function __call($method, $args) { - return call_user_func_array(array($this->method, $method), $args); + /** @var TMixed */ + return $this->method->{$method}(...$args); } /** - * @return Parameter[] + * @return list */ public function getParameters() { - return array_map(function (\ReflectionParameter $parameter) { + return array_map(static function (ReflectionParameter $parameter) { return new Parameter($parameter); }, $this->method->getParameters()); } /** - * @return string|null + * @return null|string */ public function getReturnType() { diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php index 05903e5b..1849c3e2 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfiguration.php @@ -1,25 +1,39 @@ */ - protected $targetClass; - protected $targetClassName; - - /** - * A number of interfaces we'd like to mock, keyed by name to attempt to - * keep unique - */ - protected $targetInterfaces = array(); - protected $targetInterfaceNames = array(); - - /** - * A number of traits we'd like to mock, keyed by name to attempt to - * keep unique - */ - protected $targetTraits = array(); - protected $targetTraitNames = array(); - - /** - * An object we'd like our mock to proxy to - */ - protected $targetObject; - - /** - * The class name we'd like to use for a generated mock - */ - protected $name; + protected $allMethods = []; /** * Methods that should specifically not be mocked * - * This is currently populated with stuff we don't know how to deal with, - * should really be somewhere else + * This is currently populated with stuff we don't know how to deal with, should really be somewhere else */ - protected $blackListedMethods = array(); + protected $blackListedMethods = []; + + protected $constantsMap = []; /** - * If not empty, only these methods will be mocked - */ - protected $whiteListedMethods = array(); - - /** - * An instance mock is where we override the original class before it's - * autoloaded + * An instance mock is where we override the original class before it's autoloaded + * + * @var bool */ protected $instanceMock = false; - /** - * Param overrides - */ - protected $parameterOverrides = array(); - - /** - * Instance cache of all methods - */ - protected $allMethods; - /** * If true, overrides original class destructor + * + * @var bool */ protected $mockOriginalDestructor = false; - protected $constantsMap = array(); + /** + * The class name we'd like to use for a generated mock + * + * @var string|null + */ + protected $name; + /** + * Param overrides + * + * @var array + */ + protected $parameterOverrides = []; + + /** + * A class that we'd like to mock + * @var TargetClassInterface|null + */ + protected $targetClass; + + /** + * @var class-string|null + */ + protected $targetClassName; + + /** + * @var array + */ + protected $targetInterfaceNames = []; + + /** + * A number of interfaces we'd like to mock, keyed by name to attempt to keep unique + * + * @var array + */ + protected $targetInterfaces = []; + + /** + * An object we'd like our mock to proxy to + * + * @var object|null + */ + protected $targetObject; + + /** + * @var array + */ + protected $targetTraitNames = []; + + /** + * A number of traits we'd like to mock, keyed by name to attempt to keep unique + * + * @var array + */ + protected $targetTraits = []; + + /** + * If not empty, only these methods will be mocked + * + * @var array + */ + protected $whiteListedMethods = []; + + /** + * @param array $targets + * @param array $blackListedMethods + * @param array $whiteListedMethods + * @param string|null $name + * @param bool $instanceMock + * @param array $parameterOverrides + * @param bool $mockOriginalDestructor + * @param array|scalar> $constantsMap + */ public function __construct( - array $targets = array(), - array $blackListedMethods = array(), - array $whiteListedMethods = array(), + array $targets = [], + array $blackListedMethods = [], + array $whiteListedMethods = [], $name = null, $instanceMock = false, - array $parameterOverrides = array(), + array $parameterOverrides = [], $mockOriginalDestructor = false, - array $constantsMap = array() + array $constantsMap = [] ) { $this->addTargets($targets); $this->blackListedMethods = $blackListedMethods; @@ -112,6 +163,52 @@ class MockConfiguration $this->constantsMap = $constantsMap; } + /** + * Generate a suitable name based on the config + * + * @return string + */ + public function generateName() + { + $nameBuilder = new MockNameBuilder(); + + $targetObject = $this->getTargetObject(); + if ($targetObject !== null) { + $className = get_class($targetObject); + + $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); + } + + $targetClass = $this->getTargetClass(); + if ($targetClass instanceof TargetClassInterface) { + $className = $targetClass->getName(); + + $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); + } + + foreach ($this->getTargetInterfaces() as $targetInterface) { + $nameBuilder->addPart($targetInterface->getName()); + } + + return $nameBuilder->build(); + } + + /** + * @return array + */ + public function getBlackListedMethods() + { + return $this->blackListedMethods; + } + + /** + * @return array> + */ + public function getConstantsMap() + { + return $this->constantsMap; + } + /** * Attempt to create a hash of the configuration, in order to allow caching * @@ -121,25 +218,26 @@ class MockConfiguration */ public function getHash() { - $vars = array( - 'targetClassName' => $this->targetClassName, - 'targetInterfaceNames' => $this->targetInterfaceNames, - 'targetTraitNames' => $this->targetTraitNames, - 'name' => $this->name, - 'blackListedMethods' => $this->blackListedMethods, - 'whiteListedMethod' => $this->whiteListedMethods, - 'instanceMock' => $this->instanceMock, - 'parameterOverrides' => $this->parameterOverrides, - 'mockOriginalDestructor' => $this->mockOriginalDestructor - ); + $vars = [ + 'targetClassName' => $this->targetClassName, + 'targetInterfaceNames' => $this->targetInterfaceNames, + 'targetTraitNames' => $this->targetTraitNames, + 'name' => $this->name, + 'blackListedMethods' => $this->blackListedMethods, + 'whiteListedMethod' => $this->whiteListedMethods, + 'instanceMock' => $this->instanceMock, + 'parameterOverrides' => $this->parameterOverrides, + 'mockOriginalDestructor' => $this->mockOriginalDestructor, + ]; return md5(serialize($vars)); } /** - * Gets a list of methods from the classes, interfaces and objects and - * filters them appropriately. Lot's of filtering going on, perhaps we could - * have filter classes to iterate through + * Gets a list of methods from the classes, interfaces and objects and filters them appropriately. + * Lot's of filtering going on, perhaps we could have filter classes to iterate through + * + * @return list */ public function getMethodsToMock() { @@ -154,22 +252,28 @@ class MockConfiguration /** * Whitelist trumps everything else */ - if (count($this->getWhiteListedMethods())) { - $whitelist = array_map('strtolower', $this->getWhiteListedMethods()); - $methods = array_filter($methods, function ($method) use ($whitelist) { - return $method->isAbstract() || in_array(strtolower($method->getName()), $whitelist); - }); + $whiteListedMethods = $this->getWhiteListedMethods(); + if ($whiteListedMethods !== []) { + $whitelist = array_map('strtolower', $whiteListedMethods); - return $methods; + return array_filter($methods, static function ($method) use ($whitelist) { + if ($method->isAbstract()) { + return true; + } + + return in_array(strtolower($method->getName()), $whitelist, true); + }); } /** * Remove blacklisted methods */ - if (count($this->getBlackListedMethods())) { - $blacklist = array_map('strtolower', $this->getBlackListedMethods()); - $methods = array_filter($methods, function ($method) use ($blacklist) { - return !in_array(strtolower($method->getName()), $blacklist); + $blackListedMethods = $this->getBlackListedMethods(); + if ($blackListedMethods !== []) { + $blacklist = array_map('strtolower', $blackListedMethods); + + $methods = array_filter($methods, static function ($method) use ($blacklist) { + return ! in_array(strtolower($method->getName()), $blacklist, true); }); } @@ -179,11 +283,15 @@ class MockConfiguration * such, we can't mock it and will need a pass to add a dummy * implementation */ - if ($this->getTargetClass() - && $this->getTargetClass()->implementsInterface("Serializable") - && $this->getTargetClass()->hasInternalAncestor()) { - $methods = array_filter($methods, function ($method) { - return $method->getName() !== "unserialize"; + $targetClass = $this->getTargetClass(); + + if ( + $targetClass !== null + && $targetClass->implementsInterface(Serializable::class) + && $targetClass->hasInternalAncestor() + ) { + $methods = array_filter($methods, static function ($method) { + return $method->getName() !== 'unserialize'; }); } @@ -191,40 +299,213 @@ class MockConfiguration } /** - * We declare the __call method to handle undefined stuff, if the class - * we're mocking has also defined it, we need to comply with their interface + * @return string|null */ - public function requiresCallTypeHintRemoval() + public function getName() { - foreach ($this->getAllMethods() as $method) { - if ("__call" === $method->getName()) { - $params = $method->getParameters(); - return !$params[1]->isArray(); - } - } - - return false; + return $this->name; } /** - * We declare the __callStatic method to handle undefined stuff, if the class - * we're mocking has also defined it, we need to comply with their interface + * @return string */ - public function requiresCallStaticTypeHintRemoval() + public function getNamespaceName() { - foreach ($this->getAllMethods() as $method) { - if ("__callStatic" === $method->getName()) { - $params = $method->getParameters(); - return !$params[1]->isArray(); + $parts = explode('\\', $this->getName()); + array_pop($parts); + + if ($parts !== []) { + return implode('\\', $parts); + } + + return ''; + } + + /** + * @return array + */ + public function getParameterOverrides() + { + return $this->parameterOverrides; + } + + /** + * @return string + */ + public function getShortName() + { + $parts = explode('\\', $this->getName()); + return array_pop($parts); + } + + /** + * @return null|TargetClassInterface + */ + public function getTargetClass() + { + if ($this->targetClass) { + return $this->targetClass; + } + + if (! $this->targetClassName) { + return null; + } + + if (class_exists($this->targetClassName)) { + $alias = null; + if (strpos($this->targetClassName, '@') !== false) { + $alias = (new MockNameBuilder()) + ->addPart('anonymous_class') + ->addPart(md5($this->targetClassName)) + ->build(); + class_alias($this->targetClassName, $alias); + } + + $dtc = DefinedTargetClass::factory($this->targetClassName, $alias); + + if ($this->getTargetObject() === null && $dtc->isFinal()) { + throw new Exception( + 'The class ' . $this->targetClassName . ' is marked final and its methods' + . ' cannot be replaced. Classes marked final can be passed in' + . ' to \Mockery::mock() as instantiated objects to create a' + . ' partial mock, but only if the mock is not subject to type' + . ' hinting checks.' + ); + } + + $this->targetClass = $dtc; + } else { + $this->targetClass = UndefinedTargetClass::factory($this->targetClassName); + } + + return $this->targetClass; + } + + /** + * @return class-string|null + */ + public function getTargetClassName() + { + return $this->targetClassName; + } + + /** + * @return list + */ + public function getTargetInterfaces() + { + if ($this->targetInterfaces !== []) { + return $this->targetInterfaces; + } + + foreach ($this->targetInterfaceNames as $targetInterface) { + if (! interface_exists($targetInterface)) { + $this->targetInterfaces[] = UndefinedTargetClass::factory($targetInterface); + continue; + } + + $dtc = DefinedTargetClass::factory($targetInterface); + $extendedInterfaces = array_keys($dtc->getInterfaces()); + $extendedInterfaces[] = $targetInterface; + + $traversableFound = false; + $iteratorShiftedToFront = false; + foreach ($extendedInterfaces as $interface) { + if (! $traversableFound && preg_match('/^\\?Iterator(|Aggregate)$/i', $interface)) { + break; + } + + if (preg_match('/^\\\\?IteratorAggregate$/i', $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\IteratorAggregate'); + $iteratorShiftedToFront = true; + + continue; + } + + if (preg_match('/^\\\\?Iterator$/i', $interface)) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\Iterator'); + $iteratorShiftedToFront = true; + + continue; + } + + if (preg_match('/^\\\\?Traversable$/i', $interface)) { + $traversableFound = true; + } + } + + if ($traversableFound && ! $iteratorShiftedToFront) { + $this->targetInterfaces[] = DefinedTargetClass::factory('\\IteratorAggregate'); + } + + /** + * We never straight up implement Traversable + */ + $isTraversable = preg_match('/^\\\\?Traversable$/i', $targetInterface); + if ($isTraversable === 0 || $isTraversable === false) { + $this->targetInterfaces[] = $dtc; } } - return false; + return $this->targetInterfaces = array_unique($this->targetInterfaces); } + /** + * @return object|null + */ + public function getTargetObject() + { + return $this->targetObject; + } + + /** + * @return list + */ + public function getTargetTraits() + { + if ($this->targetTraits !== []) { + return $this->targetTraits; + } + + foreach ($this->targetTraitNames as $targetTrait) { + $this->targetTraits[] = DefinedTargetClass::factory($targetTrait); + } + + $this->targetTraits = array_unique($this->targetTraits); // just in case + return $this->targetTraits; + } + + /** + * @return array + */ + public function getWhiteListedMethods() + { + return $this->whiteListedMethods; + } + + /** + * @return bool + */ + public function isInstanceMock() + { + return $this->instanceMock; + } + + /** + * @return bool + */ + public function isMockOriginalDestructor() + { + return $this->mockOriginalDestructor; + } + + /** + * @param class-string $className + * @return self + */ public function rename($className) { - $targets = array(); + $targets = []; if ($this->targetClassName) { $targets[] = $this->targetClassName; @@ -254,31 +535,75 @@ class MockConfiguration ); } + /** + * We declare the __callStatic method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + * + * @return bool + */ + public function requiresCallStaticTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ($method->getName() === '__callStatic') { + $params = $method->getParameters(); + + if (! array_key_exists(1, $params)) { + return false; + } + + return ! $params[1]->isArray(); + } + } + + return false; + } + + /** + * We declare the __call method to handle undefined stuff, if the class + * we're mocking has also defined it, we need to comply with their interface + * + * @return bool + */ + public function requiresCallTypeHintRemoval() + { + foreach ($this->getAllMethods() as $method) { + if ($method->getName() === '__call') { + $params = $method->getParameters(); + return ! $params[1]->isArray(); + } + } + + return false; + } + + /** + * @param class-string|object $target + */ protected function addTarget($target) { if (is_object($target)) { $this->setTargetObject($target); $this->setTargetClassName(get_class($target)); - return $this; + return; } - if ($target[0] !== "\\") { - $target = "\\" . $target; + if ($target[0] !== '\\') { + $target = '\\' . $target; } if (class_exists($target)) { $this->setTargetClassName($target); - return $this; + return; } if (interface_exists($target)) { $this->addTargetInterfaceName($target); - return $this; + return; } if (trait_exists($target)) { $this->addTargetTraitName($target); - return $this; + return; } /** @@ -289,12 +614,27 @@ class MockConfiguration */ if ($this->getTargetClassName()) { $this->addTargetInterfaceName($target); - return $this; + return; } $this->setTargetClassName($target); } + /** + * If we attempt to implement Traversable, + * we must ensure we are also implementing either Iterator or IteratorAggregate, + * and that whichever one it is comes before Traversable in the list of implements. + * + * @param class-string $targetInterface + */ + protected function addTargetInterfaceName($targetInterface) + { + $this->targetInterfaceNames[] = $targetInterface; + } + + /** + * @param array $interfaces + */ protected function addTargets($interfaces) { foreach ($interfaces as $interface) { @@ -302,195 +642,17 @@ class MockConfiguration } } - public function getTargetClassName() + /** + * @param class-string $targetTraitName + */ + protected function addTargetTraitName($targetTraitName) { - return $this->targetClassName; - } - - public function getTargetClass() - { - if ($this->targetClass) { - return $this->targetClass; - } - - if (!$this->targetClassName) { - return null; - } - - if (class_exists($this->targetClassName)) { - $alias = null; - if (strpos($this->targetClassName, '@') !== false) { - $alias = (new MockNameBuilder()) - ->addPart('anonymous_class') - ->addPart(md5($this->targetClassName)) - ->build(); - class_alias($this->targetClassName, $alias); - } - $dtc = DefinedTargetClass::factory($this->targetClassName, $alias); - - if ($this->getTargetObject() == false && $dtc->isFinal()) { - throw new \Mockery\Exception( - 'The class ' . $this->targetClassName . ' is marked final and its methods' - . ' cannot be replaced. Classes marked final can be passed in' - . ' to \Mockery::mock() as instantiated objects to create a' - . ' partial mock, but only if the mock is not subject to type' - . ' hinting checks.' - ); - } - - $this->targetClass = $dtc; - } else { - $this->targetClass = UndefinedTargetClass::factory($this->targetClassName); - } - - return $this->targetClass; - } - - public function getTargetTraits() - { - if (!empty($this->targetTraits)) { - return $this->targetTraits; - } - - foreach ($this->targetTraitNames as $targetTrait) { - $this->targetTraits[] = DefinedTargetClass::factory($targetTrait); - } - - $this->targetTraits = array_unique($this->targetTraits); // just in case - return $this->targetTraits; - } - - public function getTargetInterfaces() - { - if (!empty($this->targetInterfaces)) { - return $this->targetInterfaces; - } - - foreach ($this->targetInterfaceNames as $targetInterface) { - if (!interface_exists($targetInterface)) { - $this->targetInterfaces[] = UndefinedTargetClass::factory($targetInterface); - continue; - } - - $dtc = DefinedTargetClass::factory($targetInterface); - $extendedInterfaces = array_keys($dtc->getInterfaces()); - $extendedInterfaces[] = $targetInterface; - - $traversableFound = false; - $iteratorShiftedToFront = false; - foreach ($extendedInterfaces as $interface) { - if (!$traversableFound && preg_match("/^\\?Iterator(|Aggregate)$/i", $interface)) { - break; - } - - if (preg_match("/^\\\\?IteratorAggregate$/i", $interface)) { - $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); - $iteratorShiftedToFront = true; - } elseif (preg_match("/^\\\\?Iterator$/i", $interface)) { - $this->targetInterfaces[] = DefinedTargetClass::factory("\\Iterator"); - $iteratorShiftedToFront = true; - } elseif (preg_match("/^\\\\?Traversable$/i", $interface)) { - $traversableFound = true; - } - } - - if ($traversableFound && !$iteratorShiftedToFront) { - $this->targetInterfaces[] = DefinedTargetClass::factory("\\IteratorAggregate"); - } - - /** - * We never straight up implement Traversable - */ - if (!preg_match("/^\\\\?Traversable$/i", $targetInterface)) { - $this->targetInterfaces[] = $dtc; - } - } - $this->targetInterfaces = array_unique($this->targetInterfaces); // just in case - return $this->targetInterfaces; - } - - public function getTargetObject() - { - return $this->targetObject; - } - - public function getName() - { - return $this->name; + $this->targetTraitNames[] = $targetTraitName; } /** - * Generate a suitable name based on the config + * @return list */ - public function generateName() - { - $nameBuilder = new MockNameBuilder(); - - if ($this->getTargetObject()) { - $className = get_class($this->getTargetObject()); - $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); - } - - if ($this->getTargetClass()) { - $className = $this->getTargetClass()->getName(); - $nameBuilder->addPart(strpos($className, '@') !== false ? md5($className) : $className); - } - - foreach ($this->getTargetInterfaces() as $targetInterface) { - $nameBuilder->addPart($targetInterface->getName()); - } - - return $nameBuilder->build(); - } - - public function getShortName() - { - $parts = explode("\\", $this->getName()); - return array_pop($parts); - } - - public function getNamespaceName() - { - $parts = explode("\\", $this->getName()); - array_pop($parts); - - if (count($parts)) { - return implode("\\", $parts); - } - - return ""; - } - - public function getBlackListedMethods() - { - return $this->blackListedMethods; - } - - public function getWhiteListedMethods() - { - return $this->whiteListedMethods; - } - - public function isInstanceMock() - { - return $this->instanceMock; - } - - public function getParameterOverrides() - { - return $this->parameterOverrides; - } - - public function isMockOriginalDestructor() - { - return $this->mockOriginalDestructor; - } - - protected function setTargetClassName($targetClassName) - { - $this->targetClassName = $targetClassName; - } - protected function getAllMethods() { if ($this->allMethods) { @@ -503,7 +665,7 @@ class MockConfiguration $classes[] = $this->getTargetClass(); } - $methods = array(); + $methods = []; foreach ($classes as $class) { $methods = array_merge($methods, $class->getMethods()); } @@ -516,9 +678,9 @@ class MockConfiguration } } - $names = array(); - $methods = array_filter($methods, function ($method) use (&$names) { - if (in_array($method->getName(), $names)) { + $names = []; + $methods = array_filter($methods, static function ($method) use (&$names) { + if (in_array($method->getName(), $names, true)) { return false; } @@ -530,27 +692,18 @@ class MockConfiguration } /** - * If we attempt to implement Traversable, we must ensure we are also - * implementing either Iterator or IteratorAggregate, and that whichever one - * it is comes before Traversable in the list of implements. + * @param class-string $targetClassName */ - protected function addTargetInterfaceName($targetInterface) + protected function setTargetClassName($targetClassName) { - $this->targetInterfaceNames[] = $targetInterface; - } - - protected function addTargetTraitName($targetTraitName) - { - $this->targetTraitNames[] = $targetTraitName; + $this->targetClassName = $targetClassName; } + /** + * @param object $object + */ protected function setTargetObject($object) { $this->targetObject = $object; } - - public function getConstantsMap() - { - return $this->constantsMap; - } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php index 273b1d8b..989325e3 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockConfigurationBuilder.php @@ -1,29 +1,23 @@ + */ + protected $blackListedMethods = [ '__call', '__callStatic', '__clone', @@ -36,45 +30,101 @@ class MockConfigurationBuilder '__debugInfo', ## mocking this makes it difficult to debug with xdebug // below are reserved words in PHP - "__halt_compiler", "abstract", "and", "array", "as", - "break", "callable", "case", "catch", "class", - "clone", "const", "continue", "declare", "default", - "die", "do", "echo", "else", "elseif", - "empty", "enddeclare", "endfor", "endforeach", "endif", - "endswitch", "endwhile", "eval", "exit", "extends", - "final", "for", "foreach", "function", "global", - "goto", "if", "implements", "include", "include_once", - "instanceof", "insteadof", "interface", "isset", "list", - "namespace", "new", "or", "print", "private", - "protected", "public", "require", "require_once", "return", - "static", "switch", "throw", "trait", "try", - "unset", "use", "var", "while", "xor" - ); - - protected $php7SemiReservedKeywords = [ - "callable", "class", "trait", "extends", "implements", "static", "abstract", "final", - "public", "protected", "private", "const", "enddeclare", "endfor", "endforeach", "endif", - "endwhile", "and", "global", "goto", "instanceof", "insteadof", "interface", "namespace", "new", - "or", "xor", "try", "use", "var", "exit", "list", "clone", "include", "include_once", "throw", - "array", "print", "echo", "require", "require_once", "return", "else", "elseif", "default", - "break", "continue", "switch", "yield", "function", "if", "endswitch", "finally", "for", "foreach", - "declare", "case", "do", "while", "as", "catch", "die", "self", "parent", + '__halt_compiler', 'abstract', 'and', 'array', 'as', + 'break', 'callable', 'case', 'catch', 'class', + 'clone', 'const', 'continue', 'declare', 'default', + 'die', 'do', 'echo', 'else', 'elseif', + 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', + 'endswitch', 'endwhile', 'eval', 'exit', 'extends', + 'final', 'for', 'foreach', 'function', 'global', + 'goto', 'if', 'implements', 'include', 'include_once', + 'instanceof', 'insteadof', 'interface', 'isset', 'list', + 'namespace', 'new', 'or', 'print', 'private', + 'protected', 'public', 'require', 'require_once', 'return', + 'static', 'switch', 'throw', 'trait', 'try', + 'unset', 'use', 'var', 'while', 'xor', ]; - protected $whiteListedMethods = array(); + /** + * @var array + */ + protected $constantsMap = []; + + /** + * @var bool + */ protected $instanceMock = false; - protected $parameterOverrides = array(); + /** + * @var bool + */ protected $mockOriginalDestructor = false; - protected $targets = array(); - protected $constantsMap = array(); + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $parameterOverrides = []; + + /** + * @var list + */ + protected $php7SemiReservedKeywords = [ + 'callable', 'class', 'trait', 'extends', 'implements', 'static', 'abstract', 'final', + 'public', 'protected', 'private', 'const', 'enddeclare', 'endfor', 'endforeach', 'endif', + 'endwhile', 'and', 'global', 'goto', 'instanceof', 'insteadof', 'interface', 'namespace', 'new', + 'or', 'xor', 'try', 'use', 'var', 'exit', 'list', 'clone', 'include', 'include_once', 'throw', + 'array', 'print', 'echo', 'require', 'require_once', 'return', 'else', 'elseif', 'default', + 'break', 'continue', 'switch', 'yield', 'function', 'if', 'endswitch', 'finally', 'for', 'foreach', + 'declare', 'case', 'do', 'while', 'as', 'catch', 'die', 'self', 'parent', + ]; + + /** + * @var array + */ + protected $targets = []; + + /** + * @var array + */ + protected $whiteListedMethods = []; public function __construct() { $this->blackListedMethods = array_diff($this->blackListedMethods, $this->php7SemiReservedKeywords); } + /** + * @param string $blackListedMethod + * @return self + */ + public function addBlackListedMethod($blackListedMethod) + { + $this->blackListedMethods[] = $blackListedMethod; + return $this; + } + + /** + * @param list $blackListedMethods + * @return self + */ + public function addBlackListedMethods(array $blackListedMethods) + { + foreach ($blackListedMethods as $method) { + $this->addBlackListedMethod($method); + } + + return $this; + } + + /** + * @param class-string $target + * @return self + */ public function addTarget($target) { $this->targets[] = $target; @@ -82,6 +132,10 @@ class MockConfigurationBuilder return $this; } + /** + * @param list $targets + * @return self + */ public function addTargets($targets) { foreach ($targets as $target) { @@ -91,73 +145,30 @@ class MockConfigurationBuilder return $this; } - public function setName($name) - { - $this->name = $name; - return $this; - } - - public function addBlackListedMethod($blackListedMethod) - { - $this->blackListedMethods[] = $blackListedMethod; - return $this; - } - - public function addBlackListedMethods(array $blackListedMethods) - { - foreach ($blackListedMethods as $method) { - $this->addBlackListedMethod($method); - } - return $this; - } - - public function setBlackListedMethods(array $blackListedMethods) - { - $this->blackListedMethods = $blackListedMethods; - return $this; - } - + /** + * @return self + */ public function addWhiteListedMethod($whiteListedMethod) { $this->whiteListedMethods[] = $whiteListedMethod; return $this; } + /** + * @return self + */ public function addWhiteListedMethods(array $whiteListedMethods) { foreach ($whiteListedMethods as $method) { $this->addWhiteListedMethod($method); } + return $this; } - public function setWhiteListedMethods(array $whiteListedMethods) - { - $this->whiteListedMethods = $whiteListedMethods; - return $this; - } - - public function setInstanceMock($instanceMock) - { - $this->instanceMock = (bool) $instanceMock; - } - - public function setParameterOverrides(array $overrides) - { - $this->parameterOverrides = $overrides; - } - - public function setMockOriginalDestructor($mockDestructor) - { - $this->mockOriginalDestructor = $mockDestructor; - return $this; - } - - public function setConstantsMap(array $map) - { - $this->constantsMap = $map; - } - + /** + * @return MockConfiguration + */ public function getMockConfiguration() { return new MockConfiguration( @@ -171,4 +182,71 @@ class MockConfigurationBuilder $this->constantsMap ); } + + /** + * @param list $blackListedMethods + * @return self + */ + public function setBlackListedMethods(array $blackListedMethods) + { + $this->blackListedMethods = $blackListedMethods; + return $this; + } + + /** + * @return self + */ + public function setConstantsMap(array $map) + { + $this->constantsMap = $map; + + return $this; + } + + /** + * @param bool $instanceMock + */ + public function setInstanceMock($instanceMock) + { + $this->instanceMock = (bool) $instanceMock; + + return $this; + } + + /** + * @param bool $mockDestructor + */ + public function setMockOriginalDestructor($mockDestructor) + { + $this->mockOriginalDestructor = (bool) $mockDestructor; + return $this; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + return $this; + } + + /** + * @return self + */ + public function setParameterOverrides(array $overrides) + { + $this->parameterOverrides = $overrides; + return $this; + } + + /** + * @param list $whiteListedMethods + * @return self + */ + public function setWhiteListedMethods(array $whiteListedMethods) + { + $this->whiteListedMethods = $whiteListedMethods; + return $this; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php index fd6a9fa2..337c31f6 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockDefinition.php @@ -1,51 +1,64 @@ getName()) { - throw new \InvalidArgumentException("MockConfiguration must contain a name"); + if (! $config->getName()) { + throw new InvalidArgumentException('MockConfiguration must contain a name'); } + $this->config = $config; $this->code = $code; } - public function getConfig() - { - return $this->config; - } - + /** + * @return string + */ public function getClassName() { return $this->config->getName(); } + /** + * @return string + */ public function getCode() { return $this->code; } + + /** + * @return MockConfiguration + */ + public function getConfig() + { + return $this->config; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php index 204308ab..424cdc59 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/MockNameBuilder.php @@ -1,31 +1,33 @@ + */ protected $parts = []; + /** + * @param string $part + */ public function addPart($part) { $this->parts[] = $part; @@ -33,12 +35,15 @@ class MockNameBuilder return $this; } + /** + * @return string + */ public function build() { $parts = ['Mockery', static::$mockCounter++]; foreach ($this->parts as $part) { - $parts[] = str_replace("\\", "_", $part); + $parts[] = str_replace('\\', '_', $part); } return implode('_', $parts); diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php index 70095336..442a713c 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/Parameter.php @@ -1,43 +1,55 @@ rfp = $rfp; } + /** + * Proxy all method calls to the reflection parameter. + * + * @template TMixed + * @template TResult + * + * @param string $method + * @param array $args + * + * @return TResult + */ public function __call($method, array $args) { - return call_user_func_array(array($this->rfp, $method), $args); + /** @var TResult */ + return $this->rfp->{$method}(...$args); } /** @@ -45,7 +57,7 @@ class Parameter * * This will be null if there was no type, or it was a scalar or a union. * - * @return \ReflectionClass|null + * @return null|ReflectionClass * * @deprecated since 1.3.3 and will be removed in 2.0. */ @@ -53,13 +65,31 @@ class Parameter { $typeHint = Reflector::getTypeHint($this->rfp, true); - return \class_exists($typeHint) ? DefinedTargetClass::factory($typeHint, false) : null; + return class_exists($typeHint) ? DefinedTargetClass::factory($typeHint, false) : null; + } + + /** + * Get the name of the parameter. + * + * Some internal classes have funny looking definitions! + * + * @return string + */ + public function getName() + { + $name = $this->rfp->getName(); + + if (! $name || $name === '...') { + return 'arg' . self::$parameterCounter++; + } + + return $name; } /** * Get the string representation for the paramater type. * - * @return string|null + * @return null|string */ public function getTypeHint() { @@ -78,23 +108,6 @@ class Parameter return (string) Reflector::getTypeHint($this->rfp, true); } - /** - * Get the name of the parameter. - * - * Some internal classes have funny looking definitions! - * - * @return string - */ - public function getName() - { - $name = $this->rfp->getName(); - if (!$name || $name == '...') { - $name = 'arg' . self::$parameterCounter++; - } - - return $name; - } - /** * Determine if the parameter is an array. * diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php index 45312573..4a7e2a57 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/AvoidMethodClashPass.php @@ -1,46 +1,39 @@ getName(); }, $config->getMethodsToMock()); - foreach (["allows", "expects"] as $method) { - if (in_array($method, $names)) { - $code = preg_replace( - "#// start method {$method}.*// end method {$method}#ms", - "", - $code - ); + foreach (['allows', 'expects'] as $method) { + if (in_array($method, $names, true)) { + $code = preg_replace(sprintf('#// start method %s.*// end method %s#ms', $method, $method), '', $code); - $code = str_replace(" implements MockInterface", " implements LegacyMockInterface", $code); + $code = str_replace(' implements MockInterface', ' implements LegacyMockInterface', $code); } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php index fd00264c..747fdeee 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/CallTypeHintPass.php @@ -1,29 +1,24 @@ requiresCallTypeHintRemoval()) { @@ -35,7 +30,7 @@ class CallTypeHintPass implements Pass } if ($config->requiresCallStaticTypeHintRemoval()) { - $code = str_replace( + return str_replace( 'public static function __callStatic($method, array $args)', 'public static function __callStatic($method, $args)', $code diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php index b5a31098..0280a064 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassNamePass.php @@ -1,49 +1,35 @@ getNamespaceName(); - $namespace = ltrim($namespace, "\\"); + $namespace = ltrim($namespace, '\\'); $className = $config->getShortName(); - $code = str_replace( - 'namespace Mockery;', - $namespace ? 'namespace ' . $namespace . ';' : '', - $code - ); + $code = str_replace('namespace Mockery;', $namespace !== '' ? 'namespace ' . $namespace . ';' : '', $code); - $code = str_replace( - 'class Mock', - 'class ' . $className, - $code - ); - - return $code; + return str_replace('class Mock', 'class ' . $className, $code); } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php index 1debcbb1..ba4826c6 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php @@ -1,34 +1,32 @@ getTargetClass(); - if (!$target) { + if (! $target) { return $code; } @@ -36,18 +34,16 @@ class ClassPass implements Pass return $code; } - $className = ltrim($target->getName(), "\\"); + $className = ltrim($target->getName(), '\\'); - if (!class_exists($className)) { - \Mockery::declareClass($className); + if (! class_exists($className)) { + Mockery::declareClass($className); } - $code = str_replace( - "implements MockInterface", - "extends \\" . $className . " implements MockInterface", + return str_replace( + 'implements MockInterface', + 'extends \\' . $className . ' implements MockInterface', $code ); - - return $code; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php index df5dd8ce..1088a0de 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ConstantsPass.php @@ -1,33 +1,51 @@ getConstantsMap(); - if (empty($cm)) { + if ($cm === []) { return $code; } - if (!isset($cm[$config->getName()])) { + $name = $config->getName(); + if (! array_key_exists($name, $cm)) { return $code; } - $cm = $cm[$config->getName()]; - $constantsCode = ''; - foreach ($cm as $constant => $value) { + foreach ($cm[$name] as $constant => $value) { $constantsCode .= sprintf("\n const %s = %s;\n", $constant, var_export($value, true)); } - $i = strrpos($code, '}'); - $code = substr_replace($code, $constantsCode, $i); - $code .= "}\n"; + $offset = strrpos($code, '}'); + if ($offset === false) { + return $code; + } - return $code; + return substr_replace($code, $constantsCode, $offset) . '}' . PHP_EOL; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php index 62791475..78adba48 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InstanceMockPass.php @@ -1,30 +1,22 @@ rememberMock(\$this); - + \$this->_mockery_constructorCalled(func_get_args()); } MOCK; + /** + * @param string $code + * @return string + */ public function apply($code, MockConfiguration $config) { if ($config->isInstanceMock()) { - $code = $this->appendToClass($code, static::INSTANCE_MOCK_CODE); + return $this->appendToClass($code, static::INSTANCE_MOCK_CODE); } return $code; @@ -76,8 +72,7 @@ MOCK; protected function appendToClass($class, $code) { - $lastBrace = strrpos($class, "}"); - $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; - return $class; + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php index 982956e5..4eabcb08 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/InterfacePass.php @@ -1,48 +1,41 @@ getTargetInterfaces() as $i) { - $name = ltrim($i->getName(), "\\"); - if (!interface_exists($name)) { - \Mockery::declareInterface($name); + $name = ltrim($i->getName(), '\\'); + if (! interface_exists($name)) { + Mockery::declareInterface($name); } } - $interfaces = array_reduce((array) $config->getTargetInterfaces(), function ($code, $i) { - return $code . ", \\" . ltrim($i->getName(), "\\"); - }, ""); + $interfaces = array_reduce($config->getTargetInterfaces(), static function ($code, $i) { + return $code . ', \\' . ltrim($i->getName(), '\\'); + }, ''); - $code = str_replace( - "implements MockInterface", - "implements MockInterface" . $interfaces, - $code - ); - - return $code; + return str_replace('implements MockInterface', 'implements MockInterface' . $interfaces, $code); } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php index ddcdb0b7..f4191fd8 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MagicMethodTypeHintsPass.php @@ -1,36 +1,36 @@ getMethods(), function (Method $method) { - return in_array($method->getName(), $this->mockMagicMethods); + return in_array($method->getName(), $this->mockMagicMethods, true); }); } + protected function renderTypeHint(Parameter $param) + { + $typeHint = $param->getTypeHint(); + + return $typeHint === null ? '' : sprintf('%s ', $typeHint); + } + /** * Applies type hints of magic methods from * class to the passed code. * * @param int $code - * @param Method $method + * * @return string */ private function applyMagicTypeHints($code, Method $method) { if ($this->isMethodWithinCode($code, $method)) { - $namedParameters = $this->getOriginalParameters( - $code, - $method - ); + $namedParameters = $this->getOriginalParameters($code, $method); $code = preg_replace( $this->getDeclarationRegex($method->getName()), $this->getMethodDeclaration($method, $namedParameters), $code ); } + return $code; } /** - * Checks if the method is declared within code. + * Returns a regex string used to match the + * declaration of some method. * - * @param int $code - * @param Method $method - * @return boolean - */ - private function isMethodWithinCode($code, Method $method) - { - return preg_match( - $this->getDeclarationRegex($method->getName()), - $code - ) == 1; - } - - /** - * Returns the method original parameters, as they're - * described in the $code string. + * @param string $methodName * - * @param int $code - * @param Method $method - * @return array + * @return string */ - private function getOriginalParameters($code, Method $method) + private function getDeclarationRegex($methodName) { - $matches = []; - $parameterMatches = []; - - preg_match( - $this->getDeclarationRegex($method->getName()), - $code, - $matches - ); - - if (count($matches) > 0) { - preg_match_all( - '/(?<=\$)(\w+)+/i', - $matches[0], - $parameterMatches - ); - } - - $groupMatches = end($parameterMatches); - $parameterNames = is_array($groupMatches) ? $groupMatches : [$groupMatches]; - - return $parameterNames; + return sprintf('/public\s+(?:static\s+)?function\s+%s\s*\(.*\)\s*(?=\{)/i', $methodName); } /** * Gets the declaration code, as a string, for the passed method. * - * @param Method $method - * @param array $namedParameters + * @param array $namedParameters + * * @return string */ - private function getMethodDeclaration( - Method $method, - array $namedParameters - ) { + private function getMethodDeclaration(Method $method, array $namedParameters) + { $declaration = 'public'; $declaration .= $method->isStatic() ? ' static' : ''; $declaration .= ' function ' . $method->getName() . '('; foreach ($method->getParameters() as $index => $parameter) { $declaration .= $this->renderTypeHint($parameter); - $name = isset($namedParameters[$index]) ? $namedParameters[$index] : $parameter->getName(); + $name = $namedParameters[$index] ?? $parameter->getName(); $declaration .= '$' . $name; $declaration .= ','; } + $declaration = rtrim($declaration, ','); $declaration .= ') '; @@ -191,22 +159,39 @@ class MagicMethodTypeHintsPass implements Pass return $declaration; } - protected function renderTypeHint(Parameter $param) + /** + * Returns the method original parameters, as they're + * described in the $code string. + * + * @param int $code + * + * @return array + */ + private function getOriginalParameters($code, Method $method) { - $typeHint = $param->getTypeHint(); + $matches = []; + $parameterMatches = []; - return $typeHint === null ? '' : sprintf('%s ', $typeHint); + preg_match($this->getDeclarationRegex($method->getName()), $code, $matches); + + if ($matches !== []) { + preg_match_all('/(?<=\$)(\w+)+/i', $matches[0], $parameterMatches); + } + + $groupMatches = end($parameterMatches); + + return is_array($groupMatches) ? $groupMatches : [$groupMatches]; } /** - * Returns a regex string used to match the - * declaration of some method. + * Checks if the method is declared within code. * - * @param string $methodName - * @return string + * @param int $code + * + * @return bool */ - private function getDeclarationRegex($methodName) + private function isMethodWithinCode($code, Method $method) { - return "/public\s+(?:static\s+)?function\s+$methodName\s*\(.*\)\s*(?=\{)/i"; + return preg_match($this->getDeclarationRegex($method->getName()), $code) === 1; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php index 9633ff3f..68d37f9d 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/MethodDefinitionPass.php @@ -1,31 +1,40 @@ getMethodsToMock() as $method) { @@ -54,6 +63,12 @@ class MethodDefinitionPass implements Pass return $code; } + protected function appendToClass($class, $code) + { + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; + } + protected function renderParams(Method $method, $config) { $class = $method->getDeclaringClass(); @@ -65,18 +80,41 @@ class MethodDefinitionPass implements Pass } } - $methodParams = array(); + $methodParams = []; $params = $method->getParameters(); + $isPhp81 = PHP_VERSION_ID >= 80100; foreach ($params as $param) { $paramDef = $this->renderTypeHint($param); $paramDef .= $param->isPassedByReference() ? '&' : ''; $paramDef .= $param->isVariadic() ? '...' : ''; $paramDef .= '$' . $param->getName(); - if (!$param->isVariadic()) { - if (false !== $param->isDefaultValueAvailable()) { + if (! $param->isVariadic()) { + if ($param->isDefaultValueAvailable() !== false) { $defaultValue = $param->getDefaultValue(); - $paramDef .= ' = ' . (is_object($defaultValue) ? get_class($defaultValue) : var_export($defaultValue, true)); + + if (is_object($defaultValue)) { + $prefix = get_class($defaultValue); + if ($isPhp81) { + if (enum_exists($prefix)) { + $prefix = var_export($defaultValue, true); + } elseif ( + ! $param->isDefaultValueConstant() && + // "Parameter #1 [ F\Q\CN $a = new \F\Q\CN(param1, param2: 2) ] + preg_match( + '#\s.*?\s=\snew\s(.*?)\s]$#', + $param->__toString(), + $matches + ) === 1 + ) { + $prefix = 'new ' . $matches[1]; + } + } + } else { + $prefix = var_export($defaultValue, true); + } + + $paramDef .= ' = ' . $prefix; } elseif ($param->isOptional()) { $paramDef .= ' = null'; } @@ -84,6 +122,7 @@ class MethodDefinitionPass implements Pass $methodParams[] = $paramDef; } + return '(' . implode(', ', $methodParams) . ')'; } @@ -94,13 +133,6 @@ class MethodDefinitionPass implements Pass return $type ? sprintf(': %s', $type) : ''; } - protected function appendToClass($class, $code) - { - $lastBrace = strrpos($class, "}"); - $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; - return $class; - } - protected function renderTypeHint(Parameter $param) { $typeHint = $param->getTypeHint(); @@ -131,8 +163,8 @@ BODY; $param = $params[$i]; if (strpos($param, '&') !== false) { $body .= << $i) { - \$argv[$i] = {$param}; +if (\$argc > {$i}) { + \$argv[{$i}] = {$param}; } BODY; @@ -143,12 +175,13 @@ BODY; $paramCount = count($params); for ($i = 0; $i < $paramCount; ++$i) { $param = $params[$i]; - if (!$param->isPassedByReference()) { + if (! $param->isPassedByReference()) { continue; } + $body .= << $i) { - \$argv[$i] =& \${$param->getName()}; +if (\$argc > {$i}) { + \$argv[{$i}] =& \${$param->getName()}; } BODY; @@ -157,11 +190,10 @@ BODY; $body .= "\$ret = {$invoke}(__FUNCTION__, \$argv);\n"; - if ($method->getReturnType() !== "void") { + if (! in_array($method->getReturnType(), ['never', 'void'], true)) { $body .= "return \$ret;\n"; } - $body .= "}\n"; - return $body; + return $body . "}\n"; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php index f7b72c9f..9200873b 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/Pass.php @@ -1,21 +1,11 @@ '/public function __wakeup\(\)\s+\{.*?\}/sm', - ); + '__toString' => '/public function __toString\(\)\s+(:\s+string)?\s*\{.*?\}/sm', + ]; + /** + * @param string $code + * @return string + */ public function apply($code, MockConfiguration $config) { $target = $config->getTargetClass(); - if (!$target) { + if (! $target instanceof TargetClassInterface) { return $code; } foreach ($target->getMethods() as $method) { - if ($method->isFinal() && isset($this->methods[$method->getName()])) { - $code = preg_replace($this->methods[$method->getName()], '', $code); + if (! $method->isFinal()) { + continue; } + + if (! isset($this->methods[$method->getName()])) { + continue; + } + + $code = preg_replace($this->methods[$method->getName()], '', $code); } return $code; diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php index ed5a4206..7fd86e7b 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveDestructorPass.php @@ -1,43 +1,37 @@ + * @copyright https://github.com/mockery/mockery/blob/HEAD/COPYRIGHT.md + * @license https://github.com/mockery/mockery/blob/HEAD/LICENSE BSD 3-Clause License + * @link https://github.com/mockery/mockery for the canonical source repository */ namespace Mockery\Generator\StringManipulation\Pass; use Mockery\Generator\MockConfiguration; +use function preg_replace; /** * Remove mock's empty destructor if we tend to use original class destructor */ -class RemoveDestructorPass +class RemoveDestructorPass implements Pass { + /** + * @param string $code + * @return string + */ public function apply($code, MockConfiguration $config) { $target = $config->getTargetClass(); - if (!$target) { + if (! $target) { return $code; } - if (!$config->isMockOriginalDestructor()) { - $code = preg_replace('/public function __destruct\(\)\s+\{.*?\}/sm', '', $code); + if (! $config->isMockOriginalDestructor()) { + return preg_replace('/public function __destruct\(\)\s+\{.*?\}/sm', '', $code); } return $code; diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php index 0abefe26..5bbb578e 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/RemoveUnserializeForInternalSerializableClassesPass.php @@ -1,26 +1,19 @@ getTargetClass(); - if (!$target) { + if (! $target) { return $code; } - if (!$target->hasInternalAncestor() || !$target->implementsInterface("Serializable")) { + if (! $target->hasInternalAncestor() || ! $target->implementsInterface('Serializable')) { return $code; } - $code = $this->appendToClass($code, \PHP_VERSION_ID < 80100 ? self::DUMMY_METHOD_DEFINITION_LEGACY : self::DUMMY_METHOD_DEFINITION); - - return $code; + return $this->appendToClass( + $code, + PHP_VERSION_ID < 80100 ? self::DUMMY_METHOD_DEFINITION_LEGACY : self::DUMMY_METHOD_DEFINITION + ); } protected function appendToClass($class, $code) { - $lastBrace = strrpos($class, "}"); - $class = substr($class, 0, $lastBrace) . $code . "\n }\n"; - return $class; + $lastBrace = strrpos($class, '}'); + return substr($class, 0, $lastBrace) . $code . "\n }\n"; } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php index f6db5d74..faf2a90f 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/TraitPass.php @@ -1,47 +1,39 @@ getTargetTraits(); - if (empty($traits)) { + if ($traits === []) { return $code; } - $useStatements = array_map(function ($trait) { - return "use \\\\" . ltrim($trait->getName(), "\\") . ";"; + $useStatements = array_map(static function ($trait) { + return 'use \\\\' . ltrim($trait->getName(), '\\') . ';'; }, $traits); - $code = preg_replace( - '/^{$/m', - "{\n " . implode("\n ", $useStatements) . "\n", - $code - ); - - return $code; + return preg_replace('/^{$/m', "{\n " . implode("\n ", $useStatements) . "\n", $code); } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php index 4bc415f6..5cb14217 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulationGenerator.php @@ -1,26 +1,18 @@ + */ + protected $passes = []; + + /** + * @var string + */ + private $code; + + /** + * @param list $passes + */ + public function __construct(array $passes) + { + $this->passes = $passes; + + $this->code = file_get_contents(__DIR__ . '/../Mock.php'); + } + + /** + * @param Pass $pass + * @return void + */ + public function addPass(Pass $pass) + { + $this->passes[] = $pass; + } + + /** + * @return MockDefinition + */ + public function generate(MockConfiguration $config) + { + $className = $config->getName() ?: $config->generateName(); + + $namedConfig = $config->rename($className); + + $code = $this->code; + foreach ($this->passes as $pass) { + $code = $pass->apply($code, $namedConfig); + } + + return new MockDefinition($namedConfig, $code); + } /** * Creates a new StringManipulationGenerator with the default passes @@ -60,30 +96,7 @@ class StringManipulationGenerator implements Generator new RemoveBuiltinMethodsThatAreFinalPass(), new RemoveDestructorPass(), new ConstantsPass(), + new ClassAttributesPass(), ]); } - - public function __construct(array $passes) - { - $this->passes = $passes; - } - - public function generate(MockConfiguration $config) - { - $code = file_get_contents(__DIR__ . '/../Mock.php'); - $className = $config->getName() ?: $config->generateName(); - - $namedConfig = $config->rename($className); - - foreach ($this->passes as $pass) { - $code = $pass->apply($code, $namedConfig); - } - - return new MockDefinition($namedConfig, $code); - } - - public function addPass(Pass $pass) - { - $this->passes[] = $pass; - } } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php b/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php index 77244124..730ae1b5 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/TargetClassInterface.php @@ -1,21 +1,11 @@ */ - public function getName(); - - /** - * Returns the targetClass's methods. - * - * @return array - */ - public function getMethods(); + public function getAttributes(); /** * Returns the targetClass's interfaces. * - * @return array + * @return array */ public function getInterfaces(); + /** + * Returns the targetClass's methods. + * + * @return array + */ + public function getMethods(); + + /** + * Returns the targetClass's name. + * + * @return class-string + */ + public function getName(); + /** * Returns the targetClass's namespace name. * @@ -67,41 +63,42 @@ interface TargetClassInterface */ public function getShortName(); + /** + * Returns whether the targetClass has + * an internal ancestor. + * + * @return bool + */ + public function hasInternalAncestor(); + + /** + * Returns whether the targetClass is in + * the passed interface. + * + * @param class-string|string $interface + * + * @return bool + */ + public function implementsInterface($interface); + + /** + * Returns whether the targetClass is in namespace. + * + * @return bool + */ + public function inNamespace(); + /** * Returns whether the targetClass is abstract. * - * @return boolean + * @return bool */ public function isAbstract(); /** * Returns whether the targetClass is final. * - * @return boolean + * @return bool */ public function isFinal(); - - /** - * Returns whether the targetClass is in namespace. - * - * @return boolean - */ - public function inNamespace(); - - /** - * Returns whether the targetClass is in - * the passed interface. - * - * @param mixed $interface - * @return boolean - */ - public function implementsInterface($interface); - - /** - * Returns whether the targetClass has - * an internal ancestor. - * - * @return boolean - */ - public function hasInternalAncestor(); } diff --git a/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php b/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php index fb83c610..ea722025 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/UndefinedTargetClass.php @@ -1,94 +1,141 @@ name = $name; } + /** + * @return class-string + */ + public function __toString() + { + return $this->name; + } + + /** + * @param class-string $name + * @return self + */ public static function factory($name) { return new self($name); } + /** + * @return list + */ + public function getAttributes() + { + return []; + } + + /** + * @return list + */ + public function getInterfaces() + { + return []; + } + + /** + * @return list + */ + public function getMethods() + { + return []; + } + + /** + * @return class-string + */ public function getName() { return $this->name; } - public function isAbstract() - { - return false; - } - - public function isFinal() - { - return false; - } - - public function getMethods() - { - return array(); - } - - public function getInterfaces() - { - return array(); - } - + /** + * @return string + */ public function getNamespaceName() { - $parts = explode("\\", ltrim($this->getName(), "\\")); + $parts = explode('\\', ltrim($this->getName(), '\\')); array_pop($parts); - return implode("\\", $parts); - } - - public function inNamespace() - { - return $this->getNamespaceName() !== ''; + return implode('\\', $parts); } + /** + * @return string + */ public function getShortName() { - $parts = explode("\\", $this->getName()); + $parts = explode('\\', $this->getName()); return array_pop($parts); } - public function implementsInterface($interface) - { - return false; - } - + /** + * @return bool + */ public function hasInternalAncestor() { return false; } - public function __toString() + /** + * @param class-string $interface + * @return bool + */ + public function implementsInterface($interface) { - return $this->name; + return false; + } + + /** + * @return bool + */ + public function inNamespace() + { + return $this->getNamespaceName() !== ''; + } + + /** + * @return bool + */ + public function isAbstract() + { + return false; + } + + /** + * @return bool + */ + public function isFinal() + { + return false; } } diff --git a/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php index 1c13c898..42df34be 100644 --- a/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php +++ b/vendor/mockery/mockery/library/Mockery/HigherOrderMessage.php @@ -1,33 +1,32 @@ mock = $mock; @@ -35,7 +34,10 @@ class HigherOrderMessage } /** - * @return \Mockery\Expectation + * @param string $method + * @param array $args + * + * @return Expectation|ExpectationInterface|HigherOrderMessage */ public function __call($method, $args) { @@ -44,6 +46,7 @@ class HigherOrderMessage } $expectation = $this->mock->{$this->method}($method); + return $expectation->withArgs($args); } } diff --git a/vendor/mockery/mockery/library/Mockery/Instantiator.php b/vendor/mockery/mockery/library/Mockery/Instantiator.php index 0eafff7f..11b8e5ba 100644 --- a/vendor/mockery/mockery/library/Mockery/Instantiator.php +++ b/vendor/mockery/mockery/library/Mockery/Instantiator.php @@ -1,112 +1,56 @@ . + * @copyright https://github.com/mockery/mockery/blob/HEAD/COPYRIGHT.md + * @license https://github.com/mockery/mockery/blob/HEAD/LICENSE BSD 3-Clause License + * @link https://github.com/mockery/mockery for the canonical source repository */ namespace Mockery; use Closure; +use Exception; +use InvalidArgumentException; use ReflectionClass; use UnexpectedValueException; -use InvalidArgumentException; + +use function class_exists; +use function restore_error_handler; +use function set_error_handler; +use function sprintf; +use function strlen; +use function unserialize; /** - * This is a trimmed down version of https://github.com/doctrine/instantiator, - * basically without the caching - * - * @author Marco Pivetta + * This is a trimmed down version of https://github.com/doctrine/instantiator, without the caching mechanism. */ final class Instantiator { /** - * {@inheritDoc} - */ - public function instantiate($className) - { - $factory = $this->buildFactory($className); - $instance = $factory(); - - return $instance; - } - - /** - * Builds a {@see \Closure} capable of instantiating the given $className without - * invoking its constructor. + * @template TClass of object * - * @param string $className - * - * @return Closure - */ - private function buildFactory($className) - { - $reflectionClass = $this->getReflectionClass($className); - - if ($this->isInstantiableViaReflection($reflectionClass)) { - return function () use ($reflectionClass) { - return $reflectionClass->newInstanceWithoutConstructor(); - }; - } - - $serializedString = sprintf( - 'O:%d:"%s":0:{}', - strlen($className), - $className - ); - - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - - return function () use ($serializedString) { - return unserialize($serializedString); - }; - } - - /** - * @param string $className - * - * @return ReflectionClass + * @param class-string $className * * @throws InvalidArgumentException + * @throws UnexpectedValueException + * + * @return TClass */ - private function getReflectionClass($className) + public function instantiate($className): object { - if (! class_exists($className)) { - throw new InvalidArgumentException("Class:$className does not exist"); - } - - $reflection = new ReflectionClass($className); - - if ($reflection->isAbstract()) { - throw new InvalidArgumentException("Class:$className is an abstract class"); - } - - return $reflection; + return $this->buildFactory($className)(); } /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * * @throws UnexpectedValueException - * - * @return void */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) - { - set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { + private function attemptInstantiationViaUnSerialization( + ReflectionClass $reflectionClass, + string $serializedString + ): void { + set_error_handler(static function ($code, $message, $file, $line) use ($reflectionClass, &$error): void { $msg = sprintf( 'Could not produce an instance of "%s" via un-serialization, since an error was triggered in file "%s" at line "%d"', $reflectionClass->getName(), @@ -114,42 +58,75 @@ final class Instantiator $line ); - $error = new UnexpectedValueException($msg, 0, new \Exception($message, $code)); + $error = new UnexpectedValueException($msg, 0, new Exception($message, $code)); }); try { unserialize($serializedString); - } catch (\Exception $exception) { + } catch (Exception $exception) { restore_error_handler(); - throw new UnexpectedValueException("An exception was raised while trying to instantiate an instance of \"{$reflectionClass->getName()}\" via un-serialization", 0, $exception); + throw new UnexpectedValueException( + sprintf( + 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', + $reflectionClass->getName() + ), + 0, + $exception + ); } restore_error_handler(); - if ($error) { + if ($error instanceof UnexpectedValueException) { throw $error; } } /** - * @param ReflectionClass $reflectionClass - * - * @return bool + * Builds a {@see Closure} capable of instantiating the given $className without invoking its constructor. */ - private function isInstantiableViaReflection(ReflectionClass $reflectionClass) + private function buildFactory(string $className): Closure { - return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal()); + $reflectionClass = $this->getReflectionClass($className); + + if ($this->isInstantiableViaReflection($reflectionClass)) { + return static function () use ($reflectionClass) { + return $reflectionClass->newInstanceWithoutConstructor(); + }; + } + + $serializedString = sprintf('O:%d:"%s":0:{}', strlen($className), $className); + + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + + return static function () use ($serializedString) { + return unserialize($serializedString); + }; + } + + /** + * @throws InvalidArgumentException + */ + private function getReflectionClass(string $className): ReflectionClass + { + if (! class_exists($className)) { + throw new InvalidArgumentException(sprintf('Class:%s does not exist', $className)); + } + + $reflection = new ReflectionClass($className); + + if ($reflection->isAbstract()) { + throw new InvalidArgumentException(sprintf('Class:%s is an abstract class', $className)); + } + + return $reflection; } /** * Verifies whether the given class is to be considered internal - * - * @param ReflectionClass $reflectionClass - * - * @return bool */ - private function hasInternalAncestors(ReflectionClass $reflectionClass) + private function hasInternalAncestors(ReflectionClass $reflectionClass): bool { do { if ($reflectionClass->isInternal()) { @@ -159,4 +136,12 @@ final class Instantiator return false; } + + /** + * Verifies if the class is instantiable via reflection + */ + private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool + { + return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal()); + } } diff --git a/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php index ae0cc2a7..5c904e13 100644 --- a/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php +++ b/vendor/mockery/mockery/library/Mockery/LegacyMockInterface.php @@ -1,112 +1,20 @@ $args + * + * @return null|Expectation */ - public function mockery_setGroup($group, $order); + public function mockery_findExpectation($method, array $args); /** - * Fetch array of ordered groups + * Return the container for this mock * - * @return array + * @return Container */ - public function mockery_getGroups(); - - /** - * Set current ordered number - * - * @param int $order - */ - public function mockery_setCurrentOrder($order); + public function mockery_getContainer(); /** * Get current ordered number @@ -167,16 +64,6 @@ interface LegacyMockInterface */ public function mockery_getCurrentOrder(); - /** - * Validate the current mock's ordering - * - * @param string $method - * @param int $order - * @throws \Mockery\Exception - * @return void - */ - public function mockery_validateOrder($method, $order); - /** * Gets the count of expectations for this mock * @@ -187,34 +74,28 @@ interface LegacyMockInterface /** * Return the expectations director for the given method * - * @var string $method - * @return \Mockery\ExpectationDirector|null - */ - public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director); - - /** - * Return the expectations director for the given method + * @param string $method * - * @var string $method - * @return \Mockery\ExpectationDirector|null + * @return null|ExpectationDirector */ public function mockery_getExpectationsFor($method); /** - * Find an expectation matching the given method and arguments + * Fetch array of ordered groups * - * @var string $method - * @var array $args - * @return \Mockery\Expectation|null + * @return array */ - public function mockery_findExpectation($method, array $args); + public function mockery_getGroups(); /** - * Return the container for this mock - * - * @return \Mockery\Container + * @return string[] */ - public function mockery_getContainer(); + public function mockery_getMockableMethods(); + + /** + * @return array + */ + public function mockery_getMockableProperties(); /** * Return the name for this mock @@ -224,17 +105,154 @@ interface LegacyMockInterface public function mockery_getName(); /** - * @return array + * Alternative setup method to constructor + * + * @param object $partialObject + * + * @return void */ - public function mockery_getMockableProperties(); - - /** - * @return string[] - */ - public function mockery_getMockableMethods(); + public function mockery_init(?Container $container = null, $partialObject = null); /** * @return bool */ public function mockery_isAnonymous(); + + /** + * Set current ordered number + * + * @param int $order + * + * @return int + */ + public function mockery_setCurrentOrder($order); + + /** + * Return the expectations director for the given method + * + * @param string $method + * + * @return null|ExpectationDirector + */ + public function mockery_setExpectationsFor($method, ExpectationDirector $director); + + /** + * Set ordering for a group + * + * @param string $group + * @param int $order + * + * @return void + */ + public function mockery_setGroup($group, $order); + + /** + * Tear down tasks for this mock + * + * @return void + */ + public function mockery_teardown(); + + /** + * Validate the current mock's ordering + * + * @param string $method + * @param int $order + * + * @throws Exception + * + * @return void + */ + public function mockery_validateOrder($method, $order); + + /** + * Iterate across all expectation directors and validate each + * + * @throws Throwable + * + * @return void + */ + public function mockery_verify(); + + /** + * Allows additional methods to be mocked that do not explicitly exist on mocked class + * + * @param string $method the method name to be mocked + * @return self + */ + public function shouldAllowMockingMethod($method); + + /** + * @return self + */ + public function shouldAllowMockingProtectedMethods(); + + /** + * Set mock to defer unexpected methods to its parent if possible + * + * @deprecated since 1.4.0. Please use makePartial() instead. + * + * @return self + */ + public function shouldDeferMissing(); + + /** + * @return self + */ + public function shouldHaveBeenCalled(); + + /** + * @template TMixed + * @param string $method + * @param null|array|Closure $args + * + * @return self + */ + public function shouldHaveReceived($method, $args = null); + + /** + * Set mock to ignore unexpected methods and return Undefined class + * + * @template TReturnValue + * + * @param null|TReturnValue $returnValue the default return value for calls to missing functions on this mock + * + * @return self + */ + public function shouldIgnoreMissing($returnValue = null); + + /** + * @template TMixed + * @param null|array $args (optional) + * + * @return self + */ + public function shouldNotHaveBeenCalled(?array $args = null); + + /** + * @template TMixed + * @param string $method + * @param null|array|Closure $args + * + * @return self + */ + public function shouldNotHaveReceived($method, $args = null); + + /** + * Shortcut method for setting an expectation that a method should not be called. + * + * @param string ...$methodNames one or many methods that are expected not to be called in this mock + * + * @return Expectation|ExpectationInterface|HigherOrderMessage + */ + public function shouldNotReceive(...$methodNames); + + /** + * Set expected method calls + * + * @param string ...$methodNames one or many methods that are expected to be called in this mock + * + * @return Expectation|ExpectationInterface|HigherOrderMessage + */ + public function shouldReceive(...$methodNames); } diff --git a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php index e5f78a20..63247e87 100644 --- a/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php +++ b/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php @@ -1,36 +1,32 @@ getClassName(), false)) { return; } - eval("?>" . $definition->getCode()); + eval('?>' . $definition->getCode()); } } diff --git a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php index 170ffb6e..90d56890 100644 --- a/vendor/mockery/mockery/library/Mockery/Loader/Loader.php +++ b/vendor/mockery/mockery/library/Mockery/Loader/Loader.php @@ -1,21 +1,11 @@ path = realpath($path) ?: sys_get_temp_dir(); + if ($path === null) { + $path = sys_get_temp_dir(); + } + + $this->path = realpath($path); } + public function __destruct() + { + $files = array_diff(glob($this->path . DIRECTORY_SEPARATOR . 'Mockery_*.php') ?: [], [$this->lastPath]); + + foreach ($files as $file) { + @unlink($file); + } + } + + /** + * Load the given mock definition + * + * @return void + */ public function load(MockDefinition $definition) { if (class_exists($definition->getClassName(), false)) { return; } - $tmpfname = $this->path . DIRECTORY_SEPARATOR . "Mockery_" . uniqid() . ".php"; - file_put_contents($tmpfname, $definition->getCode()); + $this->lastPath = sprintf('%s%s%s.php', $this->path, DIRECTORY_SEPARATOR, uniqid('Mockery_', false)); - require $tmpfname; + file_put_contents($this->lastPath, $definition->getCode()); + + if (file_exists($this->lastPath)) { + require $this->lastPath; + } } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php index e3c3b943..f4a698e2 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AndAnyOtherArgs.php @@ -1,38 +1,17 @@ '; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php index 1ff440b1..5bb4b2f0 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Any.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Any.php @@ -1,38 +1,17 @@ '; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php index 9663a76d..0e1ce8c6 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyArgs.php @@ -1,40 +1,31 @@ '; + } + /** - * @inheritdoc + * @template TMixed + * + * @param TMixed $actual + * + * @return bool */ public function match(&$actual) { return true; } - - /** - * @inheritdoc - */ - public function __toString() - { - return ''; - } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php index bcce4b74..425dcae3 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/AnyOf.php @@ -1,39 +1,19 @@ _expected, true); - } - /** * Return a string representation of this Matcher * @@ -43,4 +23,19 @@ class AnyOf extends MatcherAbstract { return ''; } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return in_array($actual, $this->_expected, true); + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php index 04408f56..56e58f69 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/ArgumentListMatcher.php @@ -1,21 +1,11 @@ _expected; - $result = $closure($actual); - return $result === true; - } - /** * Return a string representation of this Matcher * @@ -44,4 +21,18 @@ class Closure extends MatcherAbstract { return ''; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return ($this->_expected)($actual) === true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php index 79afb73a..9fdeb831 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Contains.php @@ -1,31 +1,42 @@ _expected as $v) { + $elements[] = (string) $v; + } + + return ''; + } + /** * Check if the actual value matches the expected. * - * @param mixed $actual + * @template TMixed + * + * @param TMixed $actual + * * @return bool */ public function match(&$actual) @@ -39,26 +50,12 @@ class Contains extends MatcherAbstract break; } } + if ($match === false) { return false; } } + return true; } - - /** - * Return a string representation of this Matcher - * - * @return string - */ - public function __toString() - { - $return = '_expected as $v) { - $elements[] = (string) $v; - } - $return .= implode(', ', $elements) . ']>'; - return $return; - } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php index 291f4220..3f3a9ef7 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Ducktype.php @@ -1,46 +1,21 @@ _expected as $method) { - if (!method_exists($actual, $method)) { - return false; - } - } - return true; - } - /** * Return a string representation of this Matcher * @@ -50,4 +25,28 @@ class Ducktype extends MatcherAbstract { return '_expected) . ']>'; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_object($actual)) { + return false; + } + + foreach ($this->_expected as $method) { + if (! method_exists($actual, $method)) { + return false; + } + } + + return true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php index fa983eaf..15ef915a 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasKey.php @@ -1,38 +1,23 @@ _expected, $actual); - } - /** * Return a string representation of this Matcher * @@ -40,6 +25,24 @@ class HasKey extends MatcherAbstract */ public function __toString() { - return "_expected]>"; + return sprintf('', $this->_expected); + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_array($actual) && ! $actual instanceof ArrayAccess) { + return false; + } + + return array_key_exists($this->_expected, (array) $actual); } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php index 8ca6afd1..8d37a5f7 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/HasValue.php @@ -1,38 +1,22 @@ _expected, $actual); - } - /** * Return a string representation of this Matcher * @@ -40,7 +24,24 @@ class HasValue extends MatcherAbstract */ public function __toString() { - $return = '_expected . ']>'; - return $return; + return '_expected . ']>'; + } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_array($actual) && ! $actual instanceof ArrayAccess) { + return false; + } + + return in_array($this->_expected, (array) $actual, true); } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php index 3233079e..813950a5 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MatcherAbstract.php @@ -1,58 +1,39 @@ _expected = $expected; } - - /** - * Check if the actual value matches the expected. - * Actual passed by reference to preserve reference trail (where applicable) - * back to the original method parameter. - * - * @param mixed $actual - * @return bool - */ - abstract public function match(&$actual); - - /** - * Return a string representation of this Matcher - * - * @return string - */ - abstract public function __toString(); } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php b/vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php index 63dbff0e..b4384d0c 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MultiArgumentClosure.php @@ -1,41 +1,17 @@ _expected; - return true === call_user_func_array($closure, $actual); - } - /** * Return a string representation of this Matcher * @@ -45,4 +21,20 @@ class MultiArgumentClosure extends MatcherAbstract implements ArgumentListMatche { return ''; } + + /** + * Check if the actual value matches the expected. + * Actual passed by reference to preserve reference trail (where applicable) + * back to the original method parameter. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return ($this->_expected)(...$actual) === true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php index 27b5ec56..d365bc70 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/MustBe.php @@ -1,45 +1,22 @@ _expected === $actual; - } - - return $this->_expected == $actual; - } - /** * Return a string representation of this Matcher * @@ -49,4 +26,22 @@ class MustBe extends MatcherAbstract { return ''; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + if (! is_object($actual)) { + return $this->_expected === $actual; + } + + return $this->_expected == $actual; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php index 5e9e4189..37438f13 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/NoArgs.php @@ -1,40 +1,33 @@ '; } + + /** + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return count($actual) === 0; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php index 756ccaa5..133007eb 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Not.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Not.php @@ -1,39 +1,17 @@ _expected; - } - /** * Return a string representation of this Matcher * @@ -43,4 +21,19 @@ class Not extends MatcherAbstract { return ''; } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return $actual !== $this->_expected; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php index cd827015..567b24e0 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/NotAnyOf.php @@ -1,44 +1,17 @@ _expected as $exp) { - if ($actual === $exp || $actual == $exp) { - return false; - } - } - return true; - } - /** * Return a string representation of this Matcher * @@ -48,4 +21,25 @@ class NotAnyOf extends MatcherAbstract { return ''; } + + /** + * Check if the actual value does not match the expected (in this + * case it's specifically NOT expected). + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + foreach ($this->_expected as $exp) { + if ($actual === $exp || $actual == $exp) { + return false; + } + } + + return true; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php index 362c366f..b2e84dfa 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Pattern.php @@ -1,38 +1,19 @@ _expected, (string) $actual) >= 1; - } - /** * Return a string representation of this Matcher * @@ -42,4 +23,18 @@ class Pattern extends MatcherAbstract { return ''; } + + /** + * Check if the actual value matches the expected pattern. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + return preg_match($this->_expected, (string) $actual) >= 1; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php index 5e706c81..96893fb9 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Subset.php @@ -1,33 +1,28 @@ formatArray($this->expected) . '>'; } /** @@ -58,12 +53,15 @@ class Subset extends MatcherAbstract /** * Check if the actual value matches the expected. * - * @param mixed $actual + * @template TMixed + * + * @param TMixed $actual + * * @return bool */ public function match(&$actual) { - if (!is_array($actual)) { + if (! is_array($actual)) { return false; } @@ -75,18 +73,27 @@ class Subset extends MatcherAbstract } /** - * Return a string representation of this Matcher + * @param array $expected Expected subset of data + * + * @return Subset + */ + public static function strict(array $expected) + { + return new static($expected, true); + } + + /** + * Recursively format an array into the string representation for this matcher * * @return string */ - public function __toString() + protected function formatArray(array $array) { - $return = 'expected as $k=>$v) { - $elements[] = $k . '=' . (string) $v; + $elements = []; + foreach ($array as $k => $v) { + $elements[] = $k . '=' . (is_array($v) ? $this->formatArray($v) : (string) $v); } - $return .= implode(', ', $elements) . ']>'; - return $return; + + return '[' . implode(', ', $elements) . ']'; } } diff --git a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php index d81ce834..8265b602 100644 --- a/vendor/mockery/mockery/library/Mockery/Matcher/Type.php +++ b/vendor/mockery/mockery/library/Mockery/Matcher/Type.php @@ -1,49 +1,24 @@ _expected == 'real') { - $function = 'is_float'; - } else { - $function = 'is_' . strtolower($this->_expected); - } - if (function_exists($function)) { - return $function($actual); - } elseif (is_string($this->_expected) - && (class_exists($this->_expected) || interface_exists($this->_expected))) { - return $actual instanceof $this->_expected; - } - return false; - } - /** * Return a string representation of this Matcher * @@ -53,4 +28,32 @@ class Type extends MatcherAbstract { return '<' . ucfirst($this->_expected) . '>'; } + + /** + * Check if the actual value matches the expected. + * + * @template TMixed + * + * @param TMixed $actual + * + * @return bool + */ + public function match(&$actual) + { + $function = $this->_expected === 'real' ? 'is_float' : 'is_' . strtolower($this->_expected); + + if (function_exists($function)) { + return $function($actual); + } + + if (! is_string($this->_expected)) { + return false; + } + + if (class_exists($this->_expected) || interface_exists($this->_expected)) { + return $actual instanceof $this->_expected; + } + + return false; + } } diff --git a/vendor/mockery/mockery/library/Mockery/MethodCall.php b/vendor/mockery/mockery/library/Mockery/MethodCall.php index db68fd81..f331514f 100644 --- a/vendor/mockery/mockery/library/Mockery/MethodCall.php +++ b/vendor/mockery/mockery/library/Mockery/MethodCall.php @@ -1,43 +1,50 @@ method = $method; $this->args = $args; } - public function getMethod() - { - return $this->method; - } - + /** + * @return array + */ public function getArgs() { return $this->args; } + + /** + * @return string + */ + public function getMethod() + { + return $this->method; + } } diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php index 4605bef8..068cce35 100644 --- a/vendor/mockery/mockery/library/Mockery/Mock.php +++ b/vendor/mockery/mockery/library/Mockery/Mock.php @@ -1,32 +1,34 @@ _mockery_container = $container; if (!is_null($partialObject)) { $this->_mockery_partial = $partialObject; @@ -195,6 +201,8 @@ class Mock implements MockInterface } $this->_mockery_instanceMock = $instanceMock; + + $this->_mockery_parentClass = get_parent_class($this); } /** @@ -202,54 +210,54 @@ class Mock implements MockInterface * * @param string ...$methodNames one or many methods that are expected to be called in this mock * - * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage + * @return ExpectationInterface|Expectation|HigherOrderMessage */ public function shouldReceive(...$methodNames) { - if (count($methodNames) === 0) { - return new HigherOrderMessage($this, "shouldReceive"); + if ($methodNames === []) { + return new HigherOrderMessage($this, 'shouldReceive'); } foreach ($methodNames as $method) { - if ("" == $method) { - throw new \InvalidArgumentException("Received empty method name"); + if ('' === $method) { + throw new \InvalidArgumentException('Received empty method name'); } } $self = $this; $allowMockingProtectedMethods = $this->_mockery_allowMockingProtectedMethods; - - $lastExpectation = \Mockery::parseShouldReturnArgs( + return \Mockery::parseShouldReturnArgs( $this, $methodNames, - function ($method) use ($self, $allowMockingProtectedMethods) { + static function ($method) use ($self, $allowMockingProtectedMethods) { $rm = $self->mockery_getMethod($method); if ($rm) { if ($rm->isPrivate()) { - throw new \InvalidArgumentException("$method() cannot be mocked as it is a private method"); + throw new \InvalidArgumentException($method . '() cannot be mocked as it is a private method'); } + if (!$allowMockingProtectedMethods && $rm->isProtected()) { - throw new \InvalidArgumentException("$method() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object. Use shouldAllowMockingProtectedMethods() to enable mocking of protected methods."); + throw new \InvalidArgumentException($method . '() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object. Use shouldAllowMockingProtectedMethods() to enable mocking of protected methods.'); } } $director = $self->mockery_getExpectationsFor($method); if (!$director) { - $director = new \Mockery\ExpectationDirector($method, $self); + $director = new ExpectationDirector($method, $self); $self->mockery_setExpectationsFor($method, $director); } - $expectation = new \Mockery\Expectation($self, $method); + + $expectation = new Expectation($self, $method); $director->addExpectation($expectation); return $expectation; } ); - return $lastExpectation; } // start method allows /** * @param mixed $something String method name or map of method => return - * @return self|\Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage + * @return self|ExpectationInterface|Expectation|HigherOrderMessage */ public function allows($something = []) { @@ -267,14 +275,14 @@ class Mock implements MockInterface return $this; } - // end method allows + // end method allows // start method expects /** - /** - * @param mixed $something String method name (optional) - * @return \Mockery\ExpectationInterface|\Mockery\Expectation|ExpectsHigherOrderMessage - */ + /** + * @param mixed $something String method name (optional) + * @return ExpectationInterface|Expectation|ExpectsHigherOrderMessage + */ public function expects($something = null) { if (is_string($something)) { @@ -283,29 +291,32 @@ class Mock implements MockInterface return new ExpectsHigherOrderMessage($this); } - // end method expects + // end method expects /** * Shortcut method for setting an expectation that a method should not be called. * * @param string ...$methodNames one or many methods that are expected not to be called in this mock - * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage + * @return ExpectationInterface|Expectation|HigherOrderMessage */ public function shouldNotReceive(...$methodNames) { - if (count($methodNames) === 0) { - return new HigherOrderMessage($this, "shouldNotReceive"); + if ($methodNames === []) { + return new HigherOrderMessage($this, 'shouldNotReceive'); } - $expectation = call_user_func_array(array($this, 'shouldReceive'), $methodNames); + $expectation = call_user_func_array(function (string $methodNames) { + return $this->shouldReceive($methodNames); + }, $methodNames); $expectation->never(); return $expectation; } /** * Allows additional methods to be mocked that do not explicitly exist on mocked class - * @param String $method name of the method to be mocked - * @return Mock + * + * @param string $method name of the method to be mocked + * @return Mock|MockInterface|LegacyMockInterface */ public function shouldAllowMockingMethod($method) { @@ -317,7 +328,7 @@ class Mock implements MockInterface * Set mock to ignore unexpected methods and return Undefined class * @param mixed $returnValue the default return value for calls to missing functions on this mock * @param bool $recursive Specify if returned mocks should also have shouldIgnoreMissing set - * @return Mock + * @return static */ public function shouldIgnoreMissing($returnValue = null, $recursive = false) { @@ -330,12 +341,12 @@ class Mock implements MockInterface public function asUndefined() { $this->_mockery_ignoreMissing = true; - $this->_mockery_defaultReturnValue = new \Mockery\Undefined(); + $this->_mockery_defaultReturnValue = new Undefined(); return $this; } /** - * @return Mock + * @return static */ public function shouldAllowMockingProtectedMethods() { @@ -360,7 +371,7 @@ class Mock implements MockInterface * * @deprecated 2.0.0 Please use makePartial() instead * - * @return Mock + * @return static */ public function shouldDeferMissing() { @@ -373,7 +384,7 @@ class Mock implements MockInterface * It was an alias for shouldDeferMissing(), which will be removed * in 2.0.0. * - * @return Mock + * @return static */ public function makePartial() { @@ -396,6 +407,7 @@ class Mock implements MockInterface $exp->byDefault(); } } + return $this; } @@ -415,15 +427,16 @@ class Mock implements MockInterface /** * Forward calls to this magic method to the __call method */ + #[\ReturnTypeWillChange] public function __toString() { - return $this->__call('__toString', array()); + return $this->__call('__toString', []); } /** * Iterate across all expectation directors and validate each * - * @throws \Mockery\CountValidator\Exception + * @throws Exception * @return void */ public function mockery_verify() @@ -431,10 +444,12 @@ class Mock implements MockInterface if ($this->_mockery_verified) { return; } - if (isset($this->_mockery_ignoreVerification) + + if (property_exists($this, '_mockery_ignoreVerification') && $this->_mockery_ignoreVerification !== null && $this->_mockery_ignoreVerification == true) { return; } + $this->_mockery_verified = true; foreach ($this->_mockery_expectations as $director) { $director->verify(); @@ -467,7 +482,7 @@ class Mock implements MockInterface */ public function mockery_allocateOrder() { - $this->_mockery_allocatedOrder += 1; + ++$this->_mockery_allocatedOrder; return $this->_mockery_allocatedOrder; } @@ -524,8 +539,8 @@ class Mock implements MockInterface public function mockery_validateOrder($method, $order) { if ($order < $this->_mockery_currentOrder) { - $exception = new \Mockery\Exception\InvalidOrderException( - 'Method ' . __CLASS__ . '::' . $method . '()' + $exception = new InvalidOrderException( + 'Method ' . self::class . '::' . $method . '()' . ' called out of order: expected order ' . $order . ', was ' . $this->_mockery_currentOrder ); @@ -535,6 +550,7 @@ class Mock implements MockInterface ->setActualOrder($this->_mockery_currentOrder); throw $exception; } + $this->mockery_setCurrentOrder($order); } @@ -549,6 +565,7 @@ class Mock implements MockInterface foreach ($this->_mockery_expectations as $director) { $count += $director->getExpectationCount(); } + return $count; } @@ -556,9 +573,9 @@ class Mock implements MockInterface * Return the expectations director for the given method * * @var string $method - * @return \Mockery\ExpectationDirector|null + * @return ExpectationDirector|null */ - public function mockery_setExpectationsFor($method, \Mockery\ExpectationDirector $director) + public function mockery_setExpectationsFor($method, ExpectationDirector $director) { $this->_mockery_expectations[$method] = $director; } @@ -567,7 +584,7 @@ class Mock implements MockInterface * Return the expectations director for the given method * * @var string $method - * @return \Mockery\ExpectationDirector|null + * @return ExpectationDirector|null */ public function mockery_getExpectationsFor($method) { @@ -581,13 +598,14 @@ class Mock implements MockInterface * * @var string $method * @var array $args - * @return \Mockery\Expectation|null + * @return Expectation|null */ public function mockery_findExpectation($method, array $args) { if (!isset($this->_mockery_expectations[$method])) { return null; } + $director = $this->_mockery_expectations[$method]; return $director->findExpectation($args); @@ -596,7 +614,7 @@ class Mock implements MockInterface /** * Return the container for this mock * - * @return \Mockery\Container + * @return Container */ public function mockery_getContainer() { @@ -610,7 +628,7 @@ class Mock implements MockInterface */ public function mockery_getName() { - return __CLASS__; + return self::class; } /** @@ -623,11 +641,19 @@ class Mock implements MockInterface public function __isset($name) { - if (false === stripos($name, '_mockery_') && get_parent_class($this) && method_exists(get_parent_class($this), '__isset')) { - return call_user_func('parent::__isset', $name); + if (false !== stripos($name, '_mockery_')) { + return false; } - return false; + if (!$this->_mockery_parentClass) { + return false; + } + + if (!method_exists($this->_mockery_parentClass, '__isset')) { + return false; + } + + return call_user_func($this->_mockery_parentClass . '::__isset', $name); } public function mockery_getExpectations() @@ -646,10 +672,11 @@ class Mock implements MockInterface */ public function mockery_callSubjectMethod($name, array $args) { - if (!method_exists($this, $name) && get_parent_class($this) && method_exists(get_parent_class($this), '__call')) { - return call_user_func('parent::__call', $name, $args); + if (!method_exists($this, $name) && $this->_mockery_parentClass && method_exists($this->_mockery_parentClass, '__call')) { + return call_user_func($this->_mockery_parentClass . '::__call', $name, $args); } - return call_user_func_array('parent::' . $name, $args); + + return call_user_func_array($this->_mockery_parentClass . '::' . $name, $args); } /** @@ -668,7 +695,7 @@ class Mock implements MockInterface $rfc = new \ReflectionClass($this); // PHP 8 has Stringable interface - $interfaces = array_filter($rfc->getInterfaces(), function ($i) { + $interfaces = array_filter($rfc->getInterfaces(), static function ($i) { return $i->getName() !== 'Stringable'; }); @@ -729,6 +756,8 @@ class Mock implements MockInterface case 'int': return 0; case 'float': return 0.0; case 'bool': return false; + case 'true': return true; + case 'false': return false; case 'array': case 'iterable': @@ -736,12 +765,14 @@ class Mock implements MockInterface case 'callable': case '\Closure': - return function () { + return static function () : void { }; case '\Traversable': case '\Generator': - $generator = function () { yield; }; + $generator = static function () { + yield; + }; return $generator(); case 'void': @@ -755,6 +786,7 @@ class Mock implements MockInterface if ($this->_mockery_ignoreMissingRecursive) { $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true); } + return $mock; default: @@ -762,6 +794,7 @@ class Mock implements MockInterface if ($this->_mockery_ignoreMissingRecursive) { $mock->shouldIgnoreMissing($this->_mockery_defaultReturnValue, true); } + return $mock; } } @@ -769,65 +802,67 @@ class Mock implements MockInterface public function shouldHaveReceived($method = null, $args = null) { if ($method === null) { - return new HigherOrderMessage($this, "shouldHaveReceived"); + return new HigherOrderMessage($this, 'shouldHaveReceived'); } - $expectation = new \Mockery\VerificationExpectation($this, $method); + $expectation = new VerificationExpectation($this, $method); if (null !== $args) { $expectation->withArgs($args); } + $expectation->atLeast()->once(); - $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); - $this->_mockery_expectations_count++; + $director = new VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + ++$this->_mockery_expectations_count; $director->verify(); return $director; } public function shouldHaveBeenCalled() { - return $this->shouldHaveReceived("__invoke"); + return $this->shouldHaveReceived('__invoke'); } public function shouldNotHaveReceived($method = null, $args = null) { if ($method === null) { - return new HigherOrderMessage($this, "shouldNotHaveReceived"); + return new HigherOrderMessage($this, 'shouldNotHaveReceived'); } - $expectation = new \Mockery\VerificationExpectation($this, $method); + $expectation = new VerificationExpectation($this, $method); if (null !== $args) { $expectation->withArgs($args); } + $expectation->never(); - $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); - $this->_mockery_expectations_count++; + $director = new VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation); + ++$this->_mockery_expectations_count; $director->verify(); return null; } - public function shouldNotHaveBeenCalled(array $args = null) + public function shouldNotHaveBeenCalled(?array $args = null) { - return $this->shouldNotHaveReceived("__invoke", $args); + return $this->shouldNotHaveReceived('__invoke', $args); } protected static function _mockery_handleStaticMethodCall($method, array $args) { - $associatedRealObject = \Mockery::fetchMock(__CLASS__); + $associatedRealObject = \Mockery::fetchMock(self::class); try { return $associatedRealObject->__call($method, $args); - } catch (BadMethodCallException $e) { + } catch (BadMethodCallException $badMethodCallException) { throw new BadMethodCallException( 'Static method ' . $associatedRealObject->mockery_getName() . '::' . $method . '() does not exist on this mock object', 0, - $e + $badMethodCallException ); } } protected function _mockery_getReceivedMethodCalls() { - return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new \Mockery\ReceivedMethodCalls(); + return $this->_mockery_receivedMethodCalls ?: $this->_mockery_receivedMethodCalls = new ReceivedMethodCalls(); } /** @@ -841,6 +876,7 @@ class Mock implements MockInterface if (!isset($this->_mockery_expectations['__construct']) /* _mockery_handleMethodCall runs the other checks */) { return; } + $this->_mockery_handleMethodCall('__construct', $args); } @@ -853,16 +889,12 @@ class Mock implements MockInterface $lowerCasedMockeryExpectations = array_change_key_case($this->_mockery_expectations, CASE_LOWER); $lowerCasedMethod = strtolower($method); - if (isset($lowerCasedMockeryExpectations[$lowerCasedMethod])) { - return $lowerCasedMockeryExpectations[$lowerCasedMethod]; - } - - return null; + return $lowerCasedMockeryExpectations[$lowerCasedMethod] ?? null; } protected function _mockery_handleMethodCall($method, array $args) { - $this->_mockery_getReceivedMethodCalls()->push(new \Mockery\MethodCall($method, $args)); + $this->_mockery_getReceivedMethodCalls()->push(new MethodCall($method, $args)); $rm = $this->mockery_getMethod($method); if ($rm && $rm->isProtected() && !$this->_mockery_allowMockingProtectedMethods) { @@ -879,7 +911,11 @@ class Mock implements MockInterface // noop - there is no hasPrototype method } - return call_user_func_array("parent::$method", $args); + if (null === $this->_mockery_parentClass) { + $this->_mockery_parentClass = get_parent_class($this); + } + + return call_user_func_array($this->_mockery_parentClass . '::' . $method, $args); } $handler = $this->_mockery_findExpectedMethodHandler($method); @@ -887,7 +923,7 @@ class Mock implements MockInterface if ($handler !== null && !$this->_mockery_disableExpectationMatching) { try { return $handler->call($args); - } catch (\Mockery\Exception\NoMatchingExpectationException $e) { + } catch (NoMatchingExpectationException $e) { if (!$this->_mockery_ignoreMissing && !$this->_mockery_deferMissing) { throw $e; } @@ -895,36 +931,43 @@ class Mock implements MockInterface } if (!is_null($this->_mockery_partial) && - (method_exists($this->_mockery_partial, $method) || method_exists($this->_mockery_partial, '__call')) - ) { - return call_user_func_array(array($this->_mockery_partial, $method), $args); - } elseif ($this->_mockery_deferMissing && is_callable("parent::$method") - && (!$this->hasMethodOverloadingInParentClass() || (get_parent_class($this) && method_exists(get_parent_class($this), $method)))) { - return call_user_func_array("parent::$method", $args); - } elseif ($this->_mockery_deferMissing && get_parent_class($this) && method_exists(get_parent_class($this), '__call')) { - return call_user_func('parent::__call', $method, $args); - } elseif ($method == '__toString') { + (method_exists($this->_mockery_partial, $method) || method_exists($this->_mockery_partial, '__call'))) { + return $this->_mockery_partial->{$method}(...$args); + } + + if ($this->_mockery_deferMissing && is_callable($this->_mockery_parentClass . '::' . $method) + && (!$this->hasMethodOverloadingInParentClass() || ($this->_mockery_parentClass && method_exists($this->_mockery_parentClass, $method)))) { + return call_user_func_array($this->_mockery_parentClass . '::' . $method, $args); + } + + if ($this->_mockery_deferMissing && $this->_mockery_parentClass && method_exists($this->_mockery_parentClass, '__call')) { + return call_user_func($this->_mockery_parentClass . '::__call', $method, $args); + } + + if ($method === '__toString') { // __toString is special because we force its addition to the class API regardless of the // original implementation. Thus, we should always return a string rather than honor // _mockery_ignoreMissing and break the API with an error. - return sprintf("%s#%s", __CLASS__, spl_object_hash($this)); - } elseif ($this->_mockery_ignoreMissing) { - if (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (!is_null($this->_mockery_partial) && method_exists($this->_mockery_partial, $method)) || is_callable("parent::$method")) { - if ($this->_mockery_defaultReturnValue instanceof \Mockery\Undefined) { - return call_user_func_array(array($this->_mockery_defaultReturnValue, $method), $args); - } elseif (null === $this->_mockery_defaultReturnValue) { - return $this->mockery_returnValueForMethod($method); - } - - return $this->_mockery_defaultReturnValue; - } + return sprintf('%s#%s', self::class, spl_object_hash($this)); } - $message = 'Method ' . __CLASS__ . '::' . $method . + if ($this->_mockery_ignoreMissing && (\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed() || (!is_null($this->_mockery_partial) && method_exists($this->_mockery_partial, $method)) || is_callable($this->_mockery_parentClass . '::' . $method))) { + if ($this->_mockery_defaultReturnValue instanceof Undefined) { + return $this->_mockery_defaultReturnValue->{$method}(...$args); + } + + if (null === $this->_mockery_defaultReturnValue) { + return $this->mockery_returnValueForMethod($method); + } + + return $this->_mockery_defaultReturnValue; + } + + $message = 'Method ' . self::class . '::' . $method . '() does not exist on this mock object'; if (!is_null($rm)) { - $message = 'Received ' . __CLASS__ . + $message = 'Received ' . self::class . '::' . $method . '(), but no expectations were specified'; } @@ -945,7 +988,7 @@ class Mock implements MockInterface return static::$_mockery_methods; } - if (isset($this->_mockery_partial)) { + if ($this->_mockery_partial !== null) { $reflected = new \ReflectionObject($this->_mockery_partial); } else { $reflected = new \ReflectionClass($this); @@ -957,7 +1000,7 @@ class Mock implements MockInterface private function hasMethodOverloadingInParentClass() { // if there's __call any name would be callable - return is_callable('parent::aFunctionNameThatNoOneWouldEverUseInRealLife12345'); + return is_callable($this->_mockery_parentClass . '::aFunctionNameThatNoOneWouldEverUseInRealLife12345'); } /** @@ -966,10 +1009,10 @@ class Mock implements MockInterface private function getNonPublicMethods() { return array_map( - function ($method) { + static function ($method) { return $method->getName(); }, - array_filter($this->mockery_getMethods(), function ($method) { + array_filter($this->mockery_getMethods(), static function ($method) { return !$method->isPublic(); }) ); diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php index 7c1774b4..9dc53647 100644 --- a/vendor/mockery/mockery/library/Mockery/MockInterface.php +++ b/vendor/mockery/mockery/library/Mockery/MockInterface.php @@ -1,38 +1,28 @@ return - * @return self|\Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage + * @param mixed $something String method name or map of method => return + * + * @return Expectation|ExpectationInterface|HigherOrderMessage|self */ public function allows($something = []); /** - * @param mixed $something String method name (optional) - * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\ExpectsHigherOrderMessage + * @param mixed $something String method name (optional) + * + * @return Expectation|ExpectationInterface|ExpectsHigherOrderMessage */ public function expects($something = null); } diff --git a/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php index b0eea662..aef28b77 100644 --- a/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php +++ b/vendor/mockery/mockery/library/Mockery/QuickDefinitionsConfiguration.php @@ -1,30 +1,21 @@ matchArgs($methodCall->getArgs())) { + if (! $expectation->matchArgs($methodCall->getArgs())) { continue; } diff --git a/vendor/mockery/mockery/library/Mockery/Reflector.php b/vendor/mockery/mockery/library/Mockery/Reflector.php index 9672924c..8e4fc158 100644 --- a/vendor/mockery/mockery/library/Mockery/Reflector.php +++ b/vendor/mockery/mockery/library/Mockery/Reflector.php @@ -1,107 +1,108 @@ */ - public static function isArray(\ReflectionParameter $param) - { - $type = $param->getType(); - - return $type instanceof \ReflectionNamedType && $type->getName(); - } + public const BUILTIN_TYPES = ['array', 'bool', 'int', 'float', 'null', 'object', 'string']; /** - * Compute the string representation for the paramater type. + * List of reserved words. * - * @param \ReflectionParameter $param - * @param bool $withoutNullable - * - * @return string|null + * @var list */ - public static function getTypeHint(\ReflectionParameter $param, $withoutNullable = false) - { - if (!$param->hasType()) { - return null; - } + public const RESERVED_WORDS = ['bool', 'true', 'false', 'float', 'int', 'iterable', 'mixed', 'never', 'null', 'object', 'string', 'void']; - $type = $param->getType(); - $declaringClass = $param->getDeclaringClass(); - $typeHint = self::typeToString($type, $declaringClass); + /** + * Iterable. + * + * @var list + */ + private const ITERABLE = ['iterable']; - return (!$withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; - } + /** + * Traversable array. + * + * @var list + */ + private const TRAVERSABLE_ARRAY = ['\Traversable', 'array']; /** * Compute the string representation for the return type. * - * @param \ReflectionParameter $param * @param bool $withoutNullable * - * @return string|null + * @return null|string */ - public static function getReturnType(\ReflectionMethod $method, $withoutNullable = false) + public static function getReturnType(ReflectionMethod $method, $withoutNullable = false) { $type = $method->getReturnType(); - if (is_null($type) && method_exists($method, 'getTentativeReturnType')) { + if (! $type instanceof ReflectionType && method_exists($method, 'getTentativeReturnType')) { $type = $method->getTentativeReturnType(); } - if (is_null($type)) { + if (! $type instanceof ReflectionType) { return null; } - $typeHint = self::typeToString($type, $method->getDeclaringClass()); + $typeHint = self::getTypeFromReflectionType($type, $method->getDeclaringClass()); - return (!$withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; + return (! $withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; } /** * Compute the string representation for the simplest return type. * - * @param \ReflectionParameter $param - * - * @return string|null + * @return null|string */ - public static function getSimplestReturnType(\ReflectionMethod $method) + public static function getSimplestReturnType(ReflectionMethod $method) { $type = $method->getReturnType(); - if (is_null($type) && method_exists($method, 'getTentativeReturnType')) { + if (! $type instanceof ReflectionType && method_exists($method, 'getTentativeReturnType')) { $type = $method->getTentativeReturnType(); } - if (is_null($type) || $type->allowsNull()) { + if (! $type instanceof ReflectionType || $type->allowsNull()) { return null; } @@ -123,32 +124,139 @@ class Reflector } /** - * Get the string representation of the given type. + * Compute the string representation for the paramater type. * - * @param \ReflectionType $type - * @param string $declaringClass + * @param bool $withoutNullable * - * @return string|null + * @return null|string */ - private static function typeToString(\ReflectionType $type, \ReflectionClass $declaringClass) + public static function getTypeHint(ReflectionParameter $param, $withoutNullable = false) { - return \implode('|', \array_map(function (array $typeInformation) { - return $typeInformation['typeHint']; - }, self::getTypeInformation($type, $declaringClass))); + if (! $param->hasType()) { + return null; + } + + $type = $param->getType(); + $declaringClass = $param->getDeclaringClass(); + $typeHint = self::getTypeFromReflectionType($type, $declaringClass); + + return (! $withoutNullable && $type->allowsNull()) ? self::formatNullableType($typeHint) : $typeHint; + } + + /** + * Determine if the parameter is typed as an array. + * + * @return bool + */ + public static function isArray(ReflectionParameter $param) + { + $type = $param->getType(); + + return $type instanceof ReflectionNamedType && $type->getName(); + } + + /** + * Determine if the given type is a reserved word. + */ + public static function isReservedWord(string $type): bool + { + return in_array(strtolower($type), self::RESERVED_WORDS, true); + } + + /** + * Format the given type as a nullable type. + */ + private static function formatNullableType(string $typeHint): string + { + if ($typeHint === 'mixed') { + return $typeHint; + } + + if (strpos($typeHint, 'null') !== false) { + return $typeHint; + } + + if (PHP_VERSION_ID < 80000) { + return sprintf('?%s', $typeHint); + } + + return sprintf('%s|null', $typeHint); + } + + private static function getTypeFromReflectionType(ReflectionType $type, ReflectionClass $declaringClass): string + { + if ($type instanceof ReflectionNamedType) { + $typeHint = $type->getName(); + + if ($type->isBuiltin()) { + return $typeHint; + } + + if ($typeHint === 'static') { + return $typeHint; + } + + // 'self' needs to be resolved to the name of the declaring class + if ($typeHint === 'self') { + $typeHint = $declaringClass->getName(); + } + + // 'parent' needs to be resolved to the name of the parent class + if ($typeHint === 'parent') { + $typeHint = $declaringClass->getParentClass()->getName(); + } + + // class names need prefixing with a slash + return sprintf('\\%s', $typeHint); + } + + if ($type instanceof ReflectionIntersectionType) { + $types = array_map( + static function (ReflectionType $type) use ($declaringClass): string { + return self::getTypeFromReflectionType($type, $declaringClass); + }, + $type->getTypes() + ); + + return implode('&', $types); + } + + if ($type instanceof ReflectionUnionType) { + $types = array_map( + static function (ReflectionType $type) use ($declaringClass): string { + return self::getTypeFromReflectionType($type, $declaringClass); + }, + $type->getTypes() + ); + + $intersect = array_intersect(self::TRAVERSABLE_ARRAY, $types); + if ($intersect === self::TRAVERSABLE_ARRAY) { + $types = array_merge(self::ITERABLE, array_diff($types, self::TRAVERSABLE_ARRAY)); + } + + return implode( + '|', + array_map( + static function (string $type): string { + return strpos($type, '&') === false ? $type : sprintf('(%s)', $type); + }, + $types + ) + ); + } + + throw new InvalidArgumentException('Unknown ReflectionType: ' . get_debug_type($type)); } /** * Get the string representation of the given type. * - * @param \ReflectionType $type - * @param \ReflectionClass $declaringClass - * - * @return list + * @return list */ - private static function getTypeInformation(\ReflectionType $type, \ReflectionClass $declaringClass) + private static function getTypeInformation(ReflectionType $type, ReflectionClass $declaringClass): array { - // PHP 8 union types can be recursively processed - if ($type instanceof \ReflectionUnionType) { + // PHP 8 union types and PHP 8.1 intersection types can be recursively processed + if ($type instanceof ReflectionUnionType || $type instanceof ReflectionIntersectionType) { $types = []; foreach ($type->getTypes() as $innterType) { @@ -172,7 +280,7 @@ class Reflector return [ [ 'typeHint' => $typeHint, - 'isPrimitive' => in_array($typeHint, ['array', 'bool', 'int', 'float', 'null', 'object', 'string']), + 'isPrimitive' => in_array($typeHint, self::BUILTIN_TYPES, true), ], ]; } @@ -205,20 +313,4 @@ class Reflector ], ]; } - - /** - * Format the given type as a nullable type. - * - * @param string $typeHint - * - * @return string - */ - private static function formatNullableType($typeHint) - { - if (\PHP_VERSION_ID < 80000) { - return sprintf('?%s', $typeHint); - } - - return $typeHint === 'mixed' ? 'mixed' : sprintf('%s|null', $typeHint); - } } diff --git a/vendor/mockery/mockery/library/Mockery/Undefined.php b/vendor/mockery/mockery/library/Mockery/Undefined.php index 53b05e9c..ca3ace46 100644 --- a/vendor/mockery/mockery/library/Mockery/Undefined.php +++ b/vendor/mockery/mockery/library/Mockery/Undefined.php @@ -1,32 +1,25 @@ receivedMethodCalls = $receivedMethodCalls; $this->expectation = $expectation; } - public function verify() - { - return $this->receivedMethodCalls->verify($this->expectation); - } - - public function with(...$args) - { - return $this->cloneApplyAndVerify("with", $args); - } - - public function withArgs($args) - { - return $this->cloneApplyAndVerify("withArgs", array($args)); - } - - public function withNoArgs() - { - return $this->cloneApplyAndVerify("withNoArgs", array()); - } - - public function withAnyArgs() - { - return $this->cloneApplyAndVerify("withAnyArgs", array()); - } - - public function times($limit = null) - { - return $this->cloneWithoutCountValidatorsApplyAndVerify("times", array($limit)); - } - - public function once() - { - return $this->cloneWithoutCountValidatorsApplyAndVerify("once", array()); - } - - public function twice() - { - return $this->cloneWithoutCountValidatorsApplyAndVerify("twice", array()); - } - + /** + * @return self + */ public function atLeast() { - return $this->cloneWithoutCountValidatorsApplyAndVerify("atLeast", array()); + return $this->cloneWithoutCountValidatorsApplyAndVerify('atLeast', []); } + /** + * @return self + */ public function atMost() { - return $this->cloneWithoutCountValidatorsApplyAndVerify("atMost", array()); + return $this->cloneWithoutCountValidatorsApplyAndVerify('atMost', []); } + /** + * @param int $minimum + * @param int $maximum + * + * @return self + */ public function between($minimum, $maximum) { - return $this->cloneWithoutCountValidatorsApplyAndVerify("between", array($minimum, $maximum)); + return $this->cloneWithoutCountValidatorsApplyAndVerify('between', [$minimum, $maximum]); } - protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args) + /** + * @return self + */ + public function once() { - $expectation = clone $this->expectation; - $expectation->clearCountValidators(); - call_user_func_array(array($expectation, $method), $args); - $director = new VerificationDirector($this->receivedMethodCalls, $expectation); - $director->verify(); - return $director; + return $this->cloneWithoutCountValidatorsApplyAndVerify('once', []); } + /** + * @param int $limit + * + * @return self + */ + public function times($limit = null) + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('times', [$limit]); + } + + /** + * @return self + */ + public function twice() + { + return $this->cloneWithoutCountValidatorsApplyAndVerify('twice', []); + } + + public function verify() + { + $this->receivedMethodCalls->verify($this->expectation); + } + + /** + * @template TArgs + * + * @param TArgs $args + * + * @return self + */ + public function with(...$args) + { + return $this->cloneApplyAndVerify('with', $args); + } + + /** + * @return self + */ + public function withAnyArgs() + { + return $this->cloneApplyAndVerify('withAnyArgs', []); + } + + /** + * @template TArgs + * + * @param TArgs $args + * + * @return self + */ + public function withArgs($args) + { + return $this->cloneApplyAndVerify('withArgs', [$args]); + } + + /** + * @return self + */ + public function withNoArgs() + { + return $this->cloneApplyAndVerify('withNoArgs', []); + } + + /** + * @param string $method + * @param array $args + * + * @return self + */ protected function cloneApplyAndVerify($method, $args) { - $expectation = clone $this->expectation; - call_user_func_array(array($expectation, $method), $args); - $director = new VerificationDirector($this->receivedMethodCalls, $expectation); - $director->verify(); - return $director; + $verificationExpectation = clone $this->expectation; + + $verificationExpectation->{$method}(...$args); + + $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); + + $verificationDirector->verify(); + + return $verificationDirector; + } + + /** + * @param string $method + * @param array $args + * + * @return self + */ + protected function cloneWithoutCountValidatorsApplyAndVerify($method, $args) + { + $verificationExpectation = clone $this->expectation; + + $verificationExpectation->clearCountValidators(); + + $verificationExpectation->{$method}(...$args); + + $verificationDirector = new self($this->receivedMethodCalls, $verificationExpectation); + + $verificationDirector->verify(); + + return $verificationDirector; } } diff --git a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php index 3844a090..9e36f6c6 100644 --- a/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php +++ b/vendor/mockery/mockery/library/Mockery/VerificationExpectation.php @@ -1,35 +1,29 @@ _countValidators = array(); - } - public function __clone() { parent::__clone(); + $this->_actualCount = 0; } + + /** + * @return void + */ + public function clearCountValidators() + { + $this->_countValidators = []; + } } diff --git a/vendor/mockery/mockery/library/helpers.php b/vendor/mockery/mockery/library/helpers.php index 0756a328..8f15857a 100644 --- a/vendor/mockery/mockery/library/helpers.php +++ b/vendor/mockery/mockery/library/helpers.php @@ -1,64 +1,76 @@ |TMock|Closure(LegacyMockInterface&MockInterface&TMock):LegacyMockInterface&MockInterface&TMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TMock + */ function mock(...$args) { return Mockery::mock(...$args); } } -if (!function_exists("spy")) { +if (! \function_exists('spy')) { + /** + * @template TSpy of object + * + * @param array|TSpy|Closure(LegacyMockInterface&MockInterface&TSpy):LegacyMockInterface&MockInterface&TSpy|array> $args + * + * @return LegacyMockInterface&MockInterface&TSpy + */ function spy(...$args) { return Mockery::spy(...$args); } } -if (!function_exists("namedMock")) { +if (! \function_exists('namedMock')) { + /** + * @template TNamedMock of object + * + * @param array|TNamedMock|array> $args + * + * @return LegacyMockInterface&MockInterface&TNamedMock + */ function namedMock(...$args) { return Mockery::namedMock(...$args); } } -if (!function_exists("anyArgs")) { - function anyArgs() +if (! \function_exists('anyArgs')) { + function anyArgs(): AnyArgs { return new AnyArgs(); } } -if (!function_exists("andAnyOtherArgs")) { - function andAnyOtherArgs() +if (! \function_exists('andAnyOtherArgs')) { + function andAnyOtherArgs(): AndAnyOtherArgs { return new AndAnyOtherArgs(); } } -if (!function_exists("andAnyOthers")) { - function andAnyOthers() +if (! \function_exists('andAnyOthers')) { + function andAnyOthers(): AndAnyOtherArgs { return new AndAnyOtherArgs(); } diff --git a/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md index eb4963ba..a9a31e71 100644 --- a/vendor/monolog/monolog/CHANGELOG.md +++ b/vendor/monolog/monolog/CHANGELOG.md @@ -1,7 +1,63 @@ +### 2.9.3 (2024-04-12) + + * Fixed PHP 8.4 deprecation warnings (#1874) + +### 2.9.2 (2023-10-27) + + * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) + * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) + * Fixed normalization error when normalizing incomplete classes (#1833) + +### 2.9.1 (2023-02-06) + + * Fixed Logger not being serializable anymore (#1792) + +### 2.9.0 (2023-02-05) + + * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) + * Added support for enum context values in PsrLogMessageProcessor (#1773) + * Added graylog2/gelf-php 2.x support (#1747) + * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) + * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) + * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) + * Fixed infinite loop detection within Fibers (#1753) + * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) + +### 2.8.0 (2022-07-24) + + * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) + * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) + * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) + * Added `GoogleCloudLoggingFormatter` (#1719) + * Added support for Predis 2.x (#1732) + * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) + * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) + * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) + * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) + * Fixed PHP 8.2 deprecation warnings (#1722) + * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) + +### 2.7.0 (2022-06-09) + + * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) + * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) + * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) + * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) + * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) + +### 2.6.0 (2022-05-10) + + * Deprecated `SwiftMailerHandler`, use `SymfonyMailerHandler` instead + * Added `SymfonyMailerHandler` (#1663) + * Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662) + * Added a way to filter/modify stack traces in LineFormatter (#1665) + * Fixed UdpSocket not being able to reopen/reconnect after close() + * Fixed infinite loops if a Handler is triggering logging while handling log records + ### 2.5.0 (2022-04-08) -* Added `callType` to IntrospectionProcessor (#1612) -* Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651) + * Added `callType` to IntrospectionProcessor (#1612) + * Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651) ### 2.4.0 (2022-03-14) diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json index b151c654..a1f08a22 100644 --- a/vendor/monolog/monolog/composer.json +++ b/vendor/monolog/monolog/composer.json @@ -17,20 +17,24 @@ "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { + "ext-json": "*", "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", + "elasticsearch/elasticsearch": "^7 || ^8", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", - "graylog2/gelf-php": "^1.4.2", "php-amqplib/php-amqplib": "~2.4 || ^3", - "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.5", - "predis/predis": "^1.1", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", + "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", + "ruflin/elastica": "^7", "swiftmailer/swiftmailer": "^5.3|^6.0", - "phpstan/phpstan": "^0.12.91" + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", @@ -43,7 +47,6 @@ "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "php-console/php-console": "Allow sending log messages to Google Chrome", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", @@ -70,6 +73,9 @@ "config": { "lock": false, "sort-packages": true, - "platform-check": false + "platform-check": false, + "allow-plugins": { + "composer/package-versions-deprecated": true + } } } diff --git a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php b/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php index 6a1ba9b2..789f9bfc 100644 --- a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php +++ b/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php @@ -30,6 +30,8 @@ class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable { $this->useMicroseconds = $useMicroseconds; + // if you like to use a custom time to pass to Logger::addRecord directly, + // call modify() or setTimestamp() on this instance to change the date after creating it parent::__construct('now', $timezone); } diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php index 16794be6..1406d34e 100644 --- a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -46,8 +46,8 @@ class ErrorHandler private $fatalLevel = LogLevel::ALERT; /** @var ?string */ private $reservedMemory = null; - /** @var ?mixed */ - private $lastFatalTrace; + /** @var ?array{type: int, message: string, file: string, line: int, trace: mixed} */ + private $lastFatalData = null; /** @var int[] */ private static $fatalErrors = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; @@ -198,7 +198,7 @@ class ErrorHandler ($this->previousExceptionHandler)($e); } - if (!headers_sent() && !ini_get('display_errors')) { + if (!headers_sent() && in_array(strtolower((string) ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { http_response_code(500); } @@ -223,7 +223,7 @@ class ErrorHandler } else { $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); array_shift($trace); // Exclude handleError from trace - $this->lastFatalTrace = $trace; + $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; } if ($this->previousErrorHandler === true) { @@ -242,12 +242,18 @@ class ErrorHandler { $this->reservedMemory = ''; - $lastError = error_get_last(); + if (is_array($this->lastFatalData)) { + $lastError = $this->lastFatalData; + } else { + $lastError = error_get_last(); + } + if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { + $trace = $lastError['trace'] ?? null; $this->logger->log( $this->fatalLevel, 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace] + ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] ); if ($this->logger instanceof Logger) { diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php index 41b56b3c..867ae586 100644 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -15,6 +15,7 @@ namespace Monolog\Formatter; * formats the record to be used in the FlowdockHandler * * @author Dominik Liebler + * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 */ class FlowdockFormatter implements FormatterInterface { diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php index a1a79372..3b3e1e7f 100644 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -47,6 +47,11 @@ class GelfMessageFormatter extends NormalizerFormatter */ protected $maxLength; + /** + * @var int + */ + private $gelfVersion = 2; + /** * Translates Monolog log levels to Graylog2 log priorities. * @@ -78,6 +83,10 @@ class GelfMessageFormatter extends NormalizerFormatter $this->extraPrefix = is_null($extraPrefix) ? '' : $extraPrefix; $this->contextPrefix = $contextPrefix; $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; + + if (method_exists(Message::class, 'setFacility')) { + $this->gelfVersion = 1; + } } /** @@ -113,16 +122,20 @@ class GelfMessageFormatter extends NormalizerFormatter $message->setShortMessage(Utils::substr($record['message'], 0, $this->maxLength)); } - if (isset($record['channel'])) { - $message->setFacility($record['channel']); - } - if (isset($extra['line'])) { - $message->setLine($extra['line']); - unset($extra['line']); - } - if (isset($extra['file'])) { - $message->setFile($extra['file']); - unset($extra['file']); + if ($this->gelfVersion === 1) { + if (isset($record['channel'])) { + $message->setFacility($record['channel']); + } + if (isset($extra['line'])) { + $message->setLine($extra['line']); + unset($extra['line']); + } + if (isset($extra['file'])) { + $message->setFile($extra['file']); + unset($extra['file']); + } + } else { + $message->setAdditional('facility', $record['channel']); } foreach ($extra as $key => $val) { @@ -147,11 +160,13 @@ class GelfMessageFormatter extends NormalizerFormatter $message->setAdditional($this->contextPrefix . $key, $val); } - /** @phpstan-ignore-next-line */ - if (null === $message->getFile() && isset($context['exception']['file'])) { - if (preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { - $message->setFile($matches[1]); - $message->setLine($matches[2]); + if ($this->gelfVersion === 1) { + /** @phpstan-ignore-next-line */ + if (null === $message->getFile() && isset($context['exception']['file'])) { + if (preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { + $message->setFile($matches[1]); + $message->setLine($matches[2]); + } } } diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php index 42735a6b..b737d82e 100644 --- a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -178,12 +178,25 @@ class JsonFormatter extends NormalizerFormatter return $normalized; } - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } + if (is_object($data)) { + if ($data instanceof \DateTimeInterface) { + return $this->formatDate($data); + } - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); + if ($data instanceof Throwable) { + return $this->normalizeException($data, $depth); + } + + // if the object has specific json serializability we want to make sure we skip the __toString treatment below + if ($data instanceof \JsonSerializable) { + return $data; + } + + if (method_exists($data, '__toString')) { + return $data->__toString(); + } + + return $data; } if (is_resource($data)) { diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php index a855c525..e6e78983 100644 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -33,6 +33,8 @@ class LineFormatter extends NormalizerFormatter protected $ignoreEmptyContextAndExtra; /** @var bool */ protected $includeStacktraces; + /** @var ?callable */ + protected $stacktracesParser; /** * @param string|null $format The format of the message @@ -49,11 +51,12 @@ class LineFormatter extends NormalizerFormatter parent::__construct($dateFormat); } - public function includeStacktraces(bool $include = true): self + public function includeStacktraces(bool $include = true, ?callable $parser = null): self { $this->includeStacktraces = $include; if ($this->includeStacktraces) { $this->allowInlineLineBreaks = true; + $this->stacktracesParser = $parser; } return $this; @@ -150,6 +153,12 @@ class LineFormatter extends NormalizerFormatter if ($previous = $e->getPrevious()) { do { + $depth++; + if ($depth > $this->maxNormalizeDepth) { + $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + break; + } + $str .= "\n[previous exception] " . $this->formatException($previous); } while ($previous = $previous->getPrevious()); } @@ -177,7 +186,11 @@ class LineFormatter extends NormalizerFormatter { if ($this->allowInlineLineBreaks) { if (0 === strpos($str, '{')) { - return str_replace(array('\r', '\n'), array("\r", "\n"), $str); + $str = preg_replace('/(?getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')'; if ($this->includeStacktraces) { - $str .= "\n[stacktrace]\n" . $e->getTraceAsString() . "\n"; + $str .= $this->stacktracesParser($e); } return $str; } + + private function stacktracesParser(\Throwable $e): string + { + $trace = $e->getTraceAsString(); + + if ($this->stacktracesParser) { + $trace = $this->stacktracesParserCustom($trace); + } + + return "\n[stacktrace]\n" . $trace . "\n"; + } + + private function stacktracesParserCustom(string $trace): string + { + return implode("\n", array_filter(array_map($this->stacktracesParser, explode("\n", $trace)))); + } } diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index 0c622715..f926a842 100644 --- a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -174,6 +174,9 @@ class NormalizerFormatter implements FormatterInterface if ($data instanceof \JsonSerializable) { /** @var null|scalar|array $value */ $value = $data->jsonSerialize(); + } elseif (\get_class($data) === '__PHP_Incomplete_Class') { + $accessor = new \ArrayObject($data); + $value = (string) $accessor['__PHP_Incomplete_Class_Name']; } elseif (method_exists($data, '__toString')) { /** @var string $value */ $value = $data->__toString(); @@ -198,6 +201,10 @@ class NormalizerFormatter implements FormatterInterface */ protected function normalizeException(Throwable $e, int $depth = 0) { + if ($depth > $this->maxNormalizeDepth) { + return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization']; + } + if ($e instanceof \JsonSerializable) { return (array) $e->jsonSerialize(); } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php index e30d784d..994872ce 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -27,6 +27,31 @@ class AmqpHandler extends AbstractProcessingHandler * @var AMQPExchange|AMQPChannel $exchange */ protected $exchange; + /** @var array */ + private $extraAttributes = []; + + /** + * @return array + */ + public function getExtraAttributes(): array + { + return $this->extraAttributes; + } + + /** + * Configure extra attributes to pass to the AMQPExchange (if you are using the amqp extension) + * + * @param array $extraAttributes One of content_type, content_encoding, + * message_id, user_id, app_id, delivery_mode, + * priority, timestamp, expiration, type + * or reply_to, headers. + * @return AmqpHandler + */ + public function setExtraAttributes(array $extraAttributes): self + { + $this->extraAttributes = $extraAttributes; + return $this; + } /** * @var string @@ -60,14 +85,18 @@ class AmqpHandler extends AbstractProcessingHandler $routingKey = $this->getRoutingKey($record); if ($this->exchange instanceof AMQPExchange) { + $attributes = [ + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ]; + if ($this->extraAttributes) { + $attributes = array_merge($attributes, $this->extraAttributes); + } $this->exchange->publish( $data, $routingKey, 0, - [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ] + $attributes ); } else { $this->exchange->basic_publish( @@ -122,13 +151,14 @@ class AmqpHandler extends AbstractProcessingHandler private function createAmqpMessage(string $data): AMQPMessage { - return new AMQPMessage( - $data, - [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ] - ); + $attributes = [ + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ]; + if ($this->extraAttributes) { + $attributes = array_merge($attributes, $this->extraAttributes); + } + return new AMQPMessage($data, $attributes); } /** diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php index fa383f1c..95bbfed4 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -14,6 +14,7 @@ namespace Monolog\Handler; use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\LineFormatter; use Monolog\Utils; +use Monolog\Logger; use function count; use function headers_list; @@ -177,7 +178,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler $extra = static::dump('Extra', $record['extra']); if (empty($context) && empty($extra)) { - $script[] = static::call_array('log', static::handleStyles($record['formatted'])); + $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted'])); } else { $script = array_merge( $script, @@ -192,6 +193,20 @@ class BrowserConsoleHandler extends AbstractProcessingHandler return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; } + private static function getConsoleMethodForLevel(int $level): string + { + return [ + Logger::DEBUG => 'debug', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warn', + Logger::ERROR => 'error', + Logger::CRITICAL => 'error', + Logger::ALERT => 'error', + Logger::EMERGENCY => 'error', + ][$level] ?? 'log'; + } + /** * @return string[] */ diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php index d1a98b8f..234ecf61 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -149,7 +149,7 @@ class ChromePHPHandler extends AbstractProcessingHandler } $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode(utf8_encode($json)); + $data = base64_encode($json); if (strlen($data) > 3 * 1024) { self::$overflowed = true; @@ -163,8 +163,8 @@ class ChromePHPHandler extends AbstractProcessingHandler 'extra' => [], ]; self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, null, true); - $data = base64_encode(utf8_encode($json)); + $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); + $data = base64_encode($json); } if (trim($data) !== '') { diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php index fc8f58f1..3535a4fc 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -17,8 +17,9 @@ use Monolog\Utils; /** * Logs to Cube. * - * @link http://square.github.com/cube/ + * @link https://github.com/square/cube/wiki * @author Wan Chen + * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 */ class CubeHandler extends AbstractProcessingHandler { diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php index b9d323d8..e88375c0 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php @@ -11,6 +11,7 @@ namespace Monolog\Handler; +use Elastic\Elasticsearch\Response\Elasticsearch; use Throwable; use RuntimeException; use Monolog\Logger; @@ -19,6 +20,8 @@ use Monolog\Formatter\ElasticsearchFormatter; use InvalidArgumentException; use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; use Elasticsearch\Client; +use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; +use Elastic\Elasticsearch\Client as Client8; /** * Elasticsearch handler @@ -44,7 +47,7 @@ use Elasticsearch\Client; class ElasticsearchHandler extends AbstractProcessingHandler { /** - * @var Client + * @var Client|Client8 */ protected $client; @@ -54,11 +57,20 @@ class ElasticsearchHandler extends AbstractProcessingHandler protected $options = []; /** - * @param Client $client Elasticsearch Client object - * @param mixed[] $options Handler configuration + * @var bool */ - public function __construct(Client $client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) + private $needsType; + + /** + * @param Client|Client8 $client Elasticsearch Client object + * @param mixed[] $options Handler configuration + */ + public function __construct($client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) { + if (!$client instanceof Client && !$client instanceof Client8) { + throw new \TypeError('Elasticsearch\Client or Elastic\Elasticsearch\Client instance required'); + } + parent::__construct($level, $bubble); $this->client = $client; $this->options = array_merge( @@ -69,6 +81,14 @@ class ElasticsearchHandler extends AbstractProcessingHandler ], $options ); + + if ($client instanceof Client8 || $client::VERSION[0] === '7') { + $this->needsType = false; + // force the type to _doc for ES8/ES7 + $this->options['type'] = '_doc'; + } else { + $this->needsType = true; + } } /** @@ -133,9 +153,11 @@ class ElasticsearchHandler extends AbstractProcessingHandler foreach ($records as $record) { $params['body'][] = [ - 'index' => [ + 'index' => $this->needsType ? [ '_index' => $record['_index'], '_type' => $record['_type'], + ] : [ + '_index' => $record['_index'], ], ]; unset($record['_index'], $record['_type']); @@ -143,6 +165,7 @@ class ElasticsearchHandler extends AbstractProcessingHandler $params['body'][] = $record; } + /** @var Elasticsearch */ $responses = $this->client->bulk($params); if ($responses['errors'] === true) { @@ -160,9 +183,9 @@ class ElasticsearchHandler extends AbstractProcessingHandler * * Only the first error is converted into an exception. * - * @param mixed[] $responses returned by $this->client->bulk() + * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() */ - protected function createExceptionFromResponses(array $responses): ElasticsearchRuntimeException + protected function createExceptionFromResponses($responses): Throwable { foreach ($responses['items'] ?? [] as $item) { if (isset($item['index']['error'])) { @@ -170,6 +193,10 @@ class ElasticsearchHandler extends AbstractProcessingHandler } } + if (class_exists(ElasticInvalidArgumentException::class)) { + return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); + } + return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); } @@ -178,10 +205,14 @@ class ElasticsearchHandler extends AbstractProcessingHandler * * @param mixed[] $error */ - protected function createExceptionFromError(array $error): ElasticsearchRuntimeException + protected function createExceptionFromError(array $error): Throwable { $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; + if (class_exists(ElasticInvalidArgumentException::class)) { + return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); + } + return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); } } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php index 718f17ef..5e43e1dc 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -161,7 +161,7 @@ class FilterHandler extends Handler implements ProcessableHandlerInterface, Rese * * @phpstan-param Record $record */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof HandlerInterface) { $this->handler = ($this->handler)($record, $this); diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php index 0627b445..dfcb3af2 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -210,7 +210,7 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa * * @phpstan-param Record $record */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof HandlerInterface) { $this->handler = ($this->handler)($record, $this); diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php index b837bdb6..5715d580 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -28,6 +28,7 @@ use Monolog\Formatter\FormatterInterface; * @see https://www.flowdock.com/api/push * * @phpstan-import-type FormattedRecord from AbstractProcessingHandler + * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 */ class FlowdockHandler extends SocketHandler { diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/vendor/monolog/monolog/src/Monolog/Handler/Handler.php index afef2fd7..34b4935d 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/Handler.php @@ -48,6 +48,15 @@ abstract class Handler implements HandlerInterface { $this->close(); - return array_keys(get_object_vars($this)); + $reflClass = new \ReflectionClass($this); + + $keys = []; + foreach ($reflClass->getProperties() as $reflProp) { + if (!$reflProp->isStatic()) { + $keys[] = $reflProp->getName(); + } + } + + return $keys; } } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php index 6e209b19..23a1d117 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -25,7 +25,7 @@ use PhpConsole\Helper; * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely * * Usage: - * 1. Install Google Chrome extension https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef + * 1. Install Google Chrome extension [now dead and removed from the chrome store] * 2. See overview https://github.com/barbushin/php-console#overview * 3. Install PHP Console library https://github.com/barbushin/php-console#installation * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) @@ -39,6 +39,7 @@ use PhpConsole\Helper; * @author Sergey Barbushin https://www.linkedin.com/in/barbushin * * @phpstan-import-type Record from \Monolog\Logger + * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 */ class PHPConsoleHandler extends AbstractProcessingHandler { diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php index 938eee6b..91d16eaf 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -30,7 +30,7 @@ use Monolog\Logger; */ class RedisHandler extends AbstractProcessingHandler { - /** @var \Predis\Client|\Redis */ + /** @var \Predis\Client<\Predis\Client>|\Redis */ private $redisClient; /** @var string */ private $redisKey; @@ -38,7 +38,7 @@ class RedisHandler extends AbstractProcessingHandler protected $capSize; /** - * @param \Predis\Client|\Redis $redis The redis instance + * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance * @param string $key The key name to push records to * @param int $capSize Number of entries to limit list size to, 0 = unlimited */ diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php index f9fede8e..7789309c 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php @@ -28,13 +28,13 @@ use Monolog\Logger; */ class RedisPubSubHandler extends AbstractProcessingHandler { - /** @var \Predis\Client|\Redis */ + /** @var \Predis\Client<\Predis\Client>|\Redis */ private $redisClient; /** @var string */ private $channelKey; /** - * @param \Predis\Client|\Redis $redis The redis instance + * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance * @param string $key The channel key to publish records to */ public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true) diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php index 2b7c4803..17745d22 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -191,7 +191,11 @@ class RotatingFileHandler extends StreamHandler $fileInfo = pathinfo($this->filename); $glob = str_replace( ['{filename}', '{date}'], - [$fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'], + [$fileInfo['filename'], str_replace( + ['Y', 'y', 'm', 'd'], + ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], + $this->dateFormat) + ], $fileInfo['dirname'] . '/' . $this->filenameFormat ); if (isset($fileInfo['extension'])) { diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php index c128a32d..25cce07f 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -90,7 +90,7 @@ class SamplingHandler extends AbstractHandler implements ProcessableHandlerInter * * @return HandlerInterface */ - public function getHandler(array $record = null) + public function getHandler(?array $record = null) { if (!$this->handler instanceof HandlerInterface) { $this->handler = ($this->handler)($record, $this); diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php index 71a41094..9ae10037 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -100,7 +100,7 @@ class SlackRecord bool $useShortAttachment = false, bool $includeContextAndExtra = false, array $excludeFields = array(), - FormatterInterface $formatter = null + ?FormatterInterface $formatter = null ) { $this ->setChannel($channel) diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php index e6c79569..82c048e1 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -135,11 +135,14 @@ class StreamHandler extends AbstractProcessingHandler $this->createDir($url); $this->errorMessage = null; set_error_handler([$this, 'customErrorHandler']); - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); + try { + $stream = fopen($url, 'a'); + if ($this->filePermission !== null) { + @chmod($url, $this->filePermission); + } + } finally { + restore_error_handler(); } - restore_error_handler(); if (!is_resource($stream)) { $this->stream = null; @@ -212,7 +215,7 @@ class StreamHandler extends AbstractProcessingHandler set_error_handler([$this, 'customErrorHandler']); $status = mkdir($dir, 0777, true); restore_error_handler(); - if (false === $status && !is_dir($dir)) { + if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); } } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php index be7e2a58..fae92514 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php @@ -24,6 +24,7 @@ use Swift; * @author Gyula Sallai * * @phpstan-import-type Record from \Monolog\Logger + * @deprecated Since Monolog 2.6. Use SymfonyMailerHandler instead. */ class SwiftMailerHandler extends MailHandler { @@ -42,6 +43,8 @@ class SwiftMailerHandler extends MailHandler { parent::__construct($level, $bubble); + @trigger_error('The SwiftMailerHandler is deprecated since Monolog 2.6. Use SymfonyMailerHandler instead.', E_USER_DEPRECATED); + $this->mailer = $mailer; $this->messageTemplate = $message; } diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php index 30b5186b..dbd8ef69 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -23,20 +23,12 @@ class UdpSocket /** @var int */ protected $port; /** @var resource|Socket|null */ - protected $socket; + protected $socket = null; public function __construct(string $ip, int $port = 514) { $this->ip = $ip; $this->port = $port; - $domain = AF_INET; - $protocol = SOL_UDP; - // Check if we are using unix sockets. - if ($port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; - } - $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null; } /** @@ -57,12 +49,34 @@ class UdpSocket } } + /** + * @return resource|Socket + */ + protected function getSocket() + { + if (null !== $this->socket) { + return $this->socket; + } + + $domain = AF_INET; + $protocol = SOL_UDP; + // Check if we are using unix sockets. + if ($this->port === 0) { + $domain = AF_UNIX; + $protocol = IPPROTO_IP; + } + + $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null; + if (null === $this->socket) { + throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); + } + + return $this->socket; + } + protected function send(string $chunk): void { - if (!is_resource($this->socket) && !$this->socket instanceof Socket) { - throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore'); - } - socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); + socket_sendto($this->getSocket(), $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); } protected function assembleMessage(string $line, string $header): string diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php index 8912eba5..a6223b79 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php @@ -108,9 +108,9 @@ class TelegramBotHandler extends AbstractProcessingHandler string $channel, $level = Logger::DEBUG, bool $bubble = true, - string $parseMode = null, - bool $disableWebPagePreview = null, - bool $disableNotification = null, + ?string $parseMode = null, + ?bool $disableWebPagePreview = null, + ?bool $disableNotification = null, bool $splitLongMessages = false, bool $delayBetweenMessages = false ) @@ -130,7 +130,7 @@ class TelegramBotHandler extends AbstractProcessingHandler $this->delayBetweenMessages($delayBetweenMessages); } - public function setParseMode(string $parseMode = null): self + public function setParseMode(?string $parseMode = null): self { if ($parseMode !== null && !in_array($parseMode, self::AVAILABLE_PARSE_MODES)) { throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); @@ -141,14 +141,14 @@ class TelegramBotHandler extends AbstractProcessingHandler return $this; } - public function disableWebPagePreview(bool $disableWebPagePreview = null): self + public function disableWebPagePreview(?bool $disableWebPagePreview = null): self { $this->disableWebPagePreview = $disableWebPagePreview; return $this; } - public function disableNotification(bool $disableNotification = null): self + public function disableNotification(?bool $disableNotification = null): self { $this->disableNotification = $disableNotification; diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php index 2dd13672..b6d3d3b1 100644 --- a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -64,4 +64,18 @@ class WhatFailureGroupHandler extends GroupHandler } } } + + /** + * {@inheritDoc} + */ + public function close(): void + { + foreach ($this->handlers as $handler) { + try { + $handler->close(); + } catch (\Throwable $e) { + // What failure? + } + } + } } diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php index 1f4ef7f1..3c588a70 100644 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ b/vendor/monolog/monolog/src/Monolog/Logger.php @@ -111,6 +111,22 @@ class Logger implements LoggerInterface, ResettableInterface self::EMERGENCY => 'EMERGENCY', ]; + /** + * Mapping between levels numbers defined in RFC 5424 and Monolog ones + * + * @phpstan-var array $rfc_5424_levels + */ + private const RFC_5424_LEVELS = [ + 7 => self::DEBUG, + 6 => self::INFO, + 5 => self::NOTICE, + 4 => self::WARNING, + 3 => self::ERROR, + 2 => self::CRITICAL, + 1 => self::ALERT, + 0 => self::EMERGENCY, + ]; + /** * @var string */ @@ -147,6 +163,23 @@ class Logger implements LoggerInterface, ResettableInterface */ protected $exceptionHandler; + /** + * @var int Keeps track of depth to prevent infinite logging loops + */ + private $logDepth = 0; + + /** + * @var \WeakMap<\Fiber, int>|null Keeps track of depth inside fibers to prevent infinite logging loops + */ + private $fiberLogDepth; + + /** + * @var bool Whether to detect infinite logging loops + * + * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this + */ + private $detectCycles = true; + /** * @psalm-param array $processors * @@ -161,6 +194,13 @@ class Logger implements LoggerInterface, ResettableInterface $this->setHandlers($handlers); $this->processors = $processors; $this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get() ?: 'UTC'); + + if (\PHP_VERSION_ID >= 80100) { + // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 + /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ + $fiberLogDepth = new \WeakMap(); + $this->fiberLogDepth = $fiberLogDepth; + } } public function getName(): string @@ -279,42 +319,85 @@ class Logger implements LoggerInterface, ResettableInterface return $this; } + public function useLoggingLoopDetection(bool $detectCycles): self + { + $this->detectCycles = $detectCycles; + + return $this; + } + /** * Adds a log record. * - * @param int $level The logging level - * @param string $message The log message - * @param mixed[] $context The log context - * @return bool Whether the record has been processed + * @param int $level The logging level (a Monolog or RFC 5424 level) + * @param string $message The log message + * @param mixed[] $context The log context + * @param DateTimeImmutable $datetime Optional log date to log into the past or future + * @return bool Whether the record has been processed * * @phpstan-param Level $level */ - public function addRecord(int $level, string $message, array $context = []): bool + public function addRecord(int $level, string $message, array $context = [], ?DateTimeImmutable $datetime = null): bool { - $record = null; + if (isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; + } - foreach ($this->handlers as $handler) { - if (null === $record) { - // skip creating the record as long as no handler is going to handle it - if (!$handler->isHandling(['level' => $level])) { - continue; + if ($this->detectCycles) { + if (\PHP_VERSION_ID >= 80100 && $fiber = \Fiber::getCurrent()) { + $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; + $logDepth = ++$this->fiberLogDepth[$fiber]; + } else { + $logDepth = ++$this->logDepth; + } + } else { + $logDepth = 0; + } + + if ($logDepth === 3) { + $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); + return false; + } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above + return false; + } + + try { + $record = null; + + foreach ($this->handlers as $handler) { + if (null === $record) { + // skip creating the record as long as no handler is going to handle it + if (!$handler->isHandling(['level' => $level])) { + continue; + } + + $levelName = static::getLevelName($level); + + $record = [ + 'message' => $message, + 'context' => $context, + 'level' => $level, + 'level_name' => $levelName, + 'channel' => $this->name, + 'datetime' => $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), + 'extra' => [], + ]; + + try { + foreach ($this->processors as $processor) { + $record = $processor($record); + } + } catch (Throwable $e) { + $this->handleException($e, $record); + + return true; + } } - $levelName = static::getLevelName($level); - - $record = [ - 'message' => $message, - 'context' => $context, - 'level' => $level, - 'level_name' => $levelName, - 'channel' => $this->name, - 'datetime' => new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - 'extra' => [], - ]; - + // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted try { - foreach ($this->processors as $processor) { - $record = $processor($record); + if (true === $handler->handle($record)) { + break; } } catch (Throwable $e) { $this->handleException($e, $record); @@ -322,16 +405,13 @@ class Logger implements LoggerInterface, ResettableInterface return true; } } - - // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted - try { - if (true === $handler->handle($record)) { - break; + } finally { + if ($this->detectCycles) { + if (isset($fiber)) { + $this->fiberLogDepth[$fiber]--; + } else { + $this->logDepth--; } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; } } @@ -484,7 +564,7 @@ class Logger implements LoggerInterface, ResettableInterface * * This method allows for compatibility with common interfaces. * - * @param mixed $level The log level + * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) * @param string|Stringable $message The log message * @param mixed[] $context The log context * @@ -496,6 +576,10 @@ class Logger implements LoggerInterface, ResettableInterface throw new \InvalidArgumentException('$level is expected to be a string or int'); } + if (isset(self::RFC_5424_LEVELS[$level])) { + $level = self::RFC_5424_LEVELS[$level]; + } + $level = static::toMonologLevel($level); $this->addRecord($level, (string) $message, $context); @@ -638,4 +722,40 @@ class Logger implements LoggerInterface, ResettableInterface ($this->exceptionHandler)($e, $record); } + + /** + * @return array + */ + public function __serialize(): array + { + return [ + 'name' => $this->name, + 'handlers' => $this->handlers, + 'processors' => $this->processors, + 'microsecondTimestamps' => $this->microsecondTimestamps, + 'timezone' => $this->timezone, + 'exceptionHandler' => $this->exceptionHandler, + 'logDepth' => $this->logDepth, + 'detectCycles' => $this->detectCycles, + ]; + } + + /** + * @param array $data + */ + public function __unserialize(array $data): void + { + foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { + if (isset($data[$property])) { + $this->$property = $data[$property]; + } + } + + if (\PHP_VERSION_ID >= 80100) { + // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 + /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ + $fiberLogDepth = new \WeakMap(); + $this->fiberLogDepth = $fiberLogDepth; + } + } } diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php index 2c2a00e7..e7c12176 100644 --- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -66,6 +66,8 @@ class PsrLogMessageProcessor implements ProcessorInterface } else { $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); } + } elseif ($val instanceof \UnitEnum) { + $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; } elseif (is_object($val)) { $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; } elseif (is_array($val)) { diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php index 51850e17..887f4d39 100644 --- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -43,7 +43,7 @@ class WebProcessor implements ProcessorInterface * @param array|\ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data */ - public function __construct($serverData = null, array $extraFields = null) + public function __construct($serverData = null, ?array $extraFields = null) { if (null === $serverData) { $this->serverData = &$_SERVER; diff --git a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/vendor/monolog/monolog/src/Monolog/Test/TestCase.php index 1824fde4..bc0b425e 100644 --- a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php +++ b/vendor/monolog/monolog/src/Monolog/Test/TestCase.php @@ -22,9 +22,20 @@ use Monolog\Formatter\FormatterInterface; * * @phpstan-import-type Record from \Monolog\Logger * @phpstan-import-type Level from \Monolog\Logger + * + * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 */ class TestCase extends \PHPUnit\Framework\TestCase { + public function tearDown(): void + { + parent::tearDown(); + + if (isset($this->handler)) { + unset($this->handler); + } + } + /** * @param mixed[] $context * diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php index 726c9819..360c4219 100644 --- a/vendor/monolog/monolog/src/Monolog/Utils.php +++ b/vendor/monolog/monolog/src/Monolog/Utils.php @@ -211,7 +211,7 @@ final class Utils $data = preg_replace_callback( '/[\x80-\xFF]+/', function ($m) { - return utf8_encode($m[0]); + return function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); }, $data ); diff --git a/vendor/myclabs/deep-copy/README.md b/vendor/myclabs/deep-copy/README.md index 503e93df..94aaa06d 100644 --- a/vendor/myclabs/deep-copy/README.md +++ b/vendor/myclabs/deep-copy/README.md @@ -186,6 +186,9 @@ $matcher = new TypeMatcher('Doctrine\Common\Collections\Collection'); - `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher` - `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher` +By design, matching a filter will stop the chain of filters (i.e. the next ones will not be applied). +Using the ([`ChainableFilter`](#chainablefilter-filter)) won't stop the chain of filters. + #### `SetNullFilter` (filter) @@ -226,6 +229,34 @@ $copy = $copier->copy($object); ``` +#### `ChainableFilter` (filter) + +If you use cloning on proxy classes, you might want to apply two filters for: +1. loading the data +2. applying a transformation + +You can use the `ChainableFilter` as a decorator of the proxy loader filter, which won't stop the chain of filters (i.e. +the next ones may be applied). + + +```php +use DeepCopy\DeepCopy; +use DeepCopy\Filter\ChainableFilter; +use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; +use DeepCopy\Filter\SetNullFilter; +use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; +use DeepCopy\Matcher\PropertyNameMatcher; + +$copier = new DeepCopy(); +$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); +$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); + +$copy = $copier->copy($object); + +echo $copy->id; // null +``` + + #### `DoctrineCollectionFilter` (filter) If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: @@ -268,6 +299,8 @@ Doctrine proxy class (...\\\_\_CG\_\_\Proxy). You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class. **Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded before other filters are applied!** +We recommend to decorate the `DoctrineProxyFilter` with the `ChainableFilter` to allow applying other filters to the +cloned lazy loaded entities. ```php use DeepCopy\DeepCopy; @@ -275,7 +308,7 @@ use DeepCopy\Filter\Doctrine\DoctrineProxyFilter; use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher; $copier = new DeepCopy(); -$copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher()); +$copier->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher()); $copy = $copier->copy($object); diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php index 5e68c64e..6e766d80 100644 --- a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +++ b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php @@ -7,6 +7,7 @@ use DateInterval; use DateTimeInterface; use DateTimeZone; use DeepCopy\Exception\CloneException; +use DeepCopy\Filter\ChainableFilter; use DeepCopy\Filter\Filter; use DeepCopy\Matcher\Matcher; use DeepCopy\Reflection\ReflectionHelper; @@ -239,6 +240,10 @@ class DeepCopy } ); + if ($filter instanceof ChainableFilter) { + continue; + } + // If a filter matches, we stop processing this property return; } diff --git a/vendor/nesbot/carbon/bin/carbon b/vendor/nesbot/carbon/bin/carbon old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/composer.json b/vendor/nesbot/carbon/composer.json index 84ec1361..48366b5d 100644 --- a/vendor/nesbot/carbon/composer.json +++ b/vendor/nesbot/carbon/composer.json @@ -1,14 +1,13 @@ { "name": "nesbot/carbon", - "type": "library", "description": "An API extension for DateTime that supports 281 different languages.", + "license": "MIT", + "type": "library", "keywords": [ "date", "time", "DateTime" ], - "homepage": "https://carbon.nesbot.com", - "license": "MIT", "authors": [ { "name": "Brian Nesbitt", @@ -20,31 +19,77 @@ "homepage": "https://github.com/kylekatarnls" } ], + "homepage": "https://carbon.nesbot.com", + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon", + "docs": "https://carbon.nesbot.com/docs" + }, + "funding": [ + { + "url": "https://github.com/sponsors/kylekatarnls", + "type": "github" + }, + { + "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", + "type": "tidelift" + }, + { + "url": "https://opencollective.com/Carbon#sponsor", + "type": "opencollective" + } + ], "require": { "php": "^7.1.8 || ^8.0", "ext-json": "*", + "carbonphp/carbon-doctrine-types": "*", + "psr/clock": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", - "doctrine/orm": "^2.7", + "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", + "doctrine/orm": "^2.7 || ^3.0", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", + "ondrejmirtes/better-reflection": "*", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpstan/phpstan": "^0.12.99 || ^1.7.14", + "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", + "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", "squizlabs/php_codesniffer": "^3.4" }, - "config": { - "process-timeout": 0, - "sort-packages": true, - "allow-plugins": { - "phpstan/extension-installer": true + "provide": { + "psr/clock-implementation": "1.0" + }, + "minimum-stability": "dev", + "prefer-stable": true, + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + }, + "files": [ + "tests/Laravel/ServiceProvider.php" + ] + }, + "bin": [ + "bin/carbon" + ], + "config": { + "allow-plugins": { + "phpstan/extension-installer": true, + "composer/package-versions-deprecated": true + }, + "process-timeout": 0, + "sort-packages": true + }, "extra": { "branch-alias": { "dev-3.x": "3.x-dev", @@ -61,28 +106,11 @@ ] } }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - }, - "files": [ - "tests/Laravel/ServiceProvider.php" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true, - "bin": [ - "bin/carbon" - ], "scripts": { "phpcs": "php-cs-fixer fix -v --diff --dry-run", "phpdoc": "php phpdoc.php", "phpmd": "phpmd src text /phpmd.xml", + "phpmd-test": "phpmd tests text /tests/phpmd-test.xml", "phpstan": "phpstan analyse --configuration phpstan.neon", "phpunit": "phpunit --verbose", "style-check": [ @@ -93,11 +121,7 @@ "test": [ "@phpunit", "@style-check" - ] - }, - "support": { - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon", - "docs": "https://carbon.nesbot.com/docs" + ], + "sponsors": "php sponsors.php" } } diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php index eacd9c1e..f615b3a6 100644 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php +++ b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php @@ -14,14 +14,16 @@ declare(strict_types=1); namespace Carbon\PHPStan; if (!class_exists(LazyMacro::class, false)) { - abstract class LazyMacro extends AbstractMacro + abstract class LazyMacro extends AbstractReflectionMacro { /** * {@inheritdoc} */ public function getFileName(): ?string { - return $this->reflectionFunction->getFileName(); + $file = $this->reflectionFunction->getFileName(); + + return (($file ? realpath($file) : null) ?: $file) ?: null; } /** diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php index 3e9fcf4f..bf64c1dd 100644 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php +++ b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Carbon\PHPStan; if (!class_exists(LazyMacro::class, false)) { - abstract class LazyMacro extends AbstractMacro + abstract class LazyMacro extends AbstractReflectionMacro { /** * {@inheritdoc} @@ -23,7 +23,9 @@ if (!class_exists(LazyMacro::class, false)) { */ public function getFileName() { - return $this->reflectionFunction->getFileName(); + $file = $this->reflectionFunction->getFileName(); + + return (($file ? realpath($file) : null) ?: $file) ?: null; } /** diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md index 5d827219..3f411770 100644 --- a/vendor/nesbot/carbon/readme.md +++ b/vendor/nesbot/carbon/readme.md @@ -2,7 +2,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) [![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) -[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://actions-badge.atrox.dev/briannesbitt/Carbon/goto) +[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://github.com/briannesbitt/Carbon/actions) [![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) [![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) @@ -119,21 +119,52 @@ This project exists thanks to all the people who contribute. Support this project by becoming a sponsor. Your logo will show up here with a link to your website. - - - - - - - + +Онлайн казино +CasinoHex Canada +Probukmacher +Игровые автоматы +Casino-portugal.pt +Slots City +inkedin +Онлайн казино України +OnlineCasinosSpelen +Best non Gamstop sites in the UK +Real Money Pokies +Non GamStop Bookies UK +Онлайн Казино Украины +SSSTwitter +Non-GamStop Bets UK +Chudovo +UK Casino Gap +NZ Casino Deps +NonStopCasino.org +Migliori Siti Non AAMS +UK NonGamStopCasinos +SnapTik +IG Downloader +Proxidize +Blastup +AzuraCast +Triplebyte +GitHub Sponsors +Salesforce + -[[Become a sponsor](https://opencollective.com/Carbon#sponsor)] +[[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)] + + + + + + +[[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)] ### Backers Thank you to all our backers! 🙏 - + [[Become a backer](https://opencollective.com/Carbon#backer)] diff --git a/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php b/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php index 48441e7c..8b8fe089 100644 --- a/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php +++ b/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php @@ -11,6 +11,7 @@ namespace Carbon; +use Carbon\MessageFormatter\MessageFormatterMapper; use Closure; use ReflectionException; use ReflectionFunction; @@ -51,7 +52,7 @@ abstract class AbstractTranslator extends Translation\Translator /** * List of locales aliases. * - * @var string[] + * @var array */ protected $aliases = [ 'me' => 'sr_Latn_ME', @@ -83,7 +84,7 @@ abstract class AbstractTranslator extends Translation\Translator $this->initializing = true; $this->directories = [__DIR__.'/Lang']; $this->addLoader('array', new ArrayLoader()); - parent::__construct($locale, $formatter, $cacheDir, $debug); + parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug); $this->initializing = false; } @@ -220,8 +221,8 @@ abstract class AbstractTranslator extends Translation\Translator $catalogue = $this->getCatalogue($locale); $format = $this instanceof TranslatorStrongTypeInterface - ? $this->getFromCatalogue($catalogue, (string) $id, $domain) // @codeCoverageIgnore - : $this->getCatalogue($locale)->get((string) $id, $domain); + ? $this->getFromCatalogue($catalogue, (string) $id, $domain) + : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore if ($format instanceof Closure) { // @codeCoverageIgnoreStart @@ -250,11 +251,7 @@ abstract class AbstractTranslator extends Translation\Translator */ protected function loadMessagesFromFile($locale) { - if (isset($this->messages[$locale])) { - return true; - } - - return $this->resetMessages($locale); + return isset($this->messages[$locale]) || $this->resetMessages($locale); } /** @@ -311,7 +308,7 @@ abstract class AbstractTranslator extends Translation\Translator */ public function setLocale($locale) { - $locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) { + $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { // _2-letters or YUE is a region, _3+-letters is a variant $upper = strtoupper($matches[1]); @@ -359,13 +356,13 @@ abstract class AbstractTranslator extends Translation\Translator parent::setLocale($macroLocale); } - if ($this->loadMessagesFromFile($locale) || $this->initializing) { - parent::setLocale($locale); - - return true; + if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { + return false; } - return false; + parent::setLocale($locale); + + return true; } /** diff --git a/vendor/nesbot/carbon/src/Carbon/Carbon.php b/vendor/nesbot/carbon/src/Carbon/Carbon.php index e327590e..e32569ae 100644 --- a/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -33,477 +33,477 @@ use DateTimeZone; * @property int $second * @property int $micro * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English * @property int $milliseconds * @property int $millisecond * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method $this years(int $value) Set current instance year to the given value. - * @method $this year(int $value) Set current instance year to the given value. - * @method $this setYears(int $value) Set current instance year to the given value. - * @method $this setYear(int $value) Set current instance year to the given value. - * @method $this months(int $value) Set current instance month to the given value. - * @method $this month(int $value) Set current instance month to the given value. - * @method $this setMonths(int $value) Set current instance month to the given value. - * @method $this setMonth(int $value) Set current instance month to the given value. - * @method $this days(int $value) Set current instance day to the given value. - * @method $this day(int $value) Set current instance day to the given value. - * @method $this setDays(int $value) Set current instance day to the given value. - * @method $this setDay(int $value) Set current instance day to the given value. - * @method $this hours(int $value) Set current instance hour to the given value. - * @method $this hour(int $value) Set current instance hour to the given value. - * @method $this setHours(int $value) Set current instance hour to the given value. - * @method $this setHour(int $value) Set current instance hour to the given value. - * @method $this minutes(int $value) Set current instance minute to the given value. - * @method $this minute(int $value) Set current instance minute to the given value. - * @method $this setMinutes(int $value) Set current instance minute to the given value. - * @method $this setMinute(int $value) Set current instance minute to the given value. - * @method $this seconds(int $value) Set current instance second to the given value. - * @method $this second(int $value) Set current instance second to the given value. - * @method $this setSeconds(int $value) Set current instance second to the given value. - * @method $this setSecond(int $value) Set current instance second to the given value. - * @method $this millis(int $value) Set current instance millisecond to the given value. - * @method $this milli(int $value) Set current instance millisecond to the given value. - * @method $this setMillis(int $value) Set current instance millisecond to the given value. - * @method $this setMilli(int $value) Set current instance millisecond to the given value. - * @method $this milliseconds(int $value) Set current instance millisecond to the given value. - * @method $this millisecond(int $value) Set current instance millisecond to the given value. - * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. - * @method $this micros(int $value) Set current instance microsecond to the given value. - * @method $this micro(int $value) Set current instance microsecond to the given value. - * @method $this setMicros(int $value) Set current instance microsecond to the given value. - * @method $this setMicro(int $value) Set current instance microsecond to the given value. - * @method $this microseconds(int $value) Set current instance microsecond to the given value. - * @method $this microsecond(int $value) Set current instance microsecond to the given value. - * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method $this addYear() Add one year to the instance (using date interval). - * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method $this subYear() Sub one year to the instance (using date interval). - * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method $this addMonth() Add one month to the instance (using date interval). - * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method $this subMonth() Sub one month to the instance (using date interval). - * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method $this addDay() Add one day to the instance (using date interval). - * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method $this subDay() Sub one day to the instance (using date interval). - * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method $this addHour() Add one hour to the instance (using date interval). - * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method $this subHour() Sub one hour to the instance (using date interval). - * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method $this addMinute() Add one minute to the instance (using date interval). - * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method $this subMinute() Sub one minute to the instance (using date interval). - * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method $this addSecond() Add one second to the instance (using date interval). - * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method $this subSecond() Sub one second to the instance (using date interval). - * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMilli() Add one millisecond to the instance (using date interval). - * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMilli() Sub one millisecond to the instance (using date interval). - * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMillisecond() Add one millisecond to the instance (using date interval). - * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). - * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMicro() Add one microsecond to the instance (using date interval). - * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMicro() Sub one microsecond to the instance (using date interval). - * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). - * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method $this addMillennium() Add one millennium to the instance (using date interval). - * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method $this subMillennium() Sub one millennium to the instance (using date interval). - * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method $this addCentury() Add one century to the instance (using date interval). - * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method $this subCentury() Sub one century to the instance (using date interval). - * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method $this addDecade() Add one decade to the instance (using date interval). - * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method $this subDecade() Sub one decade to the instance (using date interval). - * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method $this addQuarter() Add one quarter to the instance (using date interval). - * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method $this subQuarter() Sub one quarter to the instance (using date interval). - * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method $this addWeek() Add one week to the instance (using date interval). - * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method $this subWeek() Sub one week to the instance (using date interval). - * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method $this addWeekday() Add one weekday to the instance (using date interval). - * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method $this subWeekday() Sub one weekday to the instance (using date interval). - * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). - * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). - * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealSecond() Add one second to the instance (using timestamp). - * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMinute() Add one minute to the instance (using timestamp). - * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method $this addRealHour() Add one hour to the instance (using timestamp). - * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method $this subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method $this addRealDay() Add one day to the instance (using timestamp). - * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method $this subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method $this addRealWeek() Add one week to the instance (using timestamp). - * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method $this subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMonth() Add one month to the instance (using timestamp). - * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). - * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method $this addRealYear() Add one year to the instance (using timestamp). - * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method $this subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method $this addRealDecade() Add one decade to the instance (using timestamp). - * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method $this subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method $this addRealCentury() Add one century to the instance (using timestamp). - * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method $this subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). - * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method static Carbon|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new Carbon object according to the specified format. - * @method static Carbon __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method $this years(int $value) Set current instance year to the given value. + * @method $this year(int $value) Set current instance year to the given value. + * @method $this setYears(int $value) Set current instance year to the given value. + * @method $this setYear(int $value) Set current instance year to the given value. + * @method $this months(int $value) Set current instance month to the given value. + * @method $this month(int $value) Set current instance month to the given value. + * @method $this setMonths(int $value) Set current instance month to the given value. + * @method $this setMonth(int $value) Set current instance month to the given value. + * @method $this days(int $value) Set current instance day to the given value. + * @method $this day(int $value) Set current instance day to the given value. + * @method $this setDays(int $value) Set current instance day to the given value. + * @method $this setDay(int $value) Set current instance day to the given value. + * @method $this hours(int $value) Set current instance hour to the given value. + * @method $this hour(int $value) Set current instance hour to the given value. + * @method $this setHours(int $value) Set current instance hour to the given value. + * @method $this setHour(int $value) Set current instance hour to the given value. + * @method $this minutes(int $value) Set current instance minute to the given value. + * @method $this minute(int $value) Set current instance minute to the given value. + * @method $this setMinutes(int $value) Set current instance minute to the given value. + * @method $this setMinute(int $value) Set current instance minute to the given value. + * @method $this seconds(int $value) Set current instance second to the given value. + * @method $this second(int $value) Set current instance second to the given value. + * @method $this setSeconds(int $value) Set current instance second to the given value. + * @method $this setSecond(int $value) Set current instance second to the given value. + * @method $this millis(int $value) Set current instance millisecond to the given value. + * @method $this milli(int $value) Set current instance millisecond to the given value. + * @method $this setMillis(int $value) Set current instance millisecond to the given value. + * @method $this setMilli(int $value) Set current instance millisecond to the given value. + * @method $this milliseconds(int $value) Set current instance millisecond to the given value. + * @method $this millisecond(int $value) Set current instance millisecond to the given value. + * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. + * @method $this micros(int $value) Set current instance microsecond to the given value. + * @method $this micro(int $value) Set current instance microsecond to the given value. + * @method $this setMicros(int $value) Set current instance microsecond to the given value. + * @method $this setMicro(int $value) Set current instance microsecond to the given value. + * @method $this microseconds(int $value) Set current instance microsecond to the given value. + * @method $this microsecond(int $value) Set current instance microsecond to the given value. + * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method $this addYear() Add one year to the instance (using date interval). + * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method $this subYear() Sub one year to the instance (using date interval). + * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method $this addMonth() Add one month to the instance (using date interval). + * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method $this subMonth() Sub one month to the instance (using date interval). + * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method $this addDay() Add one day to the instance (using date interval). + * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method $this subDay() Sub one day to the instance (using date interval). + * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method $this addHour() Add one hour to the instance (using date interval). + * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method $this subHour() Sub one hour to the instance (using date interval). + * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method $this addMinute() Add one minute to the instance (using date interval). + * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method $this subMinute() Sub one minute to the instance (using date interval). + * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method $this addSecond() Add one second to the instance (using date interval). + * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method $this subSecond() Sub one second to the instance (using date interval). + * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMilli() Add one millisecond to the instance (using date interval). + * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMilli() Sub one millisecond to the instance (using date interval). + * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMillisecond() Add one millisecond to the instance (using date interval). + * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). + * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicro() Add one microsecond to the instance (using date interval). + * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicro() Sub one microsecond to the instance (using date interval). + * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). + * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method $this addMillennium() Add one millennium to the instance (using date interval). + * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method $this subMillennium() Sub one millennium to the instance (using date interval). + * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method $this addCentury() Add one century to the instance (using date interval). + * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method $this subCentury() Sub one century to the instance (using date interval). + * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method $this addDecade() Add one decade to the instance (using date interval). + * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method $this subDecade() Sub one decade to the instance (using date interval). + * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method $this addQuarter() Add one quarter to the instance (using date interval). + * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method $this subQuarter() Sub one quarter to the instance (using date interval). + * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method $this addWeek() Add one week to the instance (using date interval). + * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method $this subWeek() Sub one week to the instance (using date interval). + * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method $this addWeekday() Add one weekday to the instance (using date interval). + * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method $this subWeekday() Sub one weekday to the instance (using date interval). + * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). + * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method $this addRealSecond() Add one second to the instance (using timestamp). + * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method $this subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMinute() Add one minute to the instance (using timestamp). + * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method $this addRealHour() Add one hour to the instance (using timestamp). + * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method $this subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDay() Add one day to the instance (using timestamp). + * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method $this addRealWeek() Add one week to the instance (using timestamp). + * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method $this subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMonth() Add one month to the instance (using timestamp). + * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). + * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method $this addRealYear() Add one year to the instance (using timestamp). + * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method $this subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method $this addRealDecade() Add one decade to the instance (using timestamp). + * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method $this subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method $this addRealCentury() Add one century to the instance (using timestamp). + * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method $this subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). + * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new Carbon object according to the specified format. + * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php * * */ diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php b/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php index 6d1194ee..4c9c1cfe 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php @@ -24,486 +24,486 @@ use DateTimeZone; * * * - * @property int $year - * @property int $yearIso - * @property int $month - * @property int $day - * @property int $hour - * @property int $minute - * @property int $second - * @property int $micro - * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English - * @property int $milliseconds - * @property int $millisecond - * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $micro + * @property int $microsecond + * @property int|float|string $timestamp seconds since the Unix Epoch + * @property string $englishDayOfWeek the day of week in English + * @property string $shortEnglishDayOfWeek the abbreviated day of week in English + * @property string $englishMonth the month in English + * @property string $shortEnglishMonth the abbreviated month in English + * @property int $milliseconds + * @property int $millisecond + * @property int $milli + * @property int $week 1 through 53 + * @property int $isoWeek 1 through 53 + * @property int $weekYear year according to week format + * @property int $isoWeekYear year according to ISO week format + * @property int $dayOfYear 1 through 366 + * @property int $age does a diffInYears() with default parameters + * @property int $offset the timezone offset in seconds from UTC + * @property int $offsetMinutes the timezone offset in minutes from UTC + * @property int $offsetHours the timezone offset in hours from UTC + * @property CarbonTimeZone $timezone the current timezone + * @property CarbonTimeZone $tz alias of $timezone + * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) + * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday + * @property-read int $daysInMonth number of days in the given month + * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) + * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) + * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name + * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName + * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language + * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language + * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language + * @property-read int $noZeroHour current hour from 1 to 24 + * @property-read int $weeksInYear 51 through 53 + * @property-read int $isoWeeksInYear 51 through 53 + * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 + * @property-read int $firstWeekDay 0 through 6 + * @property-read int $lastWeekDay 0 through 6 + * @property-read int $daysInYear 365 or 366 + * @property-read int $quarter the quarter of this instance, 1 - 4 + * @property-read int $decade the decade of this instance + * @property-read int $century the century of this instance + * @property-read int $millennium the millennium of this instance + * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise + * @property-read bool $local checks if the timezone is local, true if local, false otherwise + * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise + * @property-read string $timezoneName the current timezone name + * @property-read string $tzName alias of $timezoneName + * @property-read string $locale locale of the current instance * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method CarbonImmutable years(int $value) Set current instance year to the given value. - * @method CarbonImmutable year(int $value) Set current instance year to the given value. - * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. - * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. - * @method CarbonImmutable months(int $value) Set current instance month to the given value. - * @method CarbonImmutable month(int $value) Set current instance month to the given value. - * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. - * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. - * @method CarbonImmutable days(int $value) Set current instance day to the given value. - * @method CarbonImmutable day(int $value) Set current instance day to the given value. - * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. - * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. - * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. - * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. - * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. - * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. - * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. - * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. - * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. - * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. - * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. - * @method CarbonImmutable second(int $value) Set current instance second to the given value. - * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. - * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. - * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addYear() Add one year to the instance (using date interval). - * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). - * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). - * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). - * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addDay() Add one day to the instance (using date interval). - * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). - * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). - * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). - * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). - * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). - * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). - * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). - * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). - * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). - * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). - * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). - * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). - * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). - * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). - * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). - * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). - * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). - * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). - * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). - * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). - * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). - * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). - * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). - * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). - * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). - * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). - * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). - * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). - * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). - * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). - * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). - * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). - * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). - * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). - * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). - * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). - * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). - * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). - * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). - * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method static CarbonImmutable|false createFromFormat(string $format, string $time, string|DateTimeZone $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. - * @method static CarbonImmutable __set_state(array $array) https://php.net/manual/en/datetime.set-state.php + * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) + * @method bool isLocal() Check if the current instance has non-UTC timezone. + * @method bool isValid() Check if the current instance is a valid date. + * @method bool isDST() Check if the current instance is in a daylight saving time. + * @method bool isSunday() Checks if the instance day is sunday. + * @method bool isMonday() Checks if the instance day is monday. + * @method bool isTuesday() Checks if the instance day is tuesday. + * @method bool isWednesday() Checks if the instance day is wednesday. + * @method bool isThursday() Checks if the instance day is thursday. + * @method bool isFriday() Checks if the instance day is friday. + * @method bool isSaturday() Checks if the instance day is saturday. + * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. + * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. + * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. + * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. + * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. + * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. + * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. + * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. + * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. + * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. + * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. + * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. + * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. + * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. + * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. + * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. + * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. + * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. + * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. + * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. + * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. + * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. + * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. + * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. + * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. + * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. + * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. + * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. + * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. + * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. + * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. + * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. + * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. + * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). + * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. + * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. + * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. + * @method CarbonImmutable years(int $value) Set current instance year to the given value. + * @method CarbonImmutable year(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. + * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. + * @method CarbonImmutable months(int $value) Set current instance month to the given value. + * @method CarbonImmutable month(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. + * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. + * @method CarbonImmutable days(int $value) Set current instance day to the given value. + * @method CarbonImmutable day(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. + * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. + * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. + * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. + * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. + * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. + * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable second(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. + * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. + * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. + * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. + * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addYear() Add one year to the instance (using date interval). + * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). + * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). + * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). + * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDay() Add one day to the instance (using date interval). + * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). + * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). + * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). + * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). + * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). + * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). + * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). + * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). + * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). + * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). + * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). + * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). + * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). + * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). + * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). + * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). + * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). + * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). + * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). + * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. + * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. + * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). + * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). + * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). + * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). + * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). + * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). + * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). + * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. + * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). + * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). + * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. + * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). + * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). + * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. + * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). + * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). + * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. + * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). + * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). + * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. + * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). + * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). + * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. + * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). + * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). + * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. + * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). + * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). + * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. + * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). + * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). + * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. + * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). + * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). + * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. + * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). + * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). + * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. + * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). + * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). + * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. + * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). + * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). + * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). + * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. + * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. + * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. + * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. + * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. + * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. + * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. + * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. + * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. + * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. + * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. + * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. + * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. + * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. + * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. + * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. + * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. + * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. + * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. + * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. + * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. + * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. + * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. + * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. + * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. + * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. + * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. + * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. + * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. + * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. + * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. + * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. + * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. + * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) + * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. + * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php * * */ diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php index 15e2061c..b90e2981 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php @@ -586,6 +586,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable public const YEARS_PER_DECADE = 10; public const MONTHS_PER_YEAR = 12; public const MONTHS_PER_QUARTER = 3; + public const QUARTERS_PER_YEAR = 4; public const WEEKS_PER_YEAR = 52; public const WEEKS_PER_MONTH = 4; public const DAYS_PER_YEAR = 365; @@ -726,6 +727,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable /** * Returns the list of properties to dump on serialize() called on. * + * Only used by PHP < 7.4. + * * @return array */ public function __sleep(); @@ -735,7 +738,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @example * ``` - * echo Carbon::now(); // Carbon instances can be casted to string + * echo Carbon::now(); // Carbon instances can be cast to string * ``` * * @return string @@ -987,7 +990,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @param string $modifier * - * @return static + * @return static|false */ public function change($modifier); @@ -1038,13 +1041,13 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * If $hour is not null then the default values for $minute and $second * will be 0. * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz + * @param DateTimeInterface|int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * @@ -1276,7 +1279,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @return CarbonInterval */ - public function diffAsCarbonInterval($date = null, $absolute = true); + public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []); /** * Get the difference by the given interval using a filter closure. @@ -2116,6 +2119,18 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable */ public static function getDays(); + /** + * Return the number of days since the start of the week (using the current locale or the first parameter + * if explicitly given). + * + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return int + */ + public function getDaysFromStartOfWeek(?int $weekStartsAt = null): int; + /** * Get the fallback locale. * @@ -2738,12 +2753,35 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable public function isLeapYear(); /** - * Determines if the instance is a long year + * Determines if the instance is a long year (using ISO 8601 year). * * @example * ``` - * Carbon::parse('2015-01-01')->isLongYear(); // true - * Carbon::parse('2016-01-01')->isLongYear(); // false + * Carbon::parse('2015-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-03')->isLongIsoYear(); // false + * Carbon::parse('2019-12-29')->isLongIsoYear(); // false + * Carbon::parse('2019-12-30')->isLongIsoYear(); // true + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongIsoYear(); + + /** + * Determines if the instance is a long year (using calendar year). + * + * ⚠️ This method completely ignores month and day to use the numeric year number, + * it's not correct if the exact date matters. For instance as `2019-12-30` is already + * in the first week of the 2020 year, if you want to know from this date if ISO week + * year 2020 is a long year, use `isLongIsoYear` instead. + * + * @example + * ``` + * Carbon::create(2015)->isLongYear(); // true + * Carbon::create(2016)->isLongYear(); // false * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates @@ -3382,7 +3420,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @param string|int|null $modifier * - * @return static + * @return static|false */ public function next($modifier = null); @@ -3528,7 +3566,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @param string|int|null $modifier * - * @return static + * @return static|false */ public function previous($modifier = null); @@ -3773,6 +3811,19 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable */ public function setDateTimeFrom($date = null); + /** + * Set the day (keeping the current time) to the start of the week + the number of days passed as the first + * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. + * + * @param int $numberOfDays number of days to add after the start of the current week + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return static + */ + public function setDaysFromStartOfWeek(int $numberOfDays, ?int $weekStartsAt = null); + /** * Set the fallback locale. * @@ -3860,7 +3911,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNow($testNow = null); @@ -3881,7 +3932,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNowAndTimezone($testNow = null, $tz = null); @@ -3942,11 +3993,11 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable /** * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string + * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string * format. * - * Set the default format used when type juggling a Carbon instance to a string + * Set the default format used when type juggling a Carbon instance to a string. * * @param string|Closure|null $format * @@ -4537,6 +4588,18 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable */ public function toFormattedDateString(); + /** + * Format the instance with the day, and a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDayDateString(); + * ``` + * + * @return string + */ + public function toFormattedDayDateString(): string; + /** * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: * 1977-04-22T01:00:00-05:00). @@ -5057,12 +5120,14 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure|null $callback + * @template T * - * @return mixed + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure(): T $callback + * + * @return T */ - public static function withTestNow($testNow = null, $callback = null); + public static function withTestNow($testNow, $callback); /** * Create a Carbon instance for yesterday. diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index d465beac..8437c545 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -15,6 +15,7 @@ use Carbon\Exceptions\BadFluentConstructorException; use Carbon\Exceptions\BadFluentSetterException; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidIntervalException; +use Carbon\Exceptions\OutOfRangeException; use Carbon\Exceptions\ParseErrorException; use Carbon\Exceptions\UnitNotConfiguredException; use Carbon\Exceptions\UnknownGetterException; @@ -22,15 +23,20 @@ use Carbon\Exceptions\UnknownSetterException; use Carbon\Exceptions\UnknownUnitException; use Carbon\Traits\IntervalRounding; use Carbon\Traits\IntervalStep; +use Carbon\Traits\MagicParameter; use Carbon\Traits\Mixin; use Carbon\Traits\Options; +use Carbon\Traits\ToStringFormat; use Closure; use DateInterval; +use DateMalformedIntervalStringException; use DateTimeInterface; use DateTimeZone; use Exception; +use InvalidArgumentException; use ReflectionException; use ReturnTypeWillChange; +use RuntimeException; use Throwable; /** @@ -46,7 +52,7 @@ use Throwable; * @property int $minutes Total minutes of the current interval. * @property int $seconds Total seconds of the current interval. * @property int $microseconds Total microseconds of the current interval. - * @property int $milliseconds Total microseconds of the current interval. + * @property int $milliseconds Total milliseconds of the current interval. * @property int $microExcludeMilli Remaining microseconds without the milliseconds. * @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). * @property int $daysExcludeWeeks alias of dayzExcludeWeeks @@ -184,10 +190,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface { use IntervalRounding; use IntervalStep; + use MagicParameter; use Mixin { Mixin::mixin as baseMixin; } use Options; + use ToStringFormat; /** * Interval spec period designators @@ -241,6 +249,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface */ private static $flipCascadeFactors; + /** + * @var bool + */ + private static $floatSettersEnabled = false; + /** * The registered macros. * @@ -294,7 +307,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface */ public static function getCascadeFactors() { - return static::$cascadeFactors ?: [ + return static::$cascadeFactors ?: static::getDefaultCascadeFactors(); + } + + protected static function getDefaultCascadeFactors(): array + { + return [ 'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'], 'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'], 'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'], @@ -337,6 +355,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface static::$cascadeFactors = $cascadeFactors; } + /** + * This option allow you to opt-in for the Carbon 3 behavior where float + * values will no longer be cast to integer (so truncated). + * + * ⚠️ This settings will be applied globally, which mean your whole application + * code including the third-party dependencies that also may use Carbon will + * adopt the new behavior. + */ + public static function enableFloatSetters(bool $floatSettersEnabled = true): void + { + self::$floatSettersEnabled = $floatSettersEnabled; + } + /////////////////////////////////////////////////////////////////// //////////////////////////// CONSTRUCTORS ///////////////////////// /////////////////////////////////////////////////////////////////// @@ -344,14 +375,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Create a new CarbonInterval instance. * - * @param int|null $years - * @param int|null $months - * @param int|null $weeks - * @param int|null $days - * @param int|null $hours - * @param int|null $minutes - * @param int|null $seconds - * @param int|null $microseconds + * @param Closure|DateInterval|string|int|null $years + * @param int|float|null $months + * @param int|float|null $weeks + * @param int|float|null $days + * @param int|float|null $hours + * @param int|float|null $minutes + * @param int|float|null $seconds + * @param int|float|null $microseconds * * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. */ @@ -371,8 +402,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } $spec = $years; + $isStringSpec = (\is_string($spec) && !preg_match('/^[\d.]/', $spec)); - if (!\is_string($spec) || (float) $years || preg_match('/^[0-9.]/', $years)) { + if (!$isStringSpec || (float) $years) { $spec = static::PERIOD_PREFIX; $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; @@ -397,7 +429,74 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } } - parent::__construct($spec); + try { + parent::__construct($spec); + } catch (Throwable $exception) { + try { + parent::__construct('PT0S'); + + if ($isStringSpec) { + if (!preg_match('/^P + (?:(?[+-]?\d*(?:\.\d+)?)Y)? + (?:(?[+-]?\d*(?:\.\d+)?)M)? + (?:(?[+-]?\d*(?:\.\d+)?)W)? + (?:(?[+-]?\d*(?:\.\d+)?)D)? + (?:T + (?:(?[+-]?\d*(?:\.\d+)?)H)? + (?:(?[+-]?\d*(?:\.\d+)?)M)? + (?:(?[+-]?\d*(?:\.\d+)?)S)? + )? + $/x', $spec, $match)) { + throw new InvalidArgumentException("Invalid duration: $spec"); + } + + $years = (float) ($match['year'] ?? 0); + $this->assertSafeForInteger('year', $years); + $months = (float) ($match['month'] ?? 0); + $this->assertSafeForInteger('month', $months); + $weeks = (float) ($match['week'] ?? 0); + $this->assertSafeForInteger('week', $weeks); + $days = (float) ($match['day'] ?? 0); + $this->assertSafeForInteger('day', $days); + $hours = (float) ($match['hour'] ?? 0); + $this->assertSafeForInteger('hour', $hours); + $minutes = (float) ($match['minute'] ?? 0); + $this->assertSafeForInteger('minute', $minutes); + $seconds = (float) ($match['second'] ?? 0); + $this->assertSafeForInteger('second', $seconds); + } + + $totalDays = (($weeks * static::getDaysPerWeek()) + $days); + $this->assertSafeForInteger('days total (including weeks)', $totalDays); + + $this->y = (int) $years; + $this->m = (int) $months; + $this->d = (int) $totalDays; + $this->h = (int) $hours; + $this->i = (int) $minutes; + $this->s = (int) $seconds; + + if ( + ((float) $this->y) !== $years || + ((float) $this->m) !== $months || + ((float) $this->d) !== $totalDays || + ((float) $this->h) !== $hours || + ((float) $this->i) !== $minutes || + ((float) $this->s) !== $seconds + ) { + $this->add(static::fromString( + ($years - $this->y).' years '. + ($months - $this->m).' months '. + ($totalDays - $this->d).' days '. + ($hours - $this->h).' hours '. + ($minutes - $this->i).' minutes '. + ($seconds - $this->s).' seconds ' + )); + } + } catch (Throwable $secondException) { + throw $secondException instanceof OutOfRangeException ? $secondException : $exception; + } + } if ($microseconds !== null) { $this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND; @@ -410,7 +509,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * @param string $source * @param string $target * - * @return int|null + * @return int|float|null */ public static function getFactor($source, $target) { @@ -438,7 +537,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * @param string $source * @param string $target * - * @return int|null + * @return int|float|null */ public static function getFactorWithDefault($source, $target) { @@ -465,7 +564,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for days per week. * - * @return int + * @return int|float */ public static function getDaysPerWeek() { @@ -475,7 +574,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for hours per day. * - * @return int + * @return int|float */ public static function getHoursPerDay() { @@ -485,7 +584,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for minutes per hour. * - * @return int + * @return int|float */ public static function getMinutesPerHour() { @@ -495,7 +594,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for seconds per minute. * - * @return int + * @return int|float */ public static function getSecondsPerMinute() { @@ -505,7 +604,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for microseconds per second. * - * @return int + * @return int|float */ public static function getMillisecondsPerSecond() { @@ -515,7 +614,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Returns current config for microseconds per second. * - * @return int + * @return int|float */ public static function getMicrosecondsPerMillisecond() { @@ -673,6 +772,23 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } } + /** + * Evaluate the PHP generated by var_export() and recreate the exported CarbonInterval instance. + * + * @param array $dump data as exported by var_export() + * + * @return static + */ + #[ReturnTypeWillChange] + public static function __set_state($dump) + { + /** @noinspection PhpVoidFunctionResultUsedInspection */ + /** @var DateInterval $dateInterval */ + $dateInterval = parent::__set_state($dump); + + return static::instance($dateInterval); + } + /** * Return the current context from inside a macro callee or a new one if static. * @@ -767,6 +883,8 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface case 'year': case 'years': case 'y': + case 'yr': + case 'yrs': $years += $intValue; break; @@ -780,6 +898,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface case 'month': case 'months': case 'mo': + case 'mos': $months += $intValue; break; @@ -882,7 +1001,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en')); } - private static function castIntervalToClass(DateInterval $interval, string $className) + private static function castIntervalToClass(DateInterval $interval, string $className, array $skip = []) { $mainClass = DateInterval::class; @@ -891,7 +1010,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } $microseconds = $interval->f; - $instance = new $className(static::getDateIntervalSpec($interval)); + $instance = new $className(static::getDateIntervalSpec($interval, false, $skip)); if ($microseconds) { $instance->f = $microseconds; @@ -940,12 +1059,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * set the $days field. * * @param DateInterval $interval + * @param bool $skipCopy set to true to return the passed object + * (without copying it) if it's already of the + * current class * * @return static */ - public static function instance(DateInterval $interval) + public static function instance(DateInterval $interval, array $skip = [], bool $skipCopy = false) { - return self::castIntervalToClass($interval, static::class); + if ($skipCopy && $interval instanceof static) { + return $interval; + } + + return self::castIntervalToClass($interval, static::class, $skip); } /** @@ -956,17 +1082,20 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * * @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit * @param string|null $unit if specified, $interval must be an integer + * @param bool $skipCopy set to true to return the passed object + * (without copying it) if it's already of the + * current class * * @return static|null */ - public static function make($interval, $unit = null) + public static function make($interval, $unit = null, bool $skipCopy = false) { if ($unit) { $interval = "$interval ".Carbon::pluralUnit($unit); } if ($interval instanceof DateInterval) { - return static::instance($interval); + return static::instance($interval, [], $skipCopy); } if ($interval instanceof Closure) { @@ -984,7 +1113,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface { $interval = preg_replace('/\s+/', ' ', trim($interval)); - if (preg_match('/^P[T0-9]/', $interval)) { + if (preg_match('/^P[T\d]/', $interval)) { return new static($interval); } @@ -992,8 +1121,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface return static::fromString($interval); } - /** @var static $interval */ - $interval = static::createFromDateString($interval); + // @codeCoverageIgnoreStart + try { + /** @var static $interval */ + $interval = static::createFromDateString($interval); + } catch (DateMalformedIntervalStringException $e) { + return null; + } + // @codeCoverageIgnoreEnd return !$interval || $interval->isEmpty() ? null : $interval; } @@ -1081,11 +1216,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; case 'weeks': - return (int) ($this->d / static::getDaysPerWeek()); + return (int) ($this->d / (int) static::getDaysPerWeek()); case 'daysExcludeWeeks': case 'dayzExcludeWeeks': - return $this->d % static::getDaysPerWeek(); + return $this->d % (int) static::getDaysPerWeek(); case 'locale': return $this->getTranslatorLocale(); @@ -1126,43 +1261,63 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface foreach ($properties as $key => $value) { switch (Carbon::singularUnit(rtrim($key, 'z'))) { case 'year': + $this->checkIntegerValue($key, $value); $this->y = $value; + $this->handleDecimalPart('year', $value, $this->y); break; case 'month': + $this->checkIntegerValue($key, $value); $this->m = $value; + $this->handleDecimalPart('month', $value, $this->m); break; case 'week': - $this->d = $value * static::getDaysPerWeek(); + $this->checkIntegerValue($key, $value); + $days = $value * (int) static::getDaysPerWeek(); + $this->assertSafeForInteger('days total (including weeks)', $days); + $this->d = $days; + $this->handleDecimalPart('day', $days, $this->d); break; case 'day': + $this->checkIntegerValue($key, $value); $this->d = $value; + $this->handleDecimalPart('day', $value, $this->d); break; case 'daysexcludeweek': case 'dayzexcludeweek': - $this->d = $this->weeks * static::getDaysPerWeek() + $value; + $this->checkIntegerValue($key, $value); + $days = $this->weeks * (int) static::getDaysPerWeek() + $value; + $this->assertSafeForInteger('days total (including weeks)', $days); + $this->d = $days; + $this->handleDecimalPart('day', $days, $this->d); break; case 'hour': + $this->checkIntegerValue($key, $value); $this->h = $value; + $this->handleDecimalPart('hour', $value, $this->h); break; case 'minute': + $this->checkIntegerValue($key, $value); $this->i = $value; + $this->handleDecimalPart('minute', $value, $this->i); break; case 'second': + $this->checkIntegerValue($key, $value); $this->s = $value; + $this->handleDecimalPart('second', $value, $this->s); break; @@ -1355,11 +1510,15 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } if (preg_match('/^(?add|sub)(?[A-Z].*)$/', $method, $match)) { - return $this->{$match['method']}($parameters[0], $match['unit']); + $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($match['unit']), 0); + + return $this->{$match['method']}($value, $match['unit']); } + $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($method), 1); + try { - $this->set($method, \count($parameters) === 0 ? 1 : $parameters[0]); + $this->set($method, $value); } catch (UnknownSetterException $exception) { if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { throw new BadFluentSetterException($method, 0, $exception); @@ -1410,9 +1569,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $minimumUnit = 's'; $skip = []; extract($this->getForHumansInitialVariables($syntax, $short)); - $skip = array_filter((array) $skip, static function ($value) { + $skip = array_map('strtolower', array_filter((array) $skip, static function ($value) { return \is_string($value) && $value !== ''; - }); + })); if ($syntax === null) { $syntax = CarbonInterface::DIFF_ABSOLUTE; @@ -1435,11 +1594,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface ]; } - if ($altNumbers) { - if ($altNumbers !== true) { - $language = new Language($this->locale); - $altNumbers = \in_array($language->getCode(), (array) $altNumbers); - } + if ($altNumbers && $altNumbers !== true) { + $language = new Language($this->locale); + $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); } if (\is_array($join)) { @@ -1620,18 +1777,23 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $unit = $short ? 's' : 'second'; $isFuture = $this->invert === 1; $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); + $declensionMode = null; /** @var \Symfony\Component\Translation\Translator $translator */ $translator = $this->getLocalTranslator(); - $handleDeclensions = function ($unit, $count) use ($interpolations, $transId, $translator, $altNumbers, $absolute) { + $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { if (!$absolute) { - // Some languages have special pluralization for past and future tense. - $key = $unit.'_'.$transId; - $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); - if ($result !== $key) { - return $result; + if ($this->needsDeclension($declensionMode, $index, $parts)) { + // Some languages have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); + + if ($result !== $key) { + return $result; + } } } @@ -1696,17 +1858,17 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } } - $transChoice = function ($short, $unitData) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { + $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { $count = $unitData['value']; if ($short) { - $result = $handleDeclensions($unitData['unitShort'], $count); + $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); if ($result !== null) { return $result; } } elseif ($aUnit) { - $result = $handleDeclensions('a_'.$unitData['unit'], $count); + $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); if ($result !== null) { return $result; @@ -1714,7 +1876,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } if (!$absolute) { - return $handleDeclensions($unitData['unit'], $count); + return $handleDeclensions($unitData['unit'], $count, $index, $parts); } return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); @@ -1726,7 +1888,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface if ($diffIntervalData['value'] > 0) { $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; $count = $diffIntervalData['value']; - $interval[] = $transChoice($short, $diffIntervalData); + $interval[] = [$short, $diffIntervalData]; } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { break; } @@ -1737,13 +1899,19 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } // break the loop after we have reached the minimum unit - if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']])) { + if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; break; } } + $actualParts = \count($interval); + + foreach ($interval as $index => &$item) { + $item = $transChoice($item[0], $item[1], $index, $actualParts); + } + if (\count($interval) === 0) { if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { $key = 'diff_now'; @@ -1812,17 +1980,17 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface */ public function __toString() { - $format = $this->localToStringFormat; + $format = $this->localToStringFormat ?? static::$toStringFormat; - if ($format) { - if ($format instanceof Closure) { - return $format($this); - } - - return $this->format($format); + if (!$format) { + return $this->forHumans(); } - return $this->forHumans(); + if ($format instanceof Closure) { + return $format($this); + } + + return $this->format($format); } /** @@ -1863,7 +2031,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Invert the interval. * - * @param bool|int $inverted if a parameter is passed, the passed value casted as 1 or 0 is used + * @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used * as the new value of the ->invert property. * * @return $this @@ -2141,7 +2309,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * * @return string */ - public static function getDateIntervalSpec(DateInterval $interval) + public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = []) { $date = array_filter([ static::PERIOD_YEARS => abs($interval->y), @@ -2149,10 +2317,25 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface static::PERIOD_DAYS => abs($interval->d), ]); + if ( + $interval->days >= CarbonInterface::DAYS_PER_WEEK * CarbonInterface::WEEKS_PER_MONTH && + (!isset($date[static::PERIOD_YEARS]) || \count(array_intersect(['y', 'year', 'years'], $skip))) && + (!isset($date[static::PERIOD_MONTHS]) || \count(array_intersect(['m', 'month', 'months'], $skip))) + ) { + $date = [ + static::PERIOD_DAYS => abs($interval->days), + ]; + } + + $seconds = abs($interval->s); + if ($microseconds && $interval->f > 0) { + $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); + } + $time = array_filter([ static::PERIOD_HOURS => abs($interval->h), static::PERIOD_MINUTES => abs($interval->i), - static::PERIOD_SECONDS => abs($interval->s), + static::PERIOD_SECONDS => $seconds, ]); $specString = static::PERIOD_PREFIX; @@ -2176,9 +2359,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * * @return string */ - public function spec() + public function spec(bool $microseconds = false) { - return static::getDateIntervalSpec($this); + return static::getDateIntervalSpec($this, $microseconds); } /** @@ -2229,9 +2412,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $originalData = $this->toArray(); $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); - $originalData['daysExcludeWeeks'] = $originalData['days']; + $originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek()); + $originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek()); unset($originalData['days']); $newData = $originalData; + $previous = []; foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { foreach (['source', 'target'] as $key) { @@ -2241,9 +2426,29 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } $value = $newData[$source]; - $modulo = ($factor + ($value % $factor)) % $factor; + $modulo = fmod($factor + fmod($value, $factor), $factor); $newData[$source] = $modulo; $newData[$target] += ($value - $modulo) / $factor; + + $decimalPart = fmod($newData[$source], 1); + + if ($decimalPart !== 0.0) { + $unit = $source; + + foreach ($previous as [$subUnit, $subFactor]) { + $newData[$unit] -= $decimalPart; + $newData[$subUnit] += $decimalPart * $subFactor; + $decimalPart = fmod($newData[$subUnit], 1); + + if ($decimalPart === 0.0) { + break; + } + + $unit = $subUnit; + } + } + + array_unshift($previous, [$source, $factor]); } $positive = null; @@ -2324,13 +2529,13 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $cumulativeFactor = 0; $unitFound = false; $factors = self::getFlipCascadeFactors(); - $daysPerWeek = static::getDaysPerWeek(); + $daysPerWeek = (int) static::getDaysPerWeek(); $values = [ 'years' => $this->years, 'months' => $this->months, 'weeks' => (int) ($this->d / $daysPerWeek), - 'dayz' => $this->d % $daysPerWeek, + 'dayz' => fmod($this->d, $daysPerWeek), 'hours' => $this->hours, 'minutes' => $this->minutes, 'seconds' => $this->seconds, @@ -2391,10 +2596,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } if ($unit === 'weeks') { - return $result / $daysPerWeek; + $result /= $daysPerWeek; } - return $result; + // Cast as int numbers with no decimal part + return fmod($result, 1) === 0.0 ? (int) $result : $result; } /** @@ -2662,6 +2868,15 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface */ public function roundUnit($unit, $precision = 1, $function = 'round') { + if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) { + $value = $function($this->total($unit) / $precision) * $precision; + $inverted = $value < 0; + + return $this->copyProperties(self::fromString( + number_format(abs($value), 12, '.', '').' '.$unit + )->invert($inverted)->cascade()); + } + $base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC') ->roundUnit($unit, $precision, $function); $next = $base->add($this); @@ -2752,4 +2967,88 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface { return $this->round($precision, 'ceil'); } + + private function needsDeclension(string $mode, int $index, int $parts): bool + { + switch ($mode) { + case 'last': + return $index === $parts - 1; + default: + return true; + } + } + + private function checkIntegerValue(string $name, $value) + { + if (\is_int($value)) { + return; + } + + $this->assertSafeForInteger($name, $value); + + if (\is_float($value) && (((float) (int) $value) === $value)) { + return; + } + + if (!self::$floatSettersEnabled) { + $type = \gettype($value); + @trigger_error( + "Since 2.70.0, it's deprecated to pass $type value for $name.\n". + "It's truncated when stored as an integer interval unit.\n". + "From 3.0.0, decimal part will no longer be truncated and will be cascaded to smaller units.\n". + "- To maintain the current behavior, use explicit cast: $name((int) \$value)\n". + "- To adopt the new behavior globally, call CarbonInterval::enableFloatSetters()\n", + \E_USER_DEPRECATED + ); + } + } + + /** + * Throw an exception if precision loss when storing the given value as an integer would be >= 1.0. + */ + private function assertSafeForInteger(string $name, $value) + { + if ($value && !\is_int($value) && ($value >= 0x7fffffffffffffff || $value <= -0x7fffffffffffffff)) { + throw new OutOfRangeException($name, -0x7fffffffffffffff, 0x7fffffffffffffff, $value); + } + } + + private function handleDecimalPart(string $unit, $value, $integerValue) + { + if (self::$floatSettersEnabled) { + $floatValue = (float) $value; + $base = (float) $integerValue; + + if ($floatValue === $base) { + return; + } + + $units = [ + 'y' => 'year', + 'm' => 'month', + 'd' => 'day', + 'h' => 'hour', + 'i' => 'minute', + 's' => 'second', + ]; + $upper = true; + + foreach ($units as $property => $name) { + if ($name === $unit) { + $upper = false; + + continue; + } + + if (!$upper && $this->$property !== 0) { + throw new RuntimeException( + "You cannot set $unit to a float value as $name would be overridden, ". + 'set it first to 0 explicitly if you really want to erase its value' + ); + } + } + + $this->add($unit, $floatValue - $base); + } + } } diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php index 0e81e757..d12a9869 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -11,6 +11,7 @@ namespace Carbon; +use Carbon\Exceptions\EndLessPeriodException; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidIntervalException; use Carbon\Exceptions\InvalidPeriodDateException; @@ -23,11 +24,13 @@ use Carbon\Exceptions\UnreachableException; use Carbon\Traits\IntervalRounding; use Carbon\Traits\Mixin; use Carbon\Traits\Options; +use Carbon\Traits\ToStringFormat; use Closure; use Countable; use DateInterval; use DatePeriod; use DateTime; +use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; @@ -48,43 +51,47 @@ use RuntimeException; * @property-read CarbonInterface $end Period end date. * @property-read CarbonInterval $interval Underlying date interval instance. Always present, one day by default. * - * @method static CarbonPeriod start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. - * @method static CarbonPeriod since($date, $inclusive = null) Alias for start(). - * @method static CarbonPeriod sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. - * @method static CarbonPeriod end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. - * @method static CarbonPeriod until($date = null, $inclusive = null) Alias for end(). - * @method static CarbonPeriod untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. - * @method static CarbonPeriod dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. - * @method static CarbonPeriod between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. - * @method static CarbonPeriod recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. - * @method static CarbonPeriod times($recurrences = null) Alias for recurrences(). - * @method static CarbonPeriod options($options = null) Create instance with options or modify the options if called on an instance. - * @method static CarbonPeriod toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. - * @method static CarbonPeriod filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. - * @method static CarbonPeriod push($callback, $name = null) Alias for filter(). - * @method static CarbonPeriod prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. - * @method static CarbonPeriod filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. - * @method static CarbonPeriod interval($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static CarbonPeriod each($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static CarbonPeriod every($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static CarbonPeriod step($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static CarbonPeriod stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static CarbonPeriod invert() Create instance with inverted date interval or invert the interval if called on an instance. - * @method static CarbonPeriod years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. - * @method static CarbonPeriod year($years = 1) Alias for years(). - * @method static CarbonPeriod months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. - * @method static CarbonPeriod month($months = 1) Alias for months(). - * @method static CarbonPeriod weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. - * @method static CarbonPeriod week($weeks = 1) Alias for weeks(). - * @method static CarbonPeriod days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. - * @method static CarbonPeriod dayz($days = 1) Alias for days(). - * @method static CarbonPeriod day($days = 1) Alias for days(). - * @method static CarbonPeriod hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. - * @method static CarbonPeriod hour($hours = 1) Alias for hours(). - * @method static CarbonPeriod minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. - * @method static CarbonPeriod minute($minutes = 1) Alias for minutes(). - * @method static CarbonPeriod seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. - * @method static CarbonPeriod second($seconds = 1) Alias for seconds(). + * @method static static start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. + * @method static static since($date, $inclusive = null) Alias for start(). + * @method static static sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. + * @method static static end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. + * @method static static until($date = null, $inclusive = null) Alias for end(). + * @method static static untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. + * @method static static dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static static between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. + * @method static static recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. + * @method static static times($recurrences = null) Alias for recurrences(). + * @method static static options($options = null) Create instance with options or modify the options if called on an instance. + * @method static static toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. + * @method static static filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. + * @method static static push($callback, $name = null) Alias for filter(). + * @method static static prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. + * @method static static filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. + * @method static static interval($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static each($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static every($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static step($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. + * @method static static invert() Create instance with inverted date interval or invert the interval if called on an instance. + * @method static static years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. + * @method static static year($years = 1) Alias for years(). + * @method static static months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. + * @method static static month($months = 1) Alias for months(). + * @method static static weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. + * @method static static week($weeks = 1) Alias for weeks(). + * @method static static days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. + * @method static static dayz($days = 1) Alias for days(). + * @method static static day($days = 1) Alias for days(). + * @method static static hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. + * @method static static hour($hours = 1) Alias for hours(). + * @method static static minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. + * @method static static minute($minutes = 1) Alias for minutes(). + * @method static static seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. + * @method static static second($seconds = 1) Alias for seconds(). + * @method static static milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds for date interval or replace the interval by the given a number of milliseconds if called on an instance. + * @method static static millisecond($milliseconds = 1) Alias for milliseconds(). + * @method static static microseconds($microseconds = 1) Create instance specifying a number of microseconds for date interval or replace the interval by the given a number of microseconds if called on an instance. + * @method static static microsecond($microseconds = 1) Alias for microseconds(). * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. @@ -173,6 +180,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable Mixin::mixin as baseMixin; } use Options; + use ToStringFormat; /** * Built-in filter for limit by recurrences. @@ -230,6 +238,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public const END_MAX_ATTEMPTS = 10000; + /** + * Default date class of iteration items. + * + * @var string + */ + protected const DEFAULT_DATE_CLASS = Carbon::class; + /** * The registered macros. * @@ -251,6 +266,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ protected $dateInterval; + /** + * True once __construct is finished. + * + * @var bool + */ + protected $constructed = false; + /** * Whether current date interval was set by default. * @@ -377,7 +399,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable ); } - $class = \get_called_class(); + $class = static::class; $type = \gettype($period); throw new NotAPeriodException( @@ -482,15 +504,16 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $interval = null; $start = null; $end = null; + $dateClass = static::DEFAULT_DATE_CLASS; foreach (explode('/', $iso) as $key => $part) { - if ($key === 0 && preg_match('/^R([0-9]*|INF)$/', $part, $match)) { + if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { $interval = $part; - } elseif ($start === null && $parsed = Carbon::make($part)) { + } elseif ($start === null && $parsed = $dateClass::make($part)) { $start = $part; - } elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) { + } elseif ($end === null && $parsed = $dateClass::make(static::addMissingParts($start ?? '', $part))) { $end = $part; } else { throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); @@ -503,7 +526,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable } /** - * Add missing parts of the target date from the soure date. + * Add missing parts of the target date from the source date. * * @param string $source * @param string $target @@ -512,7 +535,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ protected static function addMissingParts($source, $target) { - $pattern = '/'.preg_replace('/[0-9]+/', '[0-9]+', preg_quote($target, '/')).'$/'; + $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; $result = preg_replace($pattern, $target, $source, 1, $count); @@ -621,6 +644,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function __construct(...$arguments) { + if (is_a($this->dateClass, DateTimeImmutable::class, true)) { + $this->options = static::IMMUTABLE; + } + // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, // which will be first parsed into parts and then processed the same way. @@ -648,6 +675,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable } } + $optionsSet = false; + foreach ($arguments as $argument) { $parsedDate = null; @@ -655,10 +684,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $this->setTimezone($argument); } elseif ($this->dateInterval === null && ( - \is_string($argument) && preg_match( - '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T0-9].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', + (\is_string($argument) && preg_match( + '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', $argument - ) || + )) || $argument instanceof DateInterval || $argument instanceof Closure ) && @@ -671,15 +700,17 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $this->setEndDate($parsedDate); } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { $this->setRecurrences($argument); - } elseif ($this->options === null && (\is_int($argument) || $argument === null)) { - $this->setOptions($argument); + } elseif (!$optionsSet && (\is_int($argument) || $argument === null)) { + $optionsSet = true; + $this->setOptions(((int) $this->options) | ((int) $argument)); } else { throw new InvalidPeriodParameterException('Invalid constructor parameters.'); } } if ($this->startDate === null) { - $this->setStartDate(Carbon::now()); + $dateClass = $this->dateClass; + $this->setStartDate($dateClass::now()); } if ($this->dateInterval === null) { @@ -691,6 +722,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable if ($this->options === null) { $this->setOptions(0); } + + $this->constructed = true; } /** @@ -703,6 +736,17 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return clone $this; } + /** + * Prepare the instance to be set (self if mutable to be mutated, + * copy if immutable to generate a new instance). + * + * @return static + */ + protected function copyIfImmutable() + { + return $this; + } + /** * Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names. * @@ -794,7 +838,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param string $dateClass * - * @return $this + * @return static */ public function setDateClass(string $dateClass) { @@ -802,15 +846,16 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable throw new NotACarbonClassException($dateClass); } - $this->dateClass = $dateClass; + $self = $this->copyIfImmutable(); + $self->dateClass = $dateClass; if (is_a($dateClass, Carbon::class, true)) { - $this->toggleOptions(static::IMMUTABLE, false); + $self->options = $self->options & ~static::IMMUTABLE; } elseif (is_a($dateClass, CarbonImmutable::class, true)) { - $this->toggleOptions(static::IMMUTABLE, true); + $self->options = $self->options | static::IMMUTABLE; } - return $this; + return $self; } /** @@ -830,7 +875,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws InvalidIntervalException * - * @return $this + * @return static */ public function setDateInterval($interval) { @@ -842,25 +887,24 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable throw new InvalidIntervalException('Empty interval is not accepted.'); } - $this->dateInterval = $interval; + $self = $this->copyIfImmutable(); + $self->dateInterval = $interval; - $this->isDefaultInterval = false; + $self->isDefaultInterval = false; - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** * Invert the period date interval. * - * @return $this + * @return static */ public function invertDateInterval() { - $interval = $this->dateInterval->invert(); - - return $this->setDateInterval($interval); + return $this->setDateInterval($this->dateInterval->invert()); } /** @@ -869,14 +913,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param DateTime|DateTimeInterface|string $start * @param DateTime|DateTimeInterface|string|null $end * - * @return $this + * @return static */ public function setDates($start, $end) { - $this->setStartDate($start); - $this->setEndDate($end); - - return $this; + return $this->setStartDate($start)->setEndDate($end); } /** @@ -886,7 +927,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws InvalidArgumentException * - * @return $this + * @return static */ public function setOptions($options) { @@ -894,11 +935,12 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable throw new InvalidPeriodParameterException('Invalid options.'); } - $this->options = $options ?: 0; + $self = $this->copyIfImmutable(); + $self->options = $options ?: 0; - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -919,7 +961,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws \InvalidArgumentException * - * @return $this + * @return static */ public function toggleOptions($options, $state = null) { @@ -939,7 +981,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param bool $state * - * @return $this + * @return static */ public function excludeStartDate($state = true) { @@ -951,7 +993,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param bool $state * - * @return $this + * @return static */ public function excludeEndDate($state = true) { @@ -1095,17 +1137,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param callable $callback * @param string $name * - * @return $this + * @return static */ public function addFilter($callback, $name = null) { - $tuple = $this->createFilterTuple(\func_get_args()); + $self = $this->copyIfImmutable(); + $tuple = $self->createFilterTuple(\func_get_args()); - $this->filters[] = $tuple; + $self->filters[] = $tuple; - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1116,17 +1159,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param callable $callback * @param string $name * - * @return $this + * @return static */ public function prependFilter($callback, $name = null) { - $tuple = $this->createFilterTuple(\func_get_args()); + $self = $this->copyIfImmutable(); + $tuple = $self->createFilterTuple(\func_get_args()); - array_unshift($this->filters, $tuple); + array_unshift($self->filters, $tuple); - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1134,24 +1178,25 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param callable|string $filter * - * @return $this + * @return static */ public function removeFilter($filter) { + $self = $this->copyIfImmutable(); $key = \is_callable($filter) ? 0 : 1; - $this->filters = array_values(array_filter( + $self->filters = array_values(array_filter( $this->filters, function ($tuple) use ($key, $filter) { return $tuple[$key] !== $filter; } )); - $this->updateInternalState(); + $self->updateInternalState(); - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1189,39 +1234,41 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param array $filters * - * @return $this + * @return static */ public function setFilters(array $filters) { - $this->filters = $filters; + $self = $this->copyIfImmutable(); + $self->filters = $filters; - $this->updateInternalState(); + $self->updateInternalState(); - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** * Reset filters stack. * - * @return $this + * @return static */ public function resetFilters() { - $this->filters = []; + $self = $this->copyIfImmutable(); + $self->filters = []; - if ($this->endDate !== null) { - $this->filters[] = [static::END_DATE_FILTER, null]; + if ($self->endDate !== null) { + $self->filters[] = [static::END_DATE_FILTER, null]; } - if ($this->recurrences !== null) { - $this->filters[] = [static::RECURRENCES_FILTER, null]; + if ($self->recurrences !== null) { + $self->filters[] = [static::RECURRENCES_FILTER, null]; } - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1231,11 +1278,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws InvalidArgumentException * - * @return $this + * @return static */ public function setRecurrences($recurrences) { - if (!is_numeric($recurrences) && $recurrences !== null || $recurrences < 0) { + if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { throw new InvalidPeriodParameterException('Invalid number of recurrences.'); } @@ -1243,15 +1290,17 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return $this->removeFilter(static::RECURRENCES_FILTER); } - $this->recurrences = $recurrences === INF ? INF : (int) $recurrences; + /** @var self $self */ + $self = $this->copyIfImmutable(); + $self->recurrences = $recurrences === INF ? INF : (int) $recurrences; - if (!$this->hasFilter(static::RECURRENCES_FILTER)) { - return $this->addFilter(static::RECURRENCES_FILTER); + if (!$self->hasFilter(static::RECURRENCES_FILTER)) { + return $self->addFilter(static::RECURRENCES_FILTER); } - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1262,21 +1311,22 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws InvalidPeriodDateException * - * @return $this + * @return static */ public function setStartDate($date, $inclusive = null) { - if (!$date = ([$this->dateClass, 'make'])($date)) { + if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { throw new InvalidPeriodDateException('Invalid start date.'); } - $this->startDate = $date; + $self = $this->copyIfImmutable(); + $self->startDate = $date; if ($inclusive !== null) { - $this->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); + $self = $self->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); } - return $this; + return $self; } /** @@ -1287,11 +1337,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @throws \InvalidArgumentException * - * @return $this + * @return static */ public function setEndDate($date, $inclusive = null) { - if ($date !== null && !$date = ([$this->dateClass, 'make'])($date)) { + if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { throw new InvalidPeriodDateException('Invalid end date.'); } @@ -1299,19 +1349,20 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return $this->removeFilter(static::END_DATE_FILTER); } - $this->endDate = $date; + $self = $this->copyIfImmutable(); + $self->endDate = $date; if ($inclusive !== null) { - $this->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); + $self = $self->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); } - if (!$this->hasFilter(static::END_DATE_FILTER)) { - return $this->addFilter(static::END_DATE_FILTER); + if (!$self->hasFilter(static::END_DATE_FILTER)) { + return $self->addFilter(static::END_DATE_FILTER); } - $this->handleChangedParameters(); + $self->handleChangedParameters(); - return $this; + return $self; } /** @@ -1457,13 +1508,21 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function toString() { + $format = $this->localToStringFormat ?? static::$toStringFormat; + + if ($format instanceof Closure) { + return $format($this); + } + $translator = ([$this->dateClass, 'getTranslator'])(); $parts = []; - $format = !$this->startDate->isStartOfDay() || $this->endDate && !$this->endDate->isStartOfDay() - ? 'Y-m-d H:i:s' - : 'Y-m-d'; + $format = $format ?? ( + !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) + ? 'Y-m-d H:i:s' + : 'Y-m-d' + ); if ($this->recurrences !== null) { $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator); @@ -1506,9 +1565,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable if (!method_exists($className, 'instance')) { if (is_a($className, DatePeriod::class, true)) { return new $className( - $this->getStartDate(), + $this->rawDate($this->getStartDate()), $this->getDateInterval(), - $this->getEndDate() ? $this->getIncludedEndDate() : $this->getRecurrences(), + $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 ); } @@ -1534,6 +1593,39 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return $this->cast(DatePeriod::class); } + /** + * Return `true` if the period has no custom filter and is guaranteed to be endless. + * + * Note that we can't check if a period is endless as soon as it has custom filters + * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in + * a way we can't predict without actually iterating the period. + */ + public function isUnfilteredAndEndLess(): bool + { + foreach ($this->filters as $filter) { + switch ($filter) { + case [static::RECURRENCES_FILTER, null]: + if ($this->recurrences !== null && is_finite($this->recurrences)) { + return false; + } + + break; + + case [static::END_DATE_FILTER, null]: + if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { + return false; + } + + break; + + default: + return false; + } + } + + return true; + } + /** * Convert the date period into an array without changing current iteration state. * @@ -1541,6 +1633,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function toArray() { + if ($this->isUnfilteredAndEndLess()) { + throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); + } + $state = [ $this->key, $this->current ? $this->current->avoidMutation() : null, @@ -1572,6 +1668,16 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function first() { + if ($this->isUnfilteredAndEndLess()) { + foreach ($this as $date) { + $this->rewind(); + + return $date; + } + + return null; + } + return ($this->toArray() ?: [])[0] ?? null; } @@ -1626,54 +1732,80 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return $roundedValue; } - $first = \count($parameters) >= 1 ? $parameters[0] : null; - $second = \count($parameters) >= 2 ? $parameters[1] : null; - switch ($method) { case 'start': case 'since': - return $this->setStartDate($first, $second); + self::setDefaultParameters($parameters, [ + [0, 'date', null], + ]); + + return $this->setStartDate(...$parameters); case 'sinceNow': - return $this->setStartDate(new Carbon(), $first); + return $this->setStartDate(new Carbon(), ...$parameters); case 'end': case 'until': - return $this->setEndDate($first, $second); + self::setDefaultParameters($parameters, [ + [0, 'date', null], + ]); + + return $this->setEndDate(...$parameters); case 'untilNow': - return $this->setEndDate(new Carbon(), $first); + return $this->setEndDate(new Carbon(), ...$parameters); case 'dates': case 'between': - return $this->setDates($first, $second); + self::setDefaultParameters($parameters, [ + [0, 'start', null], + [1, 'end', null], + ]); + + return $this->setDates(...$parameters); case 'recurrences': case 'times': - return $this->setRecurrences($first); + self::setDefaultParameters($parameters, [ + [0, 'recurrences', null], + ]); + + return $this->setRecurrences(...$parameters); case 'options': - return $this->setOptions($first); + self::setDefaultParameters($parameters, [ + [0, 'options', null], + ]); + + return $this->setOptions(...$parameters); case 'toggle': - return $this->toggleOptions($first, $second); + self::setDefaultParameters($parameters, [ + [0, 'options', null], + ]); + + return $this->toggleOptions(...$parameters); case 'filter': case 'push': - return $this->addFilter($first, $second); + return $this->addFilter(...$parameters); case 'prepend': - return $this->prependFilter($first, $second); + return $this->prependFilter(...$parameters); case 'filters': - return $this->setFilters($first ?: []); + self::setDefaultParameters($parameters, [ + [0, 'filters', []], + ]); + + return $this->setFilters(...$parameters); case 'interval': case 'each': case 'every': case 'step': case 'stepBy': - return $this->setDateInterval($first); + return $this->setDateInterval(...$parameters); case 'invert': return $this->invertDateInterval(); @@ -1693,15 +1825,19 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable case 'minute': case 'seconds': case 'second': + case 'milliseconds': + case 'millisecond': + case 'microseconds': + case 'microsecond': return $this->setDateInterval(( // Override default P1D when instantiating via fluent setters. [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method] - )( - \count($parameters) === 0 ? 1 : $first - )); + )(...$parameters)); } - if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { + $dateClass = $this->dateClass; + + if ($this->localStrictModeEnabled ?? $dateClass::isStrictModeEnabled()) { throw new UnknownMethodException($method); } @@ -1717,18 +1853,19 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function setTimezone($timezone) { - $this->tzName = $timezone; - $this->timezone = $timezone; + $self = $this->copyIfImmutable(); + $self->tzName = $timezone; + $self->timezone = $timezone; - if ($this->startDate) { - $this->setStartDate($this->startDate->setTimezone($timezone)); + if ($self->startDate) { + $self = $self->setStartDate($self->startDate->setTimezone($timezone)); } - if ($this->endDate) { - $this->setEndDate($this->endDate->setTimezone($timezone)); + if ($self->endDate) { + $self = $self->setEndDate($self->endDate->setTimezone($timezone)); } - return $this; + return $self; } /** @@ -1740,18 +1877,19 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function shiftTimezone($timezone) { - $this->tzName = $timezone; - $this->timezone = $timezone; + $self = $this->copyIfImmutable(); + $self->tzName = $timezone; + $self->timezone = $timezone; - if ($this->startDate) { - $this->setStartDate($this->startDate->shiftTimezone($timezone)); + if ($self->startDate) { + $self = $self->setStartDate($self->startDate->shiftTimezone($timezone)); } - if ($this->endDate) { - $this->setEndDate($this->endDate->shiftTimezone($timezone)); + if ($self->endDate) { + $self = $self->setEndDate($self->endDate->shiftTimezone($timezone)); } - return $this; + return $self; } /** @@ -1896,7 +2034,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable /** * Determines if the instance is equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -1911,7 +2049,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable /** * Determines if the instance is equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -1934,7 +2072,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable /** * Determines if the instance is not equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -1949,7 +2087,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable /** * Determines if the instance is not equal to another. - * Warning: if options differ, instances wil never be equal. + * Warning: if options differ, instances will never be equal. * * @param mixed $period * @@ -2130,19 +2268,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param float|int|string|\DateInterval|null $precision * @param string $function * - * @return $this + * @return static */ public function roundUnit($unit, $precision = 1, $function = 'round') { - $this->setStartDate($this->getStartDate()->roundUnit($unit, $precision, $function)); + $self = $this->copyIfImmutable(); + $self = $self->setStartDate($self->getStartDate()->roundUnit($unit, $precision, $function)); - if ($this->endDate) { - $this->setEndDate($this->getEndDate()->roundUnit($unit, $precision, $function)); + if ($self->endDate) { + $self = $self->setEndDate($self->getEndDate()->roundUnit($unit, $precision, $function)); } - $this->setDateInterval($this->getDateInterval()->roundUnit($unit, $precision, $function)); - - return $this; + return $self->setDateInterval($self->getDateInterval()->roundUnit($unit, $precision, $function)); } /** @@ -2151,7 +2288,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param string $unit * @param float|int|string|\DateInterval|null $precision * - * @return $this + * @return static */ public function floorUnit($unit, $precision = 1) { @@ -2164,7 +2301,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param string $unit * @param float|int|string|\DateInterval|null $precision * - * @return $this + * @return static */ public function ceilUnit($unit, $precision = 1) { @@ -2177,7 +2314,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * @param float|int|string|\DateInterval|null $precision * @param string $function * - * @return $this + * @return static */ public function round($precision = null, $function = 'round') { @@ -2192,7 +2329,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param float|int|string|\DateInterval|null $precision * - * @return $this + * @return static */ public function floor($precision = null) { @@ -2204,7 +2341,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @param float|int|string|\DateInterval|null $precision * - * @return $this + * @return static */ public function ceil($precision = null) { @@ -2393,9 +2530,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable protected function handleChangedParameters() { if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) { - $this->setDateClass(CarbonImmutable::class); + $this->dateClass = CarbonImmutable::class; } elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) { - $this->setDateClass(Carbon::class); + $this->dateClass = Carbon::class; } $this->validationResult = null; @@ -2555,14 +2692,51 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable if (\is_string($value)) { $value = trim($value); - if (!preg_match('/^P[0-9T]/', $value) && - !preg_match('/^R[0-9]/', $value) && - preg_match('/[a-z0-9]/i', $value) + if (!preg_match('/^P[\dT]/', $value) && + !preg_match('/^R\d/', $value) && + preg_match('/[a-z\d]/i', $value) ) { - return Carbon::parse($value, $this->tzName); + $dateClass = $this->dateClass; + + return $dateClass::parse($value, $this->tzName); } } return null; } + + private function isInfiniteDate($date): bool + { + return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); + } + + private function rawDate($date): ?DateTimeInterface + { + if ($date === false || $date === null) { + return null; + } + + if ($date instanceof CarbonInterface) { + return $date->isMutable() + ? $date->toDateTime() + : $date->toDateTimeImmutable(); + } + + if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { + return $date; + } + + $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; + + return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); + } + + private static function setDefaultParameters(array &$parameters, array $defaults): void + { + foreach ($defaults as [$index, $name, $value]) { + if (!\array_key_exists($index, $parameters) && !\array_key_exists($name, $parameters)) { + $parameters[$index] = $value; + } + } + } } diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php b/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php index b4d16ba9..c81899f1 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php @@ -30,7 +30,7 @@ class CarbonTimeZone extends DateTimeZone throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); } - return ($timezone >= 0 ? '+' : '').$timezone.':00'; + return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; } protected static function getDateTimeZoneNameFromMixed($timezone) @@ -101,15 +101,15 @@ class CarbonTimeZone extends DateTimeZone $tz = static::getDateTimeZoneFromName($object); } - if ($tz === false) { - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); - } - - return false; + if ($tz !== false) { + return new static($tz->getName()); } - return new static($tz->getName()); + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); + } + + return false; } /** @@ -231,15 +231,15 @@ class CarbonTimeZone extends DateTimeZone { $tz = $this->toRegionName($date); - if ($tz === false) { - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); - } - - return false; + if ($tz !== false) { + return new static($tz); } - return new static($tz); + if (Carbon::isStrictModeEnabled()) { + throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); + } + + return false; } /** @@ -252,6 +252,18 @@ class CarbonTimeZone extends DateTimeZone return $this->getName(); } + /** + * Return the type number: + * + * Type 1; A UTC offset, such as -0300 + * Type 2; A timezone abbreviation, such as GMT + * Type 3: A timezone identifier, such as Europe/London + */ + public function getType(): int + { + return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; + } + /** * Create a CarbonTimeZone from mixed input. * diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php deleted file mode 100644 index ccc457fc..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Doctrine\DBAL\Platforms\AbstractPlatform; - -interface CarbonDoctrineType -{ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform); - - public function convertToPHPValue($value, AbstractPlatform $platform); - - public function convertToDatabaseValue($value, AbstractPlatform $platform); -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php deleted file mode 100644 index bf476a77..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Doctrine\DBAL\Platforms\AbstractPlatform; - -class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType -{ - /** - * {@inheritdoc} - * - * @return string - */ - public function getName() - { - return 'carbon_immutable'; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function requiresSQLCommentHint(AbstractPlatform $platform) - { - return true; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php deleted file mode 100644 index 9289d84d..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Doctrine\DBAL\Platforms\AbstractPlatform; - -class CarbonType extends DateTimeType implements CarbonDoctrineType -{ - /** - * {@inheritdoc} - * - * @return string - */ - public function getName() - { - return 'carbon'; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function requiresSQLCommentHint(AbstractPlatform $platform) - { - return true; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php deleted file mode 100644 index ecfe17e7..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -use Carbon\Carbon; -use Carbon\CarbonInterface; -use DateTimeInterface; -use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Types\ConversionException; -use Exception; - -/** - * @template T of CarbonInterface - */ -trait CarbonTypeConverter -{ - /** - * @return class-string - */ - protected function getCarbonClassName(): string - { - return Carbon::class; - } - - /** - * @return string - */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) - { - $precision = $fieldDeclaration['precision'] ?: 10; - - if ($fieldDeclaration['secondPrecision'] ?? false) { - $precision = 0; - } - - if ($precision === 10) { - $precision = DateTimeDefaultPrecision::get(); - } - - $type = parent::getSQLDeclaration($fieldDeclaration, $platform); - - if (!$precision) { - return $type; - } - - if (str_contains($type, '(')) { - return preg_replace('/\(\d+\)/', "($precision)", $type); - } - - [$before, $after] = explode(' ', "$type "); - - return trim("$before($precision) $after"); - } - - /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @return T|null - */ - public function convertToPHPValue($value, AbstractPlatform $platform) - { - $class = $this->getCarbonClassName(); - - if ($value === null || is_a($value, $class)) { - return $value; - } - - if ($value instanceof DateTimeInterface) { - return $class::instance($value); - } - - $date = null; - $error = null; - - try { - $date = $class::parse($value); - } catch (Exception $exception) { - $error = $exception; - } - - if (!$date) { - throw ConversionException::conversionFailedFormat( - $value, - $this->getName(), - 'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()', - $error - ); - } - - return $date; - } - - /** - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @return string|null - */ - public function convertToDatabaseValue($value, AbstractPlatform $platform) - { - if ($value === null) { - return $value; - } - - if ($value instanceof DateTimeInterface) { - return $value->format('Y-m-d H:i:s.u'); - } - - throw ConversionException::conversionFailedInvalidType( - $value, - $this->getName(), - ['null', 'DateTime', 'Carbon'] - ); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php deleted file mode 100644 index 642fd413..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Doctrine; - -class DateTimeDefaultPrecision -{ - private static $precision = 6; - - /** - * Change the default Doctrine datetime and datetime_immutable precision. - * - * @param int $precision - */ - public static function set(int $precision): void - { - self::$precision = $precision; - } - - /** - * Get the default Doctrine datetime and datetime_immutable precision. - * - * @return int - */ - public static function get(): int - { - return self::$precision; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php deleted file mode 100644 index 49927103..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeImmutableType.php +++ /dev/null @@ -1,24 +0,0 @@ - */ - use CarbonTypeConverter; - - /** - * @return class-string - */ - protected function getCarbonClassName(): string - { - return CarbonImmutable::class; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php b/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php deleted file mode 100644 index 29b0bb95..00000000 --- a/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php +++ /dev/null @@ -1,16 +0,0 @@ - */ - use CarbonTypeConverter; -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php index b3a08719..3ca8837d 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class BadComparisonUnitException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Bad comparison unit: '$unit'", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php index d5cd5564..2e222e54 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The method. + * + * @var string + */ + protected $method; + /** * Constructor. * * @param string $method * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($method, $code = 0, Exception $previous = null) + public function __construct($method, $code = 0, Throwable $previous = null) { + $this->method = $method; + parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php index 1d7ec542..4ceaa2ef 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The setter. + * + * @var string + */ + protected $setter; + /** * Constructor. * - * @param string $method + * @param string $setter * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($method, $code = 0, Exception $previous = null) + public function __construct($setter, $code = 0, Throwable $previous = null) { - parent::__construct(sprintf("Unknown fluent setter '%s'", $method), $code, $previous); + $this->setter = $setter; + + parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php index 73c2dd86..108206d3 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php @@ -13,4 +13,5 @@ namespace Carbon\Exceptions; interface BadMethodCallException extends Exception { + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php index 3bbbd77d..8ad747e7 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php @@ -13,4 +13,5 @@ namespace Carbon\Exceptions; interface Exception { + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php index a48d4f93..db334c6c 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php @@ -11,20 +11,38 @@ namespace Carbon\Exceptions; -use Exception; use RuntimeException as BaseRuntimeException; +use Throwable; class ImmutableException extends BaseRuntimeException implements RuntimeException { + /** + * The value. + * + * @var string + */ + protected $value; + /** * Constructor. * * @param string $value the immutable type/value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($value, $code = 0, Exception $previous = null) + public function __construct($value, $code = 0, Throwable $previous = null) { + $this->value = $value; parent::__construct("$value is immutable.", $code, $previous); } + + /** + * Get the value. + * + * @return string + */ + public function getValue(): string + { + return $this->value; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php index 9739f4d1..5b013cd5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php @@ -13,4 +13,5 @@ namespace Carbon\Exceptions; interface InvalidArgumentException extends Exception { + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php index d2f37019..a421401f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php index 99bb91c0..c9ecb6b0 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException { @@ -36,9 +36,9 @@ class InvalidDateException extends BaseInvalidArgumentException implements Inval * @param string $field * @param mixed $value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($field, $value, $code = 0, Exception $previous = null) + public function __construct($field, $value, $code = 0, Throwable $previous = null) { $this->field = $field; $this->value = $value; diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php index 3341b49d..92d55fe3 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php index 5f9f142e..69cf4128 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php index a37e3f5e..9bd84a96 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php index ede47712..cf2c9024 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php index 892e16e8..f7259558 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php index 3fbe3fc4..2c8ec9ba 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php index 2b4c48e3..7a87632c 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php @@ -12,24 +12,39 @@ namespace Carbon\Exceptions; use Carbon\CarbonInterface; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The className. + * + * @var string + */ + protected $className; + /** * Constructor. * * @param string $className * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($className, $code = 0, Exception $previous = null) + public function __construct($className, $code = 0, Throwable $previous = null) { - parent::__construct(sprintf( - 'Given class does not implement %s: %s', - CarbonInterface::class, - $className - ), $code, $previous); + $this->className = $className; + + parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); + } + + /** + * Get the className. + * + * @return string + */ + public function getClassName(): string + { + return $this->className; } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php index 41bb6290..4edd7a48 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php index adbc36cd..f2c54684 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException { @@ -21,9 +21,9 @@ class NotLocaleAwareException extends BaseInvalidArgumentException implements In * * @param mixed $object * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($object, $code = 0, Exception $previous = null) + public function __construct($object, $code = 0, Throwable $previous = null) { $dump = \is_object($object) ? \get_class($object) : \gettype($object); diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php index 54822d95..2c586d0b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php @@ -11,8 +11,8 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; // This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 // use OutOfRangeException as BaseOutOfRangeException; @@ -55,9 +55,9 @@ class OutOfRangeException extends BaseInvalidArgumentException implements Invali * @param mixed $max * @param mixed $value * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $min, $max, $value, $code = 0, Exception $previous = null) + public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) { $this->unit = $unit; $this->min = $min; diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php index 0314c5d8..5416fd14 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php @@ -11,23 +11,78 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The expected. + * + * @var string + */ + protected $expected; + + /** + * The actual. + * + * @var string + */ + protected $actual; + + /** + * The help message. + * + * @var string + */ + protected $help; + /** * Constructor. * * @param string $expected * @param string $actual * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($expected, $actual, $help = '', $code = 0, Exception $previous = null) + public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) { + $this->expected = $expected; + $this->actual = $actual; + $this->help = $help; + $actual = $actual === '' ? 'data is missing' : "get '$actual'"; parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); } + + /** + * Get the expected. + * + * @return string + */ + public function getExpected(): string + { + return $this->expected; + } + + /** + * Get the actual. + * + * @return string + */ + public function getActual(): string + { + return $this->actual; + } + + /** + * Get the help message. + * + * @return string + */ + public function getHelp(): string + { + return $this->help; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php index 24bf5a68..ad196f79 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php @@ -13,4 +13,5 @@ namespace Carbon\Exceptions; interface RuntimeException extends Exception { + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php index 8bd8653e..ee99953b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php index 39ee12c5..0e723056 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class UnitNotConfiguredException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php index 6c8c01b6..5c504975 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php @@ -11,20 +11,39 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException { + /** + * The getter. + * + * @var string + */ + protected $getter; + /** * Constructor. * - * @param string $name getter name + * @param string $getter getter name * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($name, $code = 0, Exception $previous = null) + public function __construct($getter, $code = 0, Throwable $previous = null) { - parent::__construct("Unknown getter '$name'", $code, $previous); + $this->getter = $getter; + + parent::__construct("Unknown getter '$getter'", $code, $previous); + } + + /** + * Get the getter. + * + * @return string + */ + public function getGetter(): string + { + return $this->getter; } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php index 901db986..75273a70 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php @@ -12,19 +12,38 @@ namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; -use Exception; +use Throwable; class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException { + /** + * The method. + * + * @var string + */ + protected $method; + /** * Constructor. * * @param string $method * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($method, $code = 0, Exception $previous = null) + public function __construct($method, $code = 0, Throwable $previous = null) { + $this->method = $method; + parent::__construct("Method $method does not exist.", $code, $previous); } + + /** + * Get the method. + * + * @return string + */ + public function getMethod(): string + { + return $this->method; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php index c9e9c9ff..a795f5d7 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php @@ -11,20 +11,39 @@ namespace Carbon\Exceptions; -use Exception; use InvalidArgumentException as BaseInvalidArgumentException; +use Throwable; class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException { + /** + * The setter. + * + * @var string + */ + protected $setter; + /** * Constructor. * - * @param string $name setter name + * @param string $setter setter name * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($name, $code = 0, Exception $previous = null) + public function __construct($setter, $code = 0, Throwable $previous = null) { - parent::__construct("Unknown setter '$name'", $code, $previous); + $this->setter = $setter; + + parent::__construct("Unknown setter '$setter'", $code, $previous); + } + + /** + * Get the setter. + * + * @return string + */ + public function getSetter(): string + { + return $this->setter; } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php index d965c82a..ecd7f7a5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php @@ -11,19 +11,38 @@ namespace Carbon\Exceptions; -use Exception; +use Throwable; class UnknownUnitException extends UnitException { + /** + * The unit. + * + * @var string + */ + protected $unit; + /** * Constructor. * * @param string $unit * @param int $code - * @param Exception|null $previous + * @param Throwable|null $previous */ - public function __construct($unit, $code = 0, Exception $previous = null) + public function __construct($unit, $code = 0, Throwable $previous = null) { + $this->unit = $unit; + parent::__construct("Unknown unit '$unit'.", $code, $previous); } + + /** + * Get the unit. + * + * @return string + */ + public function getUnit(): string + { + return $this->unit; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php index 6f8b39f5..1654ab11 100644 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php +++ b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php @@ -11,20 +11,9 @@ namespace Carbon\Exceptions; -use Exception; use RuntimeException as BaseRuntimeException; class UnreachableException extends BaseRuntimeException implements RuntimeException { - /** - * Constructor. - * - * @param string $message - * @param int $code - * @param Exception|null $previous - */ - public function __construct($message, $code = 0, Exception $previous = null) - { - parent::__construct($message, $code, $previous); - } + // } diff --git a/vendor/nesbot/carbon/src/Carbon/Factory.php b/vendor/nesbot/carbon/src/Carbon/Factory.php index f8c72890..d497535f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Factory.php +++ b/vendor/nesbot/carbon/src/Carbon/Factory.php @@ -177,10 +177,10 @@ use ReflectionMethod; * parameter of null. * /!\ Use this method for unit tests only. * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string + * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string * format. - * Set the default format used when type juggling a Carbon instance to a string + * Set the default format used when type juggling a Carbon instance to a string. * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. @@ -231,7 +231,7 @@ use ReflectionMethod; * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * /!\ Use this method for unit tests only. diff --git a/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php b/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php index 596ee806..d88a1cf6 100644 --- a/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php +++ b/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php @@ -12,6 +12,9 @@ namespace Carbon; use Closure; +use DateTimeImmutable; +use DateTimeZone; +use Psr\Clock\ClockInterface; /** * A factory to generate CarbonImmutable instances with common settings. @@ -111,7 +114,6 @@ use Closure; * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. * @method void mixin($mixin) Mix another object into the class. - * @method CarbonImmutable now($tz = null) Get a Carbon instance for the current date and time. * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. * This is an alias for the constructor that allows better fluent syntax * as it allows you to do Carbon::parse('Monday next week')->fn() rather @@ -175,10 +177,10 @@ use Closure; * parameter of null. * /!\ Use this method for unit tests only. * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string + * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump another string * format. - * Set the default format used when type juggling a Carbon instance to a string + * Set the default format used when type juggling a Carbon instance to a string. * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. * You should rather use UTF-8 language packages on every machine. @@ -229,7 +231,7 @@ use Closure; * You should rather use the ->settings() method. * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then * clearing the test instance. * /!\ Use this method for unit tests only. @@ -237,7 +239,21 @@ use Closure; * * */ -class FactoryImmutable extends Factory +class FactoryImmutable extends Factory implements ClockInterface { protected $className = CarbonImmutable::class; + + /** + * Get a Carbon instance for the current date and time. + * + * @param DateTimeZone|string|int|null $tz + * + * @return CarbonImmutable + */ + public function now($tz = null): DateTimeImmutable + { + $className = $this->className; + + return new $className(null, $tz); + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php index 75fe47f6..35a22b1d 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php index 362009e2..35180965 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php index 362009e2..35180965 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php index 0ac09958..2d420084 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php index 0ac09958..2d420084 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php index e6f0531d..b3fb1cfe 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php @@ -16,6 +16,7 @@ * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) + * - Abdullah-Alhariri */ $months = [ 'يناير', @@ -90,4 +91,5 @@ return [ ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php index 55bb10c3..2792745c 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php index 362009e2..35180965 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php index e790b99e..503c60d2 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php @@ -9,5 +9,10 @@ * file that was distributed with this source code. */ +/* + * Authors: + * - Abdullah-Alhariri + */ return array_replace_recursive(require __DIR__.'/ar.php', [ + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php index 362009e2..35180965 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php index 10aaa2ed..550b0c73 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php @@ -15,6 +15,7 @@ * - JD Isaacks * - Atef Ben Ali (atefBB) * - Mohamed Sabil (mohamedsabil83) + * - Abdullah-Alhariri */ $months = [ 'يناير', @@ -89,4 +90,5 @@ return [ ], 'meridiem' => ['ص', 'م'], 'weekend' => [5, 6], + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php index 362009e2..35180965 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php index 0ac09958..2d420084 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php index 5dc29388..169fe88a 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php @@ -12,6 +12,7 @@ /* * Authors: * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org + * - Abdullah-Alhariri */ return array_replace_recursive(require __DIR__.'/ar.php', [ 'formats' => [ @@ -23,4 +24,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [ 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], 'day_of_first_week_of_year' => 1, + 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/be.php b/vendor/nesbot/carbon/src/Carbon/Lang/be.php index 51b4d0cc..ee736365 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/be.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/be.php @@ -9,13 +9,12 @@ * file that was distributed with this source code. */ -// @codeCoverageIgnoreStart - use Carbon\CarbonInterface; use Symfony\Component\Translation\PluralizationRules; -if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - PluralizationRules::set(function ($number) { +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'be'); } diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php index 861acd2a..1c16421a 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php @@ -9,5 +9,15 @@ * file that was distributed with this source code. */ +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'ca'); + }, 'ca_ES_Valencia'); +} +// @codeCoverageIgnoreEnd + return array_replace_recursive(require __DIR__.'/ca.php', [ ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php index 8cff9a01..c01e3ccc 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php @@ -101,7 +101,8 @@ return [ 'after' => $za, 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, - 'months' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], + 'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'], + 'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], 'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'], 'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], 'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'], diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cy.php b/vendor/nesbot/carbon/src/Carbon/Lang/cy.php index ab7c45a4..119274f0 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cy.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/cy.php @@ -60,7 +60,7 @@ return [ 'ordinal' => function ($number) { return $number.( $number > 20 - ? (\in_array($number, [40, 50, 60, 80, 100]) ? 'fed' : 'ain') + ? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain') : ([ '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/vendor/nesbot/carbon/src/Carbon/Lang/da.php index 4e6640a6..322f91d5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/da.php @@ -18,6 +18,7 @@ * - Jens Herlevsen * - Ulrik McArdle (mcardle) * - Frederik Sauer (FrittenKeeZ) + * - Janus Bahs Jacquet (kokoshneta) */ return [ 'year' => ':count år|:count år', @@ -41,7 +42,7 @@ return [ 'second' => ':count sekund|:count sekunder', 'a_second' => 'få sekunder|:count sekunder', 's' => ':count s.', - 'ago' => ':time siden', + 'ago' => 'for :time siden', 'from_now' => 'om :time', 'after' => ':time efter', 'before' => ':time før', @@ -70,9 +71,9 @@ return [ ], 'ordinal' => ':number.', 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], - 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], + 'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'], 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/vendor/nesbot/carbon/src/Carbon/Lang/de.php index ff00c974..3b70750e 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/de.php @@ -105,4 +105,13 @@ return [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' und '], + 'ordinal_words' => [ + 'of' => 'im', + 'first' => 'erster', + 'second' => 'zweiter', + 'third' => 'dritter', + 'fourth' => 'vierten', + 'fifth' => 'fünfter', + 'last' => 'letzten', + ], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/vendor/nesbot/carbon/src/Carbon/Lang/en.php index a8633fef..f81f617e 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/en.php @@ -72,7 +72,7 @@ return [ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'th' : ( + ((int) ($number % 100 / 10) === 1) ? 'th' : ( ($lastDigit === 1) ? 'st' : ( ($lastDigit === 2) ? 'nd' : ( ($lastDigit === 3) ? 'rd' : 'th' diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php index e2dd81db..10d9cd8f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php @@ -11,4 +11,12 @@ return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, + 'formats' => [ + 'LT' => 'HH:mm', + 'LTS' => 'HH:mm:ss', + 'L' => 'DD.MM.YYYY', + 'LL' => 'D MMMM YYYY', + 'LLL' => 'D MMMM YYYY HH:mm', + 'LLLL' => 'dddd D MMMM YYYY HH:mm', + ], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/vendor/nesbot/carbon/src/Carbon/Lang/es.php index f77ec39c..1c4fcfd0 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/es.php @@ -26,6 +26,7 @@ * - quinterocesar * - Daniel Commesse Liévanos (danielcommesse) * - Pete Scopes (pdscopes) + * - gam04 */ use Carbon\CarbonInterface; @@ -108,4 +109,13 @@ return [ 'day_of_first_week_of_year' => 4, 'list' => [', ', ' y '], 'meridiem' => ['a. m.', 'p. m.'], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'primer', + 'second' => 'segundo', + 'third' => 'tercer', + 'fourth' => 'cuarto', + 'fifth' => 'quinto', + 'last' => 'último', + ], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php index 2003e1ea..edf2d6d3 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php @@ -74,8 +74,10 @@ return [ 'LTS' => 'HH.mm:ss', 'L' => 'D.M.YYYY', 'LL' => 'dddd D. MMMM[ta] YYYY', + 'll' => 'ddd D. MMM YYYY', 'LLL' => 'D.MM. HH.mm', 'LLLL' => 'D. MMMM[ta] YYYY HH.mm', + 'llll' => 'D. MMM YY HH.mm', ], 'weekdays' => ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'], 'weekdays_short' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php index 73fe5e41..f4c7247b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php @@ -90,7 +90,7 @@ return [ 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], 'ordinal' => function ($number, $period) { switch ($period) { - // In french, only the first has be ordinal, other number remains cardinal + // In French, only the first has to be ordinal, other number remains cardinal // @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais case 'D': return $number.($number === 1 ? 'er' : ''); @@ -111,4 +111,13 @@ return [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' et '], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'premier', + 'second' => 'deuxième', + 'third' => 'troisième', + 'fourth' => 'quatrième', + 'fifth' => 'cinquième', + 'last' => 'dernier', + ], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php index b2d2ac11..b7583eec 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php @@ -82,7 +82,7 @@ return [ 'second_before' => ':count másodperccel', 's_before' => ':count másodperccel', 'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'], - 'months_short' => ['jan.', 'feb.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], + 'months_short' => ['jan.', 'febr.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], 'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'], 'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'], 'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'], diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/vendor/nesbot/carbon/src/Carbon/Lang/it.php index 605bcbb5..49875d7e 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -55,7 +55,7 @@ return [ 'µs' => ':countµs', 'ago' => ':time fa', 'from_now' => function ($time) { - return (preg_match('/^[0-9].+$/', $time) ? 'tra' : 'in')." $time"; + return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time"; }, 'after' => ':time dopo', 'before' => ':time prima', @@ -103,4 +103,13 @@ return [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], + 'ordinal_words' => [ + 'of' => 'di', + 'first' => 'primo', + 'second' => 'secondo', + 'third' => 'terzo', + 'fourth' => 'quarto', + 'fifth' => 'quinto', + 'last' => 'ultimo', + ], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ku.php b/vendor/nesbot/carbon/src/Carbon/Lang/ku.php index b001e301..189960c8 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ku.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ku.php @@ -11,31 +11,29 @@ /* * Authors: - * - Halwest Manguri - * - Kardo Qadir + * - Unicode, Inc. */ -$months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', '‌حوزەیران', 'تەمموز', 'ئاب', 'ئەیلول', 'تشرینی یەکەم', 'تشرینی دووەم', 'کانونی یەکەم']; - -$weekdays = ['دوو شەممە', 'سێ شەممە', 'چوار شەممە', 'پێنج شەممە', 'هەینی', 'شەممە', 'یەک شەممە']; return [ - 'ago' => 'پێش :time', - 'from_now' => ':time لە ئێستاوە', - 'after' => 'دوای :time', - 'before' => 'پێش :time', - 'year' => '{0}ساڵ|{1}ساڵێک|{2}٢ ساڵ|[3,10]:count ساڵ|[11,Inf]:count ساڵ', - 'month' => '{0}مانگ|{1}مانگێک|{2}٢ مانگ|[3,10]:count مانگ|[11,Inf]:count مانگ', - 'week' => '{0}هەفتە|{1}هەفتەیەک|{2}٢ هەفتە|[3,10]:count هەفتە|[11,Inf]:count هەفتە', - 'day' => '{0}ڕۆژ|{1}ڕۆژێک|{2}٢ ڕۆژ|[3,10]:count ڕۆژ|[11,Inf]:count ڕۆژ', - 'hour' => '{0}کاتژمێر|{1}کاتژمێرێک|{2}٢ کاتژمێر|[3,10]:count کاتژمێر|[11,Inf]:count کاتژمێر', - 'minute' => '{0}خولەک|{1}خولەکێک|{2}٢ خولەک|[3,10]:count خولەک|[11,Inf]:count خولەک', - 'second' => '{0}چرکە|{1}چرکەیەک|{2}٢ چرکە|[3,10]:count چرکە|[11,Inf]:count چرکە', - 'months' => $months, - 'months_standalone' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => $weekdays, + 'ago' => 'berî :time', + 'from_now' => 'di :time de', + 'after' => ':time piştî', + 'before' => ':time berê', + 'year' => ':count sal', + 'year_ago' => ':count salê|:count salan', + 'year_from_now' => 'salekê|:count salan', + 'month' => ':count meh', + 'week' => ':count hefte', + 'day' => ':count roj', + 'hour' => ':count saet', + 'minute' => ':count deqîqe', + 'second' => ':count saniye', + 'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'], + 'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'], + 'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'], + 'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'], + 'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'], + 'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'], 'list' => [', ', ' û '], 'first_day_of_week' => 6, 'day_of_first_week_of_year' => 1, diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php index 693eceb5..d5cba7ca 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php @@ -176,7 +176,8 @@ return [ 'weekdays' => $daysOfWeek, 'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], 'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], - 'months' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'], + 'months' => ['janvāris', 'februāris', 'marts', 'aprīlis', 'maijs', 'jūnijs', 'jūlijs', 'augusts', 'septembris', 'oktobris', 'novembris', 'decembris'], + 'months_standalone' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'], 'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jūn.', 'jūl.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'], 'meridiem' => ['priekšpusdiena', 'pēcpusdiena'], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/vendor/nesbot/carbon/src/Carbon/Lang/mn.php index 717d199b..38c6434d 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mn.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/mn.php @@ -26,6 +26,7 @@ * - Nicolás Hock Isaza * - Ochirkhuyag * - Batmandakh + * - lucifer-crybaby */ return [ 'year' => ':count жил', @@ -43,38 +44,55 @@ return [ 'second' => ':count секунд', 's' => ':countс', - 'ago' => ':timeн өмнө', - 'year_ago' => ':count жилий', - 'month_ago' => ':count сары', - 'day_ago' => ':count хоногий', - 'hour_ago' => ':count цагий', - 'minute_ago' => ':count минуты', - 'second_ago' => ':count секунды', + 'ago_mode' => 'last', + 'ago' => ':time өмнө', + 'year_ago' => ':count жилийн', + 'y_ago' => ':count жилийн', + 'month_ago' => ':count сарын', + 'm_ago' => ':count сарын', + 'day_ago' => ':count хоногийн', + 'd_ago' => ':count хоногийн', + 'week_ago' => ':count долоо хоногийн', + 'w_ago' => ':count долоо хоногийн', + 'hour_ago' => ':count цагийн', + 'minute_ago' => ':count минутын', + 'second_ago' => ':count секундын', + 'from_now_mode' => 'last', 'from_now' => 'одоогоос :time', 'year_from_now' => ':count жилийн дараа', + 'y_from_now' => ':count жилийн дараа', 'month_from_now' => ':count сарын дараа', + 'm_from_now' => ':count сарын дараа', 'day_from_now' => ':count хоногийн дараа', + 'd_from_now' => ':count хоногийн дараа', 'hour_from_now' => ':count цагийн дараа', 'minute_from_now' => ':count минутын дараа', 'second_from_now' => ':count секундын дараа', - // Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action... - 'after' => ':timeн дараа', - 'year_after' => ':count жилий', - 'month_after' => ':count сары', - 'day_after' => ':count хоногий', - 'hour_after' => ':count цагий', - 'minute_after' => ':count минуты', - 'second_after' => ':count секунды', + 'after_mode' => 'last', + 'after' => ':time дараа', + 'year_after' => ':count жилийн', + 'y_after' => ':count жилийн', + 'month_after' => ':count сарын', + 'm_after' => ':count сарын', + 'day_after' => ':count хоногийн', + 'd_after' => ':count хоногийн', + 'hour_after' => ':count цагийн', + 'minute_after' => ':count минутын', + 'second_after' => ':count секундын', - 'before' => ':timeн өмнө', - 'year_before' => ':count жилий', - 'month_before' => ':count сары', - 'day_before' => ':count хоногий', - 'hour_before' => ':count цагий', - 'minute_before' => ':count минуты', - 'second_before' => ':count секунды', + 'before_mode' => 'last', + 'before' => ':time өмнө', + 'year_before' => ':count жилийн', + 'y_before' => ':count жилийн', + 'month_before' => ':count сарын', + 'm_before' => ':count сарын', + 'day_before' => ':count хоногийн', + 'd_before' => ':count хоногийн', + 'hour_before' => ':count цагийн', + 'minute_before' => ':count минутын', + 'second_before' => ':count секундын', 'list' => ', ', 'diff_now' => 'одоо', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php index 36934eeb..c9e80854 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php @@ -48,7 +48,7 @@ return [ 'ago' => ':time yang lepas', 'from_now' => ':time dari sekarang', 'after' => ':time kemudian', - 'before' => ':time lepas', + 'before' => ':time sebelum', 'diff_now' => 'sekarang', 'diff_today' => 'Hari', 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/oc.php b/vendor/nesbot/carbon/src/Carbon/Lang/oc.php index 89693e67..c9411d69 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/oc.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/oc.php @@ -17,7 +17,7 @@ use Symfony\Component\Translation\PluralizationRules; if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - PluralizationRules::set(function ($number) { + PluralizationRules::set(static function ($number) { return $number == 1 ? 0 : 1; }, 'oc'); } diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index f0196c0d..b7205354 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -62,7 +62,7 @@ return [ }, 'after' => ':time po', 'before' => ':time przed', - 'diff_now' => 'przed chwilą', + 'diff_now' => 'teraz', 'diff_today' => 'Dziś', 'diff_today_regexp' => 'Dziś(?:\\s+o)?', 'diff_yesterday' => 'wczoraj', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php index 0af89499..bb6359b1 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php @@ -104,4 +104,13 @@ return [ 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' e '], + 'ordinal_words' => [ + 'of' => 'de', + 'first' => 'primeira', + 'second' => 'segunda', + 'third' => 'terceira', + 'fourth' => 'quarta', + 'fifth' => 'quinta', + 'last' => 'última', + ], ]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sh.php b/vendor/nesbot/carbon/src/Carbon/Lang/sh.php index e4aa5a1c..e03b5067 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sh.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sh.php @@ -13,7 +13,7 @@ use Symfony\Component\Translation\PluralizationRules; if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - PluralizationRules::set(function ($number) { + PluralizationRules::set(static function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'sh'); } diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index fd0f6b3e..f9702e96 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -31,33 +31,89 @@ * - jofi * - Jakub ADAMEC * - Marek Adamický + * - AlterwebStudio */ + +use Carbon\CarbonInterface; + +$fromNow = function ($time) { + return 'o '.strtr($time, [ + 'hodina' => 'hodinu', + 'minúta' => 'minútu', + 'sekunda' => 'sekundu', + ]); +}; + +$ago = function ($time) { + $replacements = [ + '/\bhodina\b/' => 'hodinou', + '/\bminúta\b/' => 'minútou', + '/\bsekunda\b/' => 'sekundou', + '/\bdeň\b/u' => 'dňom', + '/\btýždeň\b/u' => 'týždňom', + '/\bmesiac\b/' => 'mesiacom', + '/\brok\b/' => 'rokom', + ]; + + $replacementsPlural = [ + '/\bhodiny\b/' => 'hodinami', + '/\bminúty\b/' => 'minútami', + '/\bsekundy\b/' => 'sekundami', + '/\bdni\b/' => 'dňami', + '/\btýždne\b/' => 'týždňami', + '/\bmesiace\b/' => 'mesiacmi', + '/\broky\b/' => 'rokmi', + ]; + + foreach ($replacements + $replacementsPlural as $pattern => $replacement) { + $time = preg_replace($pattern, $replacement, $time); + } + + return "pred $time"; +}; + return [ - 'year' => 'rok|:count roky|:count rokov', + 'year' => ':count rok|:count roky|:count rokov', + 'a_year' => 'rok|:count roky|:count rokov', 'y' => ':count r', - 'month' => 'mesiac|:count mesiace|:count mesiacov', + 'month' => ':count mesiac|:count mesiace|:count mesiacov', + 'a_month' => 'mesiac|:count mesiace|:count mesiacov', 'm' => ':count m', - 'week' => 'týždeň|:count týždne|:count týždňov', + 'week' => ':count týždeň|:count týždne|:count týždňov', + 'a_week' => 'týždeň|:count týždne|:count týždňov', 'w' => ':count t', - 'day' => 'deň|:count dni|:count dní', + 'day' => ':count deň|:count dni|:count dní', + 'a_day' => 'deň|:count dni|:count dní', 'd' => ':count d', - 'hour' => 'hodinu|:count hodiny|:count hodín', + 'hour' => ':count hodina|:count hodiny|:count hodín', + 'a_hour' => 'hodina|:count hodiny|:count hodín', 'h' => ':count h', - 'minute' => 'minútu|:count minúty|:count minút', + 'minute' => ':count minúta|:count minúty|:count minút', + 'a_minute' => 'minúta|:count minúty|:count minút', 'min' => ':count min', - 'second' => 'sekundu|:count sekundy|:count sekúnd', + 'second' => ':count sekunda|:count sekundy|:count sekúnd', + 'a_second' => 'sekunda|:count sekundy|:count sekúnd', 's' => ':count s', - 'ago' => 'pred :time', - 'from_now' => 'za :time', - 'after' => 'o :time neskôr', - 'before' => ':time predtým', - 'year_ago' => 'rokom|:count rokmi|:count rokmi', - 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', - 'week_ago' => 'týždňom|:count týždňami|:count týždňami', - 'day_ago' => 'dňom|:count dňami|:count dňami', - 'hour_ago' => 'hodinou|:count hodinami|:count hodinami', - 'minute_ago' => 'minútou|:count minútami|:count minútami', - 'second_ago' => 'sekundou|:count sekundami|:count sekundami', + 'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd', + 'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd', + 'ms' => ':count ms', + 'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd', + 'µs' => ':count µs', + + 'ago' => $ago, + 'from_now' => $fromNow, + 'before' => ':time pred', + 'after' => ':time po', + + 'hour_after' => ':count hodinu|:count hodiny|:count hodín', + 'minute_after' => ':count minútu|:count minúty|:count minút', + 'second_after' => ':count sekundu|:count sekundy|:count sekúnd', + + 'hour_before' => ':count hodinu|:count hodiny|:count hodín', + 'minute_before' => ':count minútu|:count minúty|:count minút', + 'second_before' => ':count sekundu|:count sekundy|:count sekúnd', + 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'list' => [', ', ' a '], @@ -72,8 +128,26 @@ return [ 'LLL' => 'D. M. HH:mm', 'LLLL' => 'dddd D. MMMM YYYY HH:mm', ], + 'calendar' => [ + 'sameDay' => '[dnes o] LT', + 'nextDay' => '[zajtra o] LT', + 'lastDay' => '[včera o] LT', + 'nextWeek' => 'dddd [o] LT', + 'lastWeek' => static function (CarbonInterface $date) { + switch ($date->dayOfWeek) { + case 1: + case 2: + case 4: + case 5: + return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok + default: + return '[minulá] dddd [o] LT'; + } + }, + 'sameElse' => 'L', + ], 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], - 'weekdays_short' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], + 'weekdays_short' => ['ned', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'], 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php index 2e197212..1f1d1b33 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php @@ -49,9 +49,9 @@ return [ 'a_second' => '{1}nekaj sekund|:count sekunda|:count sekundi|:count sekunde|:count sekund', 's' => ':count s', - 'year_ago' => ':count letom|:count leti|:count leti|:count leti', - 'y_ago' => ':count letom|:count leti|:count leti|:count leti', - 'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci', + 'year_ago' => ':count letom|:count letoma|:count leti|:count leti', + 'y_ago' => ':count letom|:count letoma|:count leti|:count leti', + 'month_ago' => ':count mesecem|:count mesecema|:count meseci|:count meseci', 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', 'd_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php index c09df19c..8becbc57 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php @@ -24,28 +24,28 @@ use Carbon\CarbonInterface; return [ - 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', + 'year' => ':count година|:count године|:count година', 'y' => ':count г.', - 'month' => '{1}:count месец|{2,3,4}:count месеца|[0,Inf[:count месеци', + 'month' => ':count месец|:count месеца|:count месеци', 'm' => ':count м.', - 'week' => '{1}:count недеља|{2,3,4}:count недеље|[0,Inf[:count недеља', + 'week' => ':count недеља|:count недеље|:count недеља', 'w' => ':count нед.', - 'day' => '{1,21,31}:count дан|[0,Inf[:count дана', + 'day' => ':count дан|:count дана|:count дана', 'd' => ':count д.', - 'hour' => '{1,21}:count сат|{2,3,4,22,23,24}:count сата|[0,Inf[:count сати', + 'hour' => ':count сат|:count сата|:count сати', 'h' => ':count ч.', - 'minute' => '{1,21,31,41,51}:count минут|[0,Inf[:count минута', + 'minute' => ':count минут|:count минута|:count минута', 'min' => ':count мин.', - 'second' => '{1,21,31,41,51}:count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[0,Inf[:count секунди', + 'second' => ':count секунд|:count секунде|:count секунди', 's' => ':count сек.', 'ago' => 'пре :time', 'from_now' => 'за :time', 'after' => ':time након', 'before' => ':time пре', - 'year_from_now' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', - 'year_ago' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', - 'week_from_now' => '{1}:count недељу|{2,3,4}:count недеље|[0,Inf[:count недеља', - 'week_ago' => '{1}:count недељу|{2,3,4}:count недеље|[0,Inf[:count недеља', + 'year_from_now' => ':count годину|:count године|:count година', + 'year_ago' => ':count годину|:count године|:count година', + 'week_from_now' => ':count недељу|:count недеље|:count недеља', + 'week_ago' => ':count недељу|:count недеље|:count недеља', 'diff_now' => 'управо сада', 'diff_today' => 'данас', 'diff_today_regexp' => 'данас(?:\\s+у)?', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php index 0fb63d76..4b29a45c 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php @@ -9,6 +9,16 @@ * file that was distributed with this source code. */ +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_BA'); +} +// @codeCoverageIgnoreEnd + return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php index d13229ab..28d22fd2 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php @@ -16,32 +16,41 @@ */ use Carbon\CarbonInterface; +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_ME'); +} +// @codeCoverageIgnoreEnd return [ - 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', + 'year' => ':count година|:count године|:count година', 'y' => ':count г.', - 'month' => '{1}:count мјесец|{2,3,4}:count мјесеца|[0,Inf[:count мјесеци', + 'month' => ':count мјесец|:count мјесеца|:count мјесеци', 'm' => ':count мј.', - 'week' => '{1}:count недјеља|{2,3,4}:count недјеље|[0,Inf[:count недјеља', + 'week' => ':count недјеља|:count недјеље|:count недјеља', 'w' => ':count нед.', - 'day' => '{1,21,31}:count дан|[0,Inf[:count дана', + 'day' => ':count дан|:count дана|:count дана', 'd' => ':count д.', - 'hour' => '{1,21}:count сат|{2,3,4,22,23,24}:count сата|[0,Inf[:count сати', + 'hour' => ':count сат|:count сата|:count сати', 'h' => ':count ч.', - 'minute' => '{1,21,31,41,51}:count минут|[0,Inf[:count минута', + 'minute' => ':count минут|:count минута|:count минута', 'min' => ':count мин.', - 'second' => '{1,21,31,41,51}:count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[0,Inf[:count секунди', + 'second' => ':count секунд|:count секунде|:count секунди', 's' => ':count сек.', 'ago' => 'прије :time', 'from_now' => 'за :time', 'after' => ':time након', 'before' => ':time прије', - 'year_from_now' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', - 'year_ago' => '{1,21,31,41,51}:count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[:count година', + 'year_from_now' => ':count годину|:count године|:count година', + 'year_ago' => ':count годину|:count године|:count година', - 'week_from_now' => '{1}:count недјељу|{2,3,4}:count недјеље|[0,Inf[:count недјеља', - 'week_ago' => '{1}:count недјељу|{2,3,4}:count недјеље|[0,Inf[:count недјеља', + 'week_from_now' => ':count недјељу|:count недјеље|:count недјеља', + 'week_ago' => ':count недјељу|:count недјеље|:count недјеља', 'diff_now' => 'управо сада', 'diff_today' => 'данас', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php index 492baf0c..d6e29b86 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php @@ -9,6 +9,16 @@ * file that was distributed with this source code. */ +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Cyrl_XK'); +} +// @codeCoverageIgnoreEnd + return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [ 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php index 897c674a..95b2770d 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php @@ -9,6 +9,16 @@ * file that was distributed with this source code. */ +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_BA'); +} +// @codeCoverageIgnoreEnd + return array_replace_recursive(require __DIR__.'/sr_Latn.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php index e2133ef1..5b8f2d06 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php @@ -16,6 +16,15 @@ */ use Carbon\CarbonInterface; +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_ME'); +} +// @codeCoverageIgnoreEnd return array_replace_recursive(require __DIR__.'/sr.php', [ 'month' => ':count mjesec|:count mjeseca|:count mjeseci', @@ -27,6 +36,7 @@ return array_replace_recursive(require __DIR__.'/sr.php', [ 'before' => ':time prije', 'week_from_now' => ':count nedjelju|:count nedjelje|:count nedjelja', 'week_ago' => ':count nedjelju|:count nedjelje|:count nedjelja', + 'second_ago' => ':count sekund|:count sekunde|:count sekundi', 'diff_tomorrow' => 'sjutra', 'calendar' => [ 'nextDay' => '[sjutra u] LT', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php index d0b9d10b..5278e2e5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php @@ -9,6 +9,16 @@ * file that was distributed with this source code. */ +use Symfony\Component\Translation\PluralizationRules; + +// @codeCoverageIgnoreStart +if (class_exists(PluralizationRules::class)) { + PluralizationRules::set(static function ($number) { + return PluralizationRules::get($number, 'sr'); + }, 'sr_Latn_XK'); +} +// @codeCoverageIgnoreEnd + return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [ 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], ]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ss.php b/vendor/nesbot/carbon/src/Carbon/Lang/ss.php index cd4b9190..1c52c9bf 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ss.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ss.php @@ -50,7 +50,7 @@ return [ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'e' : ( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php index ca33e1c4..1706c719 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php @@ -70,7 +70,7 @@ return [ $lastDigit = $number % 10; return $number.( - (~~($number % 100 / 10) === 1) ? 'e' : ( + ((int) ($number % 100 / 10) === 1) ? 'e' : ( ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' ) ); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index b267b000..4217d16e 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -55,7 +55,7 @@ $processHoursFunction = function (CarbonInterface $date, string $format) { */ return [ 'year' => ':count рік|:count роки|:count років', - 'y' => ':countр', + 'y' => ':countр|:countрр|:countрр', 'a_year' => '{1}рік|:count рік|:count роки|:count років', 'month' => ':count місяць|:count місяці|:count місяців', 'm' => ':countм', @@ -193,6 +193,7 @@ return [ 'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'], ]; + $format = $format ?? ''; $nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format) ? 'accusative' : ( diff --git a/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php index 8be0569e..84e241e3 100644 --- a/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php +++ b/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php @@ -24,6 +24,22 @@ use Throwable; class ServiceProvider extends \Illuminate\Support\ServiceProvider { + /** @var callable|null */ + protected $appGetter = null; + + /** @var callable|null */ + protected $localeGetter = null; + + public function setAppGetter(?callable $appGetter): void + { + $this->appGetter = $appGetter; + } + + public function setLocaleGetter(?callable $localeGetter): void + { + $this->localeGetter = $localeGetter; + } + public function boot() { $this->updateLocale(); @@ -44,8 +60,12 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider public function updateLocale() { - $app = $this->app && method_exists($this->app, 'getLocale') ? $this->app : app('translator'); - $locale = $app->getLocale(); + $locale = $this->getLocale(); + + if ($locale === null) { + return; + } + Carbon::setLocale($locale); CarbonImmutable::setLocale($locale); CarbonPeriod::setLocale($locale); @@ -70,6 +90,34 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider // Needed for Laravel < 5.3 compatibility } + protected function getLocale() + { + if ($this->localeGetter) { + return ($this->localeGetter)(); + } + + $app = $this->getApp(); + $app = $app && method_exists($app, 'getLocale') + ? $app + : $this->getGlobalApp('translator'); + + return $app ? $app->getLocale() : null; + } + + protected function getApp() + { + if ($this->appGetter) { + return ($this->appGetter)(); + } + + return $this->app ?? $this->getGlobalApp(); + } + + protected function getGlobalApp(...$args) + { + return \function_exists('app') ? \app(...$args) : null; + } + protected function isEventDispatcher($instance) { return $instance instanceof EventDispatcher diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php index fc6fd2a7..fde67b36 100644 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php +++ b/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -14,6 +14,12 @@ declare(strict_types=1); namespace Carbon\PHPStan; use Closure; +use InvalidArgumentException; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as AdapterReflectionParameter; +use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as AdapterReflectionType; +use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; +use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; +use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; use PHPStan\Reflection\Php\BuiltinMethodReflection; use PHPStan\TrinaryLogic; use ReflectionClass; @@ -64,24 +70,34 @@ abstract class AbstractMacro implements BuiltinMethodReflection /** * Macro constructor. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName - * @param callable $macro + * @param class-string $className + * @param string $methodName + * @param callable $macro */ public function __construct(string $className, string $methodName, $macro) { $this->className = $className; $this->methodName = $methodName; - $this->reflectionFunction = \is_array($macro) + $rawReflectionFunction = \is_array($macro) ? new ReflectionMethod($macro[0], $macro[1]) : new ReflectionFunction($macro); - $this->parameters = $this->reflectionFunction->getParameters(); + $this->reflectionFunction = self::hasModernParser() + ? $this->getReflectionFunction($macro) + : $rawReflectionFunction; // @codeCoverageIgnore + $this->parameters = array_map( + function ($parameter) { + if ($parameter instanceof BetterReflectionParameter) { + return new AdapterReflectionParameter($parameter); + } - if ($this->reflectionFunction->isClosure()) { + return $parameter; // @codeCoverageIgnore + }, + $this->reflectionFunction->getParameters() + ); + + if ($rawReflectionFunction->isClosure()) { try { - $closure = $this->reflectionFunction->getClosure(); + $closure = $rawReflectionFunction->getClosure(); $boundClosure = Closure::bind($closure, new stdClass()); $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); } catch (Throwable $e) { @@ -90,6 +106,31 @@ abstract class AbstractMacro implements BuiltinMethodReflection } } + private function getReflectionFunction($spec) + { + if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) { + \assert($spec[1] !== ''); + + if (\is_object($spec[0])) { + return BetterReflectionClass::createFromInstance($spec[0]) + ->getMethod($spec[1]); + } + + return BetterReflectionClass::createFromName($spec[0]) + ->getMethod($spec[1]); + } + + if (\is_string($spec)) { + return BetterReflectionFunction::createFromName($spec); + } + + if ($spec instanceof Closure) { + return BetterReflectionFunction::createFromClosure($spec); + } + + throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore + } + /** * {@inheritdoc} */ @@ -175,7 +216,13 @@ abstract class AbstractMacro implements BuiltinMethodReflection */ public function getReturnType(): ?ReflectionType { - return $this->reflectionFunction->getReturnType(); + $type = $this->reflectionFunction->getReturnType(); + + if ($type instanceof ReflectionType) { + return $type; // @codeCoverageIgnore + } + + return self::adaptType($type); } /** @@ -205,18 +252,35 @@ abstract class AbstractMacro implements BuiltinMethodReflection return $this; } - /** - * {@inheritdoc} - */ - public function getReflection(): ?ReflectionMethod - { - return $this->reflectionFunction instanceof ReflectionMethod - ? $this->reflectionFunction - : null; - } - public function getTentativeReturnType(): ?ReflectionType { return null; } + + public function returnsByReference(): TrinaryLogic + { + return TrinaryLogic::createNo(); + } + + private static function adaptType($type) + { + $method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull') + ? 'fromTypeOrNull' + : 'fromReturnTypeOrNull'; // @codeCoverageIgnore + + return AdapterReflectionType::$method($type); + } + + private static function hasModernParser(): bool + { + static $modernParser = null; + + if ($modernParser !== null) { + return $modernParser; + } + + $modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull'); + + return $modernParser; + } } diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php index 83925873..de3e51f6 100644 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php +++ b/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php @@ -13,9 +13,16 @@ declare(strict_types=1); namespace Carbon\PHPStan; +use PHPStan\BetterReflection\Reflection\Adapter; use PHPStan\Reflection\Php\BuiltinMethodReflection; use ReflectionMethod; +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); + +require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class + ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; + $method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); require $method->hasReturnType() diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php index 8e2524c0..2cd6fce5 100644 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php +++ b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php @@ -11,10 +11,12 @@ namespace Carbon\PHPStan; +use PHPStan\Reflection\Assertions; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\MethodReflection; use PHPStan\Reflection\MethodsClassReflectionExtension; use PHPStan\Reflection\Php\PhpMethodReflectionFactory; +use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\TypehintHelper; /** @@ -38,10 +40,13 @@ final class MacroExtension implements MethodsClassReflectionExtension * Extension constructor. * * @param PhpMethodReflectionFactory $methodReflectionFactory + * @param ReflectionProvider $reflectionProvider */ - public function __construct(PhpMethodReflectionFactory $methodReflectionFactory) - { - $this->scanner = new MacroScanner(); + public function __construct( + PhpMethodReflectionFactory $methodReflectionFactory, + ReflectionProvider $reflectionProvider + ) { + $this->scanner = new MacroScanner($reflectionProvider); $this->methodReflectionFactory = $methodReflectionFactory; } @@ -59,6 +64,7 @@ final class MacroExtension implements MethodsClassReflectionExtension public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection { $builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName); + $supportAssertions = class_exists(Assertions::class); return $this->methodReflectionFactory->create( $classReflection, @@ -72,7 +78,11 @@ final class MacroExtension implements MethodsClassReflectionExtension $builtinMacro->isDeprecated()->yes(), $builtinMacro->isInternal(), $builtinMacro->isFinal(), - $builtinMacro->getDocComment() + $supportAssertions ? null : $builtinMacro->getDocComment(), + $supportAssertions ? Assertions::createEmpty() : null, + null, + $builtinMacro->getDocComment(), + [] ); } } diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php index d169939d..eb8957d4 100644 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php +++ b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php @@ -12,35 +12,55 @@ namespace Carbon\PHPStan; use Carbon\CarbonInterface; +use PHPStan\Reflection\ReflectionProvider; use ReflectionClass; use ReflectionException; final class MacroScanner { + /** + * @var \PHPStan\Reflection\ReflectionProvider + */ + private $reflectionProvider; + + /** + * MacroScanner constructor. + * + * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider + */ + public function __construct(ReflectionProvider $reflectionProvider) + { + $this->reflectionProvider = $reflectionProvider; + } + /** * Return true if the given pair class-method is a Carbon macro. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName + * @param class-string $className + * @param string $methodName * * @return bool */ public function hasMethod(string $className, string $methodName): bool { - return is_a($className, CarbonInterface::class, true) && - \is_callable([$className, 'hasMacro']) && + $classReflection = $this->reflectionProvider->getClass($className); + + if ( + $classReflection->getName() !== CarbonInterface::class && + !$classReflection->isSubclassOf(CarbonInterface::class) + ) { + return false; + } + + return \is_callable([$className, 'hasMacro']) && $className::hasMacro($methodName); } /** * Return the Macro for a given pair class-method. * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName + * @param class-string $className + * @param string $methodName * * @throws ReflectionException * diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php b/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php index a23e6ed0..f6261d88 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php @@ -75,6 +75,9 @@ trait Comparison */ public function equalTo($date): bool { + $this->discourageNull($date); + $this->discourageBoolean($date); + return $this == $this->resolveCarbon($date); } @@ -155,6 +158,9 @@ trait Comparison */ public function greaterThan($date): bool { + $this->discourageNull($date); + $this->discourageBoolean($date); + return $this > $this->resolveCarbon($date); } @@ -216,7 +222,10 @@ trait Comparison */ public function greaterThanOrEqualTo($date): bool { - return $this >= $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this >= $this->resolveCarbon($date); } /** @@ -256,6 +265,9 @@ trait Comparison */ public function lessThan($date): bool { + $this->discourageNull($date); + $this->discourageBoolean($date); + return $this < $this->resolveCarbon($date); } @@ -317,7 +329,10 @@ trait Comparison */ public function lessThanOrEqualTo($date): bool { - return $this <= $date; + $this->discourageNull($date); + $this->discourageBoolean($date); + + return $this <= $this->resolveCarbon($date); } /** @@ -351,10 +366,10 @@ trait Comparison } if ($equal) { - return $this->greaterThanOrEqualTo($date1) && $this->lessThanOrEqualTo($date2); + return $this >= $date1 && $this <= $date2; } - return $this->greaterThan($date1) && $this->lessThan($date2); + return $this > $date1 && $this < $date2; } /** @@ -448,7 +463,7 @@ trait Comparison */ public function isWeekend() { - return \in_array($this->dayOfWeek, static::$weekendDays); + return \in_array($this->dayOfWeek, static::$weekendDays, true); } /** @@ -548,12 +563,17 @@ trait Comparison } /** - * Determines if the instance is a long year + * Determines if the instance is a long year (using calendar year). + * + * ⚠️ This method completely ignores month and day to use the numeric year number, + * it's not correct if the exact date matters. For instance as `2019-12-30` is already + * in the first week of the 2020 year, if you want to know from this date if ISO week + * year 2020 is a long year, use `isLongIsoYear` instead. * * @example * ``` - * Carbon::parse('2015-01-01')->isLongYear(); // true - * Carbon::parse('2016-01-01')->isLongYear(); // false + * Carbon::create(2015)->isLongYear(); // true + * Carbon::create(2016)->isLongYear(); // false * ``` * * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates @@ -565,6 +585,27 @@ trait Comparison return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; } + /** + * Determines if the instance is a long year (using ISO 8601 year). + * + * @example + * ``` + * Carbon::parse('2015-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-01')->isLongIsoYear(); // true + * Carbon::parse('2016-01-03')->isLongIsoYear(); // false + * Carbon::parse('2019-12-29')->isLongIsoYear(); // false + * Carbon::parse('2019-12-30')->isLongIsoYear(); // true + * ``` + * + * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates + * + * @return bool + */ + public function isLongIsoYear() + { + return static::create($this->isoWeekYear, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; + } + /** * Compares the formatted values of the two dates. * @@ -621,19 +662,19 @@ trait Comparison 'microsecond' => 'Y-m-d H:i:s.u', ]; - if (!isset($units[$unit])) { - if (isset($this->$unit)) { - return $this->resolveCarbon($date)->$unit === $this->$unit; - } - - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new BadComparisonUnitException($unit); - } - - return false; + if (isset($units[$unit])) { + return $this->isSameAs($units[$unit], $date); } - return $this->isSameAs($units[$unit], $date); + if (isset($this->$unit)) { + return $this->resolveCarbon($date)->$unit === $this->$unit; + } + + if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { + throw new BadComparisonUnitException($unit); + } + + return false; } /** @@ -981,12 +1022,12 @@ trait Comparison return $current->startOfMinute()->eq($other); } - if (preg_match('/\d(h|am|pm)$/', $tester)) { + if (preg_match('/\d(?:h|am|pm)$/', $tester)) { return $current->startOfHour()->eq($other); } if (preg_match( - '/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i', + '/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i', $tester )) { return $current->startOfMonth()->eq($other->startOfMonth()); @@ -1067,4 +1108,18 @@ trait Comparison { return $this->endOfTime ?? false; } + + private function discourageNull($value): void + { + if ($value === null) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); + } + } + + private function discourageBoolean($value): void + { + if (\is_bool($value)) { + @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); + } + } } diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php index 8fe008a5..fff8a600 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php @@ -16,6 +16,7 @@ use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use Carbon\CarbonInterval; use Carbon\CarbonPeriod; +use Carbon\CarbonPeriodImmutable; use Carbon\Exceptions\UnitException; use Closure; use DateTime; @@ -34,39 +35,7 @@ use ReturnTypeWillChange; */ trait Converter { - /** - * Format to use for __toString method when type juggling occurs. - * - * @var string|Closure|null - */ - protected static $toStringFormat; - - /** - * Reset the format used to the default when type juggling a Carbon instance to a string - * - * @return void - */ - public static function resetToStringFormat() - { - static::setToStringFormat(null); - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string - * format. - * - * Set the default format used when type juggling a Carbon instance to a string - * - * @param string|Closure|null $format - * - * @return void - */ - public static function setToStringFormat($format) - { - static::$toStringFormat = $format; - } + use ToStringFormat; /** * Returns the formatted date string on success or FALSE on failure. @@ -110,7 +79,7 @@ trait Converter * * @example * ``` - * echo Carbon::now(); // Carbon instances can be casted to string + * echo Carbon::now(); // Carbon instances can be cast to string * ``` * * @return string @@ -158,6 +127,21 @@ trait Converter return $this->rawFormat('M j, Y'); } + /** + * Format the instance with the day, and a readable date + * + * @example + * ``` + * echo Carbon::now()->toFormattedDayDateString(); + * ``` + * + * @return string + */ + public function toFormattedDayDateString(): string + { + return $this->rawFormat('D, M j, Y'); + } + /** * Format the instance as time * @@ -622,16 +606,18 @@ trait Converter $interval = CarbonInterval::make("$interval ".static::pluralUnit($unit)); } - $period = (new CarbonPeriod())->setDateClass(static::class)->setStartDate($this); + $period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable()) + ->setDateClass(static::class) + ->setStartDate($this); if ($interval) { - $period->setDateInterval($interval); + $period = $period->setDateInterval($interval); } - if (\is_int($end) || \is_string($end) && ctype_digit($end)) { - $period->setRecurrences($end); + if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { + $period = $period->setRecurrences($end); } elseif ($end) { - $period->setEndDate($end); + $period = $period->setEndDate($end); } return $period; diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php index f2adee5f..0d611ea2 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php @@ -19,6 +19,8 @@ use Carbon\Exceptions\InvalidFormatException; use Carbon\Exceptions\OutOfRangeException; use Carbon\Translator; use Closure; +use DateMalformedStringException; +use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; use Exception; @@ -79,8 +81,8 @@ trait Creator // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 if (!str_contains((string) .1, '.')) { - $locale = setlocale(LC_NUMERIC, '0'); - setlocale(LC_NUMERIC, 'C'); + $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore + setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore } try { @@ -92,7 +94,7 @@ trait Creator $this->constructedObjectId = spl_object_hash($this); if (isset($locale)) { - setlocale(LC_NUMERIC, $locale); + setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore } self::setLastErrors(parent::getLastErrors()); @@ -112,7 +114,7 @@ trait Creator $safeTz = static::safeCreateDateTimeZone($tz); if ($safeTz) { - return $date->setTimezone($safeTz); + return ($date instanceof DateTimeImmutable ? $date : clone $date)->setTimezone($safeTz); } return $date; @@ -148,7 +150,7 @@ trait Creator $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); - if ($date instanceof CarbonInterface || $date instanceof Options) { + if ($date instanceof CarbonInterface) { $settings = $date->getSettings(); if (!$date->hasLocalTranslator()) { @@ -184,7 +186,13 @@ trait Creator try { return new static($time, $tz); } catch (Exception $exception) { - $date = @static::now($tz)->change($time); + // @codeCoverageIgnoreStart + try { + $date = @static::now($tz)->change($time); + } catch (DateMalformedStringException $ignoredException) { + $date = null; + } + // @codeCoverageIgnoreEnd if (!$date) { throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); @@ -354,13 +362,13 @@ trait Creator * If $hour is not null then the default values for $minute and $second * will be 0. * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz + * @param DateTimeInterface|int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz * * @throws InvalidFormatException * @@ -368,7 +376,7 @@ trait Creator */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) { - if (\is_string($year) && !is_numeric($year) || $year instanceof DateTimeInterface) { + if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); } @@ -634,6 +642,10 @@ trait Creator $time = preg_replace('/^(.*)(am|pm|AM|PM)(.*)$/U', '$1$3 $2', $time); } + if ($tz === false) { + $tz = null; + } + // First attempt to create an instance, so that error messages are based on the unmodified format. $date = self::createFromFormatAndTimezone($format, $time, $tz); $lastErrors = parent::getLastErrors(); @@ -651,12 +663,14 @@ trait Creator $tz = clone $mock->getTimezone(); } - // Set microseconds to zero to match behavior of DateTime::createFromFormat() - // See https://bugs.php.net/bug.php?id=74332 - $mock = $mock->copy()->microsecond(0); + $mock = $mock->copy(); // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. if (!preg_match("/{$nonEscaped}[!|]/", $format)) { + if (preg_match('/[HhGgisvuB]/', $format)) { + $mock = $mock->setTime(0, 0); + } + $format = static::MOCK_DATETIME_FORMAT.' '.$format; $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; } @@ -862,6 +876,19 @@ trait Creator */ public static function createFromLocaleFormat($format, $locale, $time, $tz = null) { + $format = preg_replace_callback( + '/(?:\\\\[a-zA-Z]|[bfkqCEJKQRV]){2,}/', + static function (array $match) use ($locale): string { + $word = str_replace('\\', '', $match[0]); + $translatedWord = static::translateTimeString($word, $locale, 'en'); + + return $word === $translatedWord + ? $match[0] + : preg_replace('/[a-zA-Z]/', '\\\\$0', $translatedWord); + }, + $format + ); + return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); } @@ -907,9 +934,9 @@ trait Creator if (\is_string($var)) { $var = trim($var); - if (!preg_match('/^P[0-9T]/', $var) && - !preg_match('/^R[0-9]/', $var) && - preg_match('/[a-z0-9]/i', $var) + if (!preg_match('/^P[\dT]/', $var) && + !preg_match('/^R\d/', $var) && + preg_match('/[a-z\d]/i', $var) ) { $date = static::parse($var); } @@ -921,13 +948,20 @@ trait Creator /** * Set last errors. * - * @param array $lastErrors + * @param array|bool $lastErrors * * @return void */ - private static function setLastErrors(array $lastErrors) + private static function setLastErrors($lastErrors) { - static::$lastErrors = $lastErrors; + if (\is_array($lastErrors) || $lastErrors === false) { + static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [ + 'warning_count' => 0, + 'warnings' => [], + 'error_count' => 0, + 'errors' => [], + ]; + } } /** diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/vendor/nesbot/carbon/src/Carbon/Traits/Date.php index 8c8af6fb..8ae5c178 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Date.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Date.php @@ -532,6 +532,7 @@ trait Date use Creator; use Difference; use Macro; + use MagicParameter; use Modifiers; use Mutability; use ObjectInitialisation; @@ -641,9 +642,11 @@ trait Date /** * List of minimum and maximums for each unit. * + * @param int $daysInMonth + * * @return array */ - protected static function getRangesByUnit() + protected static function getRangesByUnit(int $daysInMonth = 31): array { return [ // @call roundUnit @@ -651,7 +654,7 @@ trait Date // @call roundUnit 'month' => [1, static::MONTHS_PER_YEAR], // @call roundUnit - 'day' => [1, 31], + 'day' => [1, $daysInMonth], // @call roundUnit 'hour' => [0, static::HOURS_PER_DAY - 1], // @call roundUnit @@ -940,7 +943,7 @@ trait Date case $name === 'millisecond': // @property int case $name === 'milli': - return (int) floor($this->rawFormat('u') / 1000); + return (int) floor(((int) $this->rawFormat('u')) / 1000); // @property int 1 through 53 case $name === 'week': @@ -1250,7 +1253,7 @@ trait Date protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) { $key = $baseKey.$keySuffix; - $standaloneKey = "${key}_standalone"; + $standaloneKey = "{$key}_standalone"; $baseTranslation = $this->getTranslationMessage($key); if ($baseTranslation instanceof Closure) { @@ -1259,7 +1262,7 @@ trait Date if ( $this->getTranslationMessage("$standaloneKey.$subKey") && - (!$context || ($regExp = $this->getTranslationMessage("${baseKey}_regexp")) && !preg_match($regExp, $context)) + (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) ) { $key = $standaloneKey; } @@ -1354,9 +1357,14 @@ trait Date */ public function weekday($value = null) { - $dayOfWeek = ($this->dayOfWeek + 7 - (int) ($this->getTranslationMessage('first_day_of_week') ?? 0)) % 7; + if ($value === null) { + return $this->dayOfWeek; + } - return $value === null ? $dayOfWeek : $this->addDays($value - $dayOfWeek); + $firstDay = (int) ($this->getTranslationMessage('first_day_of_week') ?? 0); + $dayOfWeek = ($this->dayOfWeek + 7 - $firstDay) % 7; + + return $this->addDays((($value + 7 - $firstDay) % 7) - $dayOfWeek); } /** @@ -1373,6 +1381,39 @@ trait Date return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso); } + /** + * Return the number of days since the start of the week (using the current locale or the first parameter + * if explicitly given). + * + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return int + */ + public function getDaysFromStartOfWeek(int $weekStartsAt = null): int + { + $firstDay = (int) ($weekStartsAt ?? $this->getTranslationMessage('first_day_of_week') ?? 0); + + return ($this->dayOfWeek + 7 - $firstDay) % 7; + } + + /** + * Set the day (keeping the current time) to the start of the week + the number of days passed as the first + * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. + * + * @param int $numberOfDays number of days to add after the start of the current week + * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, + * if not provided, start of week is inferred from the locale + * (Sunday for en_US, Monday for de_DE, etc.) + * + * @return static + */ + public function setDaysFromStartOfWeek(int $numberOfDays, int $weekStartsAt = null) + { + return $this->addDays($numberOfDays - $this->getDaysFromStartOfWeek($weekStartsAt)); + } + /** * Set any unit to a new value without overflowing current other unit given. * @@ -1848,9 +1889,18 @@ trait Date $format = preg_replace('#(?toDateTimeString())); + $time = strtotime($this->toDateTimeString()); + $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) + ? strftime($format, $time) + : @strftime($format, $time); - return static::$utf8 ? utf8_encode($formatted) : $formatted; + return static::$utf8 + ? ( + \function_exists('mb_convert_encoding') + ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) + : utf8_encode($formatted) + ) + : $formatted; } /** @@ -1869,6 +1919,10 @@ trait Date 'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'), 'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), 'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), + 'l' => $this->getTranslationMessage('formats.l', $locale), + 'll' => $this->getTranslationMessage('formats.ll', $locale), + 'lll' => $this->getTranslationMessage('formats.lll', $locale), + 'llll' => $this->getTranslationMessage('formats.llll', $locale), ]; } @@ -2152,7 +2206,7 @@ trait Date $input = mb_substr($format, $i); - if (preg_match('/^(LTS|LT|[Ll]{1,4})/', $input, $match)) { + if (preg_match('/^(LTS|LT|l{1,4}|L{1,4})/', $input, $match)) { if ($formats === null) { $formats = $this->getIsoFormats(); } @@ -2256,6 +2310,7 @@ trait Date 'c' => true, 'r' => true, 'U' => true, + 'T' => true, ]; } @@ -2359,7 +2414,7 @@ trait Date $symbol = $second < 0 ? '-' : '+'; $minute = abs($second) / static::SECONDS_PER_MINUTE; $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); - $minute = str_pad((string) ($minute % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); + $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); return "$symbol$hour$separator$minute"; } @@ -2479,7 +2534,7 @@ trait Date return 'millennia'; } - return "${unit}s"; + return "{$unit}s"; } protected function executeCallable($macro, ...$parameters) @@ -2566,7 +2621,7 @@ trait Date if (str_starts_with($unit, 'is')) { $word = substr($unit, 2); - if (\in_array($word, static::$days)) { + if (\in_array($word, static::$days, true)) { return $this->isDayOfWeek($word); } @@ -2594,7 +2649,7 @@ trait Date $unit = strtolower(substr($unit, 3)); } - if (\in_array($unit, static::$units)) { + if (\in_array($unit, static::$units, true)) { return $this->setUnit($unit, ...$parameters); } @@ -2604,7 +2659,7 @@ trait Date if (str_starts_with($unit, 'Real')) { $unit = static::singularUnit(substr($unit, 4)); - return $this->{"${action}RealUnit"}($unit, ...$parameters); + return $this->{"{$action}RealUnit"}($unit, ...$parameters); } if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { @@ -2616,7 +2671,7 @@ trait Date } if (static::isModifiableUnit($unit)) { - return $this->{"${action}Unit"}($unit, $parameters[0] ?? 1, $overflow); + return $this->{"{$action}Unit"}($unit, $this->getMagicParameter($parameters, 0, 'value', 1), $overflow); } $sixFirstLetters = substr($unit, 0, 6); @@ -2655,7 +2710,11 @@ trait Date try { $unit = static::singularUnit(substr($method, 0, -5)); - return $this->range($parameters[0] ?? $this, $parameters[1] ?? 1, $unit); + return $this->range( + $this->getMagicParameter($parameters, 0, 'endDate', $this), + $this->getMagicParameter($parameters, 1, 'factor', 1), + $unit + ); } catch (InvalidArgumentException $exception) { // Try macros } diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php index cce1d2c3..ab5b65d2 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php @@ -83,9 +83,9 @@ trait Difference * * @return CarbonInterval */ - protected static function fixDiffInterval(DateInterval $diff, $absolute) + protected static function fixDiffInterval(DateInterval $diff, $absolute, array $skip = []) { - $diff = CarbonInterval::instance($diff); + $diff = CarbonInterval::instance($diff, $skip); // Work-around for https://bugs.php.net/bug.php?id=77145 // @codeCoverageIgnoreStart @@ -148,9 +148,9 @@ trait Difference * * @return CarbonInterval */ - public function diffAsCarbonInterval($date = null, $absolute = true) + public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []) { - return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute); + return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute, $skip); } /** @@ -189,9 +189,21 @@ trait Difference */ public function diffInMonths($date = null, $absolute = true) { - $date = $this->resolveCarbon($date); + $date = $this->resolveCarbon($date)->avoidMutation()->tz($this->tz); - return $this->diffInYears($date, $absolute) * static::MONTHS_PER_YEAR + (int) $this->diff($date, $absolute)->format('%r%m'); + [$yearStart, $monthStart, $dayStart] = explode('-', $this->format('Y-m-dHisu')); + [$yearEnd, $monthEnd, $dayEnd] = explode('-', $date->format('Y-m-dHisu')); + + $diff = (((int) $yearEnd) - ((int) $yearStart)) * static::MONTHS_PER_YEAR + + ((int) $monthEnd) - ((int) $monthStart); + + if ($diff > 0) { + $diff -= ($dayStart > $dayEnd ? 1 : 0); + } elseif ($diff < 0) { + $diff += ($dayStart < $dayEnd ? 1 : 0); + } + + return $absolute ? abs($diff) : $diff; } /** @@ -286,9 +298,9 @@ trait Difference */ public function diffInWeekdays($date = null, $absolute = true) { - return $this->diffInDaysFiltered(function (CarbonInterface $date) { + return $this->diffInDaysFiltered(static function (CarbonInterface $date) { return $date->isWeekday(); - }, $date, $absolute); + }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); } /** @@ -301,9 +313,9 @@ trait Difference */ public function diffInWeekendDays($date = null, $absolute = true) { - return $this->diffInDaysFiltered(function (CarbonInterface $date) { + return $this->diffInDaysFiltered(static function (CarbonInterface $date) { return $date->isWeekend(); - }, $date, $absolute); + }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); } /** @@ -472,7 +484,7 @@ trait Difference */ public function floatDiffInSeconds($date = null, $absolute = true) { - return $this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; + return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); } /** @@ -830,8 +842,9 @@ trait Difference $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; $parts = min(7, max(1, (int) $parts)); + $skip = \is_array($syntax) ? ($syntax['skip'] ?? []) : []; - return $this->diffAsCarbonInterval($other, false) + return $this->diffAsCarbonInterval($other, false, (array) $skip) ->setLocalTranslator($this->getLocalTranslator()) ->forHumans($syntax, (bool) $short, $parts, $options ?? $this->localHumanDiffOptions ?? static::getHumanDiffOptions()); } @@ -1161,7 +1174,7 @@ trait Difference version_compare(PHP_VERSION, '8.1.0-dev', '<') && abs($interval->d - $daysDiff) === 1 ) { - $daysDiff = abs($interval->d); + $daysDiff = abs($interval->d); // @codeCoverageIgnore } return $daysDiff * $sign; diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php b/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php index 4cd66b67..f069c280 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php @@ -40,7 +40,7 @@ trait IntervalRounding $unit = 'second'; if ($precision instanceof DateInterval) { - $precision = (string) CarbonInterval::instance($precision); + $precision = (string) CarbonInterval::instance($precision, [], true); } if (\is_string($precision) && preg_match('/^\s*(?\d+)?\s*(?\w+)(?\W.*)?$/', $precision, $match)) { diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php b/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php index ddd2b4e9..46aff113 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php @@ -23,12 +23,16 @@ use Symfony\Component\Translation\TranslatorInterface; use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; -if (!interface_exists('Symfony\\Component\\Translation\\TranslatorInterface')) { +// @codeCoverageIgnoreStart +if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && + !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') +) { class_alias( 'Symfony\\Contracts\\Translation\\TranslatorInterface', 'Symfony\\Component\\Translation\\TranslatorInterface' ); } +// @codeCoverageIgnoreEnd /** * Trait Localization. @@ -355,6 +359,13 @@ trait Localization $weekdays = $messages['weekdays'] ?? []; $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; + if (isset($messages['ordinal_words'])) { + $timeString = self::replaceOrdinalWords( + $timeString, + $key === 'from' ? array_flip($messages['ordinal_words']) : $messages['ordinal_words'] + ); + } + if ($key === 'from') { foreach (['months', 'weekdays'] as $variable) { $list = $messages[$variable.'_standalone'] ?? null; @@ -454,7 +465,7 @@ trait Localization } } - $this->setLocalTranslator($translator); + $this->localTranslator = $translator; } return $this; @@ -555,17 +566,13 @@ trait Localization public static function localeHasShortUnits($locale) { return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return $newLocale && - ( - ($y = static::translateWith($translator, 'y')) !== 'y' && - $y !== static::translateWith($translator, 'year') - ) || ( - ($y = static::translateWith($translator, 'd')) !== 'd' && + return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( + ($y = static::translateWith($translator, 'd')) !== 'd' && $y !== static::translateWith($translator, 'day') - ) || ( - ($y = static::translateWith($translator, 'h')) !== 'h' && + ) || ( + ($y = static::translateWith($translator, 'h')) !== 'h' && $y !== static::translateWith($translator, 'hour') - ); + ); }); } @@ -734,7 +741,7 @@ trait Localization } if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { - throw new NotLocaleAwareException($translator); + throw new NotLocaleAwareException($translator); // @codeCoverageIgnore } return $translator; @@ -823,4 +830,11 @@ trait Localization return $list; } + + private static function replaceOrdinalWords(string $timeString, array $ordinalWords): string + { + return preg_replace_callback('/(?cast($className) : new $className(); try { @@ -117,7 +121,48 @@ trait Mixin // in case of errors not converted into exceptions $closure = $closure ?: $closureBase; - return $closure(...\func_get_args()); + $result = $closure(...$parameters); + + if (!($result instanceof $className)) { + return $result; + } + + if ($downContext instanceof CarbonInterface && $result instanceof CarbonInterface) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + return $downContext + ->setTimezone($result->getTimezone()) + ->modify($result->format('Y-m-d H:i:s.u')) + ->settings($result->getSettings()); + } + + if ($downContext instanceof CarbonInterval && $result instanceof CarbonInterval) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + $downContext->copyProperties($result); + self::copyStep($downContext, $result); + self::copyNegativeUnits($downContext, $result); + + return $downContext->settings($result->getSettings()); + } + + if ($downContext instanceof CarbonPeriod && $result instanceof CarbonPeriod) { + if ($context !== $result) { + $downContext = $downContext->copy(); + } + + return $downContext + ->setDates($result->getStartDate(), $result->getEndDate()) + ->setRecurrences($result->getRecurrences()) + ->setOptions($result->getOptions()) + ->settings($result->getSettings()); + } + + return $result; }); } } @@ -151,22 +196,12 @@ trait Mixin protected static function bindMacroContext($context, callable $callable) { static::$macroContextStack[] = $context; - $exception = null; - $result = null; try { - $result = $callable(); - } catch (Throwable $throwable) { - $exception = $throwable; + return $callable(); + } finally { + array_pop(static::$macroContextStack); } - - array_pop(static::$macroContextStack); - - if ($exception) { - throw $exception; - } - - return $result; } /** diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php b/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php index 164dbbd1..39343d8f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php @@ -75,7 +75,7 @@ trait Modifiers * * @param string|int|null $modifier * - * @return static + * @return static|false */ public function next($modifier = null) { @@ -157,7 +157,7 @@ trait Modifiers * * @param string|int|null $modifier * - * @return static + * @return static|false */ public function previous($modifier = null) { @@ -451,7 +451,7 @@ trait Modifiers * * @param string $modifier * - * @return static + * @return static|false */ public function change($modifier) { diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Options.php b/vendor/nesbot/carbon/src/Carbon/Traits/Options.php index 0ddee8dd..48f97397 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Options.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Options.php @@ -22,7 +22,7 @@ use Throwable; * * Depends on the following methods: * - * @method \Carbon\Carbon|\Carbon\CarbonImmutable shiftTimezone($timezone) Set the timezone + * @method static shiftTimezone($timezone) Set the timezone */ trait Options { @@ -422,7 +422,7 @@ trait Options foreach ($map as $property => $key) { $value = $this->$property ?? null; - if ($value !== null) { + if ($value !== null && ($key !== 'locale' || $value !== 'en' || $this->localTranslator)) { $settings[$key] = $value; } } @@ -437,11 +437,11 @@ trait Options */ public function __debugInfo() { - $infos = array_filter(get_object_vars($this), function ($var) { + $infos = array_filter(get_object_vars($this), static function ($var) { return $var; }); - foreach (['dumpProperties', 'constructedObjectId'] as $property) { + foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) { if (isset($infos[$property])) { unset($infos[$property]); } diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php index 33062397..85ff5a71 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php @@ -52,12 +52,11 @@ trait Rounding 'millisecond' => [1000, 'microsecond'], ]; $normalizedUnit = static::singularUnit($unit); - $ranges = array_merge(static::getRangesByUnit(), [ + $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ // @call roundUnit 'microsecond' => [0, 999999], ]); $factor = 1; - $initialMonth = $this->month; if ($normalizedUnit === 'week') { $normalizedUnit = 'day'; @@ -77,12 +76,15 @@ trait Rounding $found = false; $fraction = 0; $arguments = null; + $initialValue = null; $factor = $this->year < 0 ? -1 : 1; $changes = []; + $minimumInc = null; foreach ($ranges as $unit => [$minimum, $maximum]) { if ($normalizedUnit === $unit) { $arguments = [$this->$unit, $minimum]; + $initialValue = $this->$unit; $fraction = $precision - floor($precision); $found = true; @@ -93,7 +95,23 @@ trait Rounding $delta = $maximum + 1 - $minimum; $factor /= $delta; $fraction *= $delta; - $arguments[0] += $this->$unit * $factor; + $inc = ($this->$unit - $minimum) * $factor; + + if ($inc !== 0.0) { + $minimumInc = $minimumInc ?? ($arguments[0] / pow(2, 52)); + + // If value is still the same when adding a non-zero increment/decrement, + // it means precision got lost in the addition + if (abs($inc) < $minimumInc) { + $inc = $minimumInc * ($inc < 0 ? -1 : 1); + } + + // If greater than $precision, assume precision loss caused an overflow + if ($function !== 'floor' || abs($arguments[0] + $inc - $initialValue) >= $precision) { + $arguments[0] += $inc; + } + } + $changes[$unit] = round( $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) ); @@ -111,16 +129,13 @@ trait Rounding $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); /** @var CarbonInterface $result */ - $result = $this->$normalizedUnit($normalizedValue); + $result = $this; foreach ($changes as $unit => $value) { $result = $result->$unit($value); } - return $normalizedUnit === 'month' && $precision <= 1 && abs($result->month - $initialMonth) === 2 - // Re-run the change in case an overflow occurred - ? $result->$normalizedUnit($normalizedValue) - : $result; + return $result->$normalizedUnit($normalizedValue); } /** diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php index eebc69bd..c1d5c5e1 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php @@ -120,6 +120,8 @@ trait Serialization /** * Returns the list of properties to dump on serialize() called on. * + * Only used by PHP < 7.4. + * * @return array */ public function __sleep() @@ -134,22 +136,70 @@ trait Serialization return $properties; } + /** + * Returns the values to dump on serialize() called on. + * + * Only used by PHP >= 7.4. + * + * @return array + */ + public function __serialize(): array + { + // @codeCoverageIgnoreStart + if (isset($this->timezone_type, $this->timezone, $this->date)) { + return [ + 'date' => $this->date ?? null, + 'timezone_type' => $this->timezone_type, + 'timezone' => $this->timezone ?? null, + ]; + } + // @codeCoverageIgnoreEnd + + $timezone = $this->getTimezone(); + $export = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone_type' => $timezone->getType(), + 'timezone' => $timezone->getName(), + ]; + + // @codeCoverageIgnoreStart + if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { + $export['dumpDateProperties'] = [ + 'date' => $this->format('Y-m-d H:i:s.u'), + 'timezone' => serialize($this->timezone ?? null), + ]; + } + // @codeCoverageIgnoreEnd + + if ($this->localTranslator ?? null) { + $export['dumpLocale'] = $this->locale ?? null; + } + + return $export; + } + /** * Set locale if specified on unserialize() called. * + * Only used by PHP < 7.4. + * * @return void */ #[ReturnTypeWillChange] public function __wakeup() { - if (get_parent_class() && method_exists(parent::class, '__wakeup')) { + if (parent::class && method_exists(parent::class, '__wakeup')) { // @codeCoverageIgnoreStart try { parent::__wakeup(); } catch (Throwable $exception) { - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. - ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; - parent::__construct($date, unserialize($timezone)); + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; + parent::__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } } // @codeCoverageIgnoreEnd } @@ -164,6 +214,38 @@ trait Serialization $this->cleanupDumpProperties(); } + /** + * Set locale if specified on unserialize() called. + * + * Only used by PHP >= 7.4. + * + * @return void + */ + public function __unserialize(array $data): void + { + // @codeCoverageIgnoreStart + try { + $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); + } catch (Throwable $exception) { + if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { + throw $exception; + } + + try { + // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. + ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; + $this->__construct($date, unserialize($timezone)); + } catch (Throwable $ignoredException) { + throw $exception; + } + } + // @codeCoverageIgnoreEnd + + if (isset($data['dumpLocale'])) { + $this->locale($data['dumpLocale']); + } + } + /** * Prepare the object for JSON serialization. * @@ -207,11 +289,15 @@ trait Serialization */ public function cleanupDumpProperties() { - foreach ($this->dumpProperties as $property) { - if (isset($this->$property)) { - unset($this->$property); + // @codeCoverageIgnoreStart + if (PHP_VERSION < 8.2) { + foreach ($this->dumpProperties as $property) { + if (isset($this->$property)) { + unset($this->$property); + } } } + // @codeCoverageIgnoreEnd return $this; } diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/vendor/nesbot/carbon/src/Carbon/Traits/Test.php index c86faa74..f23c72e8 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Test.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Test.php @@ -28,7 +28,7 @@ trait Test /** * A test Carbon instance to be returned when now instances are created. * - * @var static + * @var Closure|static|null */ protected static $testNow; @@ -59,15 +59,13 @@ trait Test * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNow($testNow = null) { - if ($testNow === false) { - $testNow = null; - } - - static::$testNow = \is_string($testNow) ? static::parse($testNow) : $testNow; + static::$testNow = $testNow instanceof self || $testNow instanceof Closure + ? $testNow + : static::make($testNow); } /** @@ -87,7 +85,7 @@ trait Test * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance */ public static function setTestNowAndTimezone($testNow = null, $tz = null) { @@ -121,16 +119,22 @@ trait Test * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure|null $callback + * @template T * - * @return mixed + * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure(): T $callback + * + * @return T */ - public static function withTestNow($testNow = null, $callback = null) + public static function withTestNow($testNow, $callback) { static::setTestNow($testNow); - $result = $callback(); - static::setTestNow(); + + try { + $result = $callback(); + } finally { + static::setTestNow(); + } return $result; } diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php b/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php index 2cb5c48d..88a465c9 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php @@ -63,7 +63,7 @@ trait Timestamp public static function createFromTimestampMsUTC($timestamp) { [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); - $sign = $milliseconds < 0 || $milliseconds === 0.0 && $microseconds < 0 ? -1 : 1; + $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; $milliseconds = abs($milliseconds); $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); @@ -125,7 +125,7 @@ trait Timestamp */ public function getPreciseTimestamp($precision = 6) { - return round($this->rawFormat('Uu') / pow(10, 6 - $precision)); + return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); } /** @@ -182,7 +182,7 @@ trait Timestamp $integer = 0; $decimal = 0; - foreach (preg_split('`[^0-9.]+`', $numbers) as $chunk) { + foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { [$integerPart, $decimalPart] = explode('.', "$chunk."); $integer += (int) $integerPart; diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/vendor/nesbot/carbon/src/Carbon/Traits/Units.php index 2902a8b1..5be14ec7 100644 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Units.php +++ b/vendor/nesbot/carbon/src/Carbon/Traits/Units.php @@ -17,6 +17,7 @@ use Carbon\CarbonInterval; use Carbon\Exceptions\UnitException; use Closure; use DateInterval; +use DateMalformedStringException; use ReturnTypeWillChange; /** @@ -60,8 +61,6 @@ trait Units case 'millisecond': return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); - break; - // @call addRealUnit case 'second': break; @@ -167,7 +166,7 @@ trait Units 'weekday', ]; - return \in_array($unit, $modifiableUnits) || \in_array($unit, static::$units); + return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); } /** @@ -199,7 +198,7 @@ trait Units public function add($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit); + $unit = CarbonInterval::make($unit, [], true); } if ($unit instanceof CarbonConverterInterface) { @@ -232,6 +231,8 @@ trait Units */ public function addUnit($unit, $value = 1, $overflow = null) { + $originalArgs = \func_get_args(); + $date = $this; if (!is_numeric($value) || !(float) $value) { @@ -264,7 +265,7 @@ trait Units /** @var static $date */ $date = $date->addDays($sign); - while (\in_array($date->dayOfWeek, $weekendDays)) { + while (\in_array($date->dayOfWeek, $weekendDays, true)) { $date = $date->addDays($sign); } } @@ -274,14 +275,14 @@ trait Units } $timeString = $date->toTimeString(); - } elseif ($canOverflow = \in_array($unit, [ + } elseif ($canOverflow = (\in_array($unit, [ 'month', 'year', ]) && ($overflow === false || ( $overflow === null && ($ucUnit = ucfirst($unit).'s') && !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) - ))) { + )))) { $day = $date->day; } @@ -304,16 +305,21 @@ trait Units $unit = 'second'; $value = $second; } - $date = $date->modify("$value $unit"); - if (isset($timeString)) { - $date = $date->setTimeFromTimeString($timeString); - } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { - $date = $date->modify('last day of previous month'); + try { + $date = $date->modify("$value $unit"); + + if (isset($timeString)) { + $date = $date->setTimeFromTimeString($timeString); + } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { + $date = $date->modify('last day of previous month'); + } + } catch (DateMalformedStringException $ignoredException) { // @codeCoverageIgnore + $date = null; // @codeCoverageIgnore } if (!$date) { - throw new UnitException('Unable to add unit '.var_export(\func_get_args(), true)); + throw new UnitException('Unable to add unit '.var_export($originalArgs, true)); } return $date; @@ -362,7 +368,7 @@ trait Units public function sub($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit); + $unit = CarbonInterval::make($unit, [], true); } if ($unit instanceof CarbonConverterInterface) { @@ -398,7 +404,7 @@ trait Units public function subtract($unit, $value = 1, $overflow = null) { if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit); + $unit = CarbonInterval::make($unit, [], true); } return $this->sub($unit, $value, $overflow); diff --git a/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php index ad36c670..ce6b2f90 100644 --- a/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php +++ b/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php @@ -66,7 +66,7 @@ class TranslatorImmutable extends Translator /** * @codeCoverageIgnore */ - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void { $this->disallowMutation(__METHOD__); diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md index e5b26bf5..7555838e 100644 --- a/vendor/nikic/php-parser/README.md +++ b/vendor/nikic/php-parser/README.md @@ -3,24 +3,24 @@ PHP Parser [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) -This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.0). +[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). -[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). +[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). Features -------- The main features provided by this library are: - * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST). + * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). * Invalid code can be parsed into a partial AST. * The AST contains accurate location information. * Dumping the AST in human-readable form. * Converting an AST back to PHP code. - * Experimental: Formatting can be preserved for partially changed ASTs. + * Formatting can be preserved for partially changed ASTs. * Infrastructure to traverse and modify ASTs. * Resolution of namespaced names. * Evaluation of constant expressions. @@ -51,7 +51,7 @@ function test($foo) } CODE; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForNewestSupportedVersion(); try { $ast = $parser->parse($code); } catch (Error $error) { @@ -68,12 +68,17 @@ This dumps an AST looking something like this: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) + flags: 0 type: null byRef: false variadic: false @@ -88,12 +93,11 @@ array( 0: Stmt_Expression( expr: Expr_FuncCall( name: Name( - parts: array( - 0: var_dump - ) + name: var_dump ) args: array( 0: Arg( + name: null value: Expr_Variable( name: foo ) @@ -135,12 +139,16 @@ This gives us an AST where the `Function_::$stmts` are empty: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) type: null byRef: false variadic: false @@ -203,9 +211,8 @@ Component documentation: * [AST builders](doc/component/AST_builders.markdown) * Fluent builders for AST nodes * [Lexer](doc/component/Lexer.markdown) - * Lexer options - * Token and file positions for nodes - * Custom attributes + * Emulation + * Tokens, positions and attributes * [Error handling](doc/component/Error_handling.markdown) * Column information for errors * Error recovery (parsing of syntactically incorrect code) @@ -222,4 +229,5 @@ Component documentation: * Parent and sibling references [doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc + [doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/nikic/php-parser/bin/php-parse old mode 100755 new mode 100644 index bb3e46df..fc44f234 --- a/vendor/nikic/php-parser/bin/php-parse +++ b/vendor/nikic/php-parser/bin/php-parse @@ -26,13 +26,7 @@ if (empty($files)) { showHelp("Must specify at least one file."); } -$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [ - 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]); -$parser = (new PhpParser\ParserFactory)->create( - PhpParser\ParserFactory::PREFER_PHP7, - $lexer -); +$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']); $dumper = new PhpParser\NodeDumper([ 'dumpComments' => true, 'dumpPositions' => $attributes['with-positions'], @@ -43,7 +37,10 @@ $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); foreach ($files as $file) { - if (strpos($file, ' Stdin:\n"); + } else if (strpos($file, ' Code $code\n"); } else { @@ -108,7 +105,7 @@ function showHelp($error = '') { if ($error) { fwrite(STDERR, $error . "\n\n"); } - fwrite($error ? STDERR : STDOUT, << false, 'with-positions' => false, 'with-recovery' => false, + 'version' => PhpParser\PhpVersion::getNewestSupported(), ]; array_shift($args); @@ -193,7 +192,9 @@ function parseArgs($args) { $parseOptions = false; break; default: - if ($arg[0] === '-') { + if (preg_match('/^--version=(.*)$/', $arg, $matches)) { + $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); + } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { showHelp("Invalid operation $arg."); } else { $files[] = $arg; diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json index 2fd064a2..b4b1bca7 100644 --- a/vendor/nikic/php-parser/composer.json +++ b/vendor/nikic/php-parser/composer.json @@ -13,16 +13,18 @@ } ], "require": { - "php": ">=7.0", - "ext-tokenizer": "*" + "php": ">=7.4", + "ext-tokenizer": "*", + "ext-json": "*", + "ext-ctype": "*" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "ircmaxell/php-yacc": "^0.0.7" }, "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { diff --git a/vendor/nikic/php-parser/grammar/README.md b/vendor/nikic/php-parser/grammar/README.md deleted file mode 100644 index 4bae11d8..00000000 --- a/vendor/nikic/php-parser/grammar/README.md +++ /dev/null @@ -1,30 +0,0 @@ -What do all those files mean? -============================= - - * `php5.y`: PHP 5 grammar written in a pseudo language - * `php7.y`: PHP 7 grammar written in a pseudo language - * `tokens.y`: Tokens definition shared between PHP 5 and PHP 7 grammars - * `parser.template`: A `kmyacc` parser prototype file for PHP - * `tokens.template`: A `kmyacc` prototype file for the `Tokens` class - * `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc` - -.phpy pseudo language -===================== - -The `.y` file is a normal grammar in `kmyacc` (`yacc`) style, with some transformations -applied to it: - - * Nodes are created using the syntax `Name[..., ...]`. This is transformed into - `new Name(..., ..., attributes())` - * Some function-like constructs are resolved (see `rebuildParsers.php` for a list) - -Building the parser -=================== - -Run `php grammar/rebuildParsers.php` to rebuild the parsers. Additional options: - - * The `KMYACC` environment variable can be used to specify an alternative `kmyacc` binary. - By default the `phpyacc` dev dependency will be used. To use the original `kmyacc`, you - need to compile [moriyoshi's fork](https://github.com/moriyoshi/kmyacc-forked). - * The `--debug` option enables emission of debug symbols and creates the `y.output` file. - * The `--keep-tmp-grammar` option preserves the preprocessed grammar file. diff --git a/vendor/nikic/php-parser/grammar/parser.template b/vendor/nikic/php-parser/grammar/parser.template deleted file mode 100644 index 6166607c..00000000 --- a/vendor/nikic/php-parser/grammar/parser.template +++ /dev/null @@ -1,106 +0,0 @@ -semValue -#semval($,%t) $this->semValue -#semval(%n) $stackPos-(%l-%n) -#semval(%n,%t) $stackPos-(%l-%n) - -namespace PhpParser\Parser; - -use PhpParser\Error; -use PhpParser\Node; -use PhpParser\Node\Expr; -use PhpParser\Node\Name; -use PhpParser\Node\Scalar; -use PhpParser\Node\Stmt; -#include; - -/* This is an automatically GENERATED file, which should not be manually edited. - * Instead edit one of the following: - * * the grammar files grammar/php5.y or grammar/php7.y - * * the skeleton file grammar/parser.template - * * the preprocessing script grammar/rebuildParsers.php - */ -class #(-p) extends \PhpParser\ParserAbstract -{ - protected $tokenToSymbolMapSize = #(YYMAXLEX); - protected $actionTableSize = #(YYLAST); - protected $gotoTableSize = #(YYGLAST); - - protected $invalidSymbol = #(YYBADCH); - protected $errorSymbol = #(YYINTERRTOK); - protected $defaultAction = #(YYDEFAULT); - protected $unexpectedTokenRule = #(YYUNEXPECTED); - - protected $YY2TBLSTATE = #(YY2TBLSTATE); - protected $numNonLeafStates = #(YYNLSTATES); - - protected $symbolToName = array( - #listvar terminals - ); - - protected $tokenToSymbol = array( - #listvar yytranslate - ); - - protected $action = array( - #listvar yyaction - ); - - protected $actionCheck = array( - #listvar yycheck - ); - - protected $actionBase = array( - #listvar yybase - ); - - protected $actionDefault = array( - #listvar yydefault - ); - - protected $goto = array( - #listvar yygoto - ); - - protected $gotoCheck = array( - #listvar yygcheck - ); - - protected $gotoBase = array( - #listvar yygbase - ); - - protected $gotoDefault = array( - #listvar yygdefault - ); - - protected $ruleToNonTerminal = array( - #listvar yylhs - ); - - protected $ruleToLength = array( - #listvar yylen - ); -#if -t - - protected $productions = array( - #production-strings; - ); -#endif - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ -#reduce - %n => function ($stackPos) { - %b - }, -#noact - %n => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, -#endreduce - ]; - } -} -#tailcode; diff --git a/vendor/nikic/php-parser/grammar/php5.y b/vendor/nikic/php-parser/grammar/php5.y deleted file mode 100644 index f9e7e7dd..00000000 --- a/vendor/nikic/php-parser/grammar/php5.y +++ /dev/null @@ -1,1040 +0,0 @@ -%pure_parser -%expect 6 - -%tokens - -%% - -start: - top_statement_list { $$ = $this->handleNamespaces($1); } -; - -top_statement_list_ex: - top_statement_list_ex top_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -top_statement_list: - top_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -ampersand: - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG -; - -reserved_non_modifiers: - T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND - | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE - | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH - | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO - | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT - | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN - | T_MATCH -; - -semi_reserved: - reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC -; - -identifier_ex: - T_STRING { $$ = Node\Identifier[$1]; } - | semi_reserved { $$ = Node\Identifier[$1]; } -; - -identifier: - T_STRING { $$ = Node\Identifier[$1]; } -; - -reserved_non_modifiers_identifier: - reserved_non_modifiers { $$ = Node\Identifier[$1]; } -; - -namespace_name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -legacy_namespace_name: - namespace_name { $$ = $1; } - | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } -; - -plain_variable: - T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } -; - -top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } - | T_NAMESPACE namespace_name ';' - { $$ = Stmt\Namespace_[$2, null]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($$); } - | T_NAMESPACE namespace_name '{' top_statement_list '}' - { $$ = Stmt\Namespace_[$2, $4]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_NAMESPACE '{' top_statement_list '}' - { $$ = Stmt\Namespace_[null, $3]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_USE use_declarations ';' { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } - | T_USE use_type use_declarations ';' { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration ';' { $$ = $1; } - | T_CONST constant_declaration_list ';' { $$ = Stmt\Const_[$2]; } -; - -use_type: - T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } - | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } -; - -group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' - { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' - { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } -; - -unprefixed_use_declarations: - unprefixed_use_declarations ',' unprefixed_use_declaration - { push($1, $3); } - | unprefixed_use_declaration { init($1); } -; - -use_declarations: - use_declarations ',' use_declaration { push($1, $3); } - | use_declaration { init($1); } -; - -inline_use_declarations: - inline_use_declarations ',' inline_use_declaration { push($1, $3); } - | inline_use_declaration { init($1); } -; - -unprefixed_use_declaration: - namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | namespace_name T_AS identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -use_declaration: - legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -inline_use_declaration: - unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } - | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } -; - -constant_declaration_list: - constant_declaration_list ',' constant_declaration { push($1, $3); } - | constant_declaration { init($1); } -; - -constant_declaration: - identifier '=' static_scalar { $$ = Node\Const_[$1, $3]; } -; - -class_const_list: - class_const_list ',' class_const { push($1, $3); } - | class_const { init($1); } -; - -class_const: - identifier_ex '=' static_scalar { $$ = Node\Const_[$1, $3]; } -; - -inner_statement_list_ex: - inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -inner_statement_list: - inner_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } -; - -non_empty_statement: - '{' inner_statement_list '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if (null === $$) { $$ = array(); } - } - } - | T_IF parentheses_expr statement elseif_list else_single - { $$ = Stmt\If_[$2, ['stmts' => toArray($3), 'elseifs' => $4, 'else' => $5]]; } - | T_IF parentheses_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' - { $$ = Stmt\If_[$2, ['stmts' => $4, 'elseifs' => $5, 'else' => $6]]; } - | T_WHILE parentheses_expr while_statement { $$ = Stmt\While_[$2, $3]; } - | T_DO statement T_WHILE parentheses_expr ';' { $$ = Stmt\Do_ [$4, toArray($2)]; } - | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement - { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } - | T_SWITCH parentheses_expr switch_case_list { $$ = Stmt\Switch_[$2, $3]; } - | T_BREAK ';' { $$ = Stmt\Break_[null]; } - | T_BREAK expr ';' { $$ = Stmt\Break_[$2]; } - | T_CONTINUE ';' { $$ = Stmt\Continue_[null]; } - | T_CONTINUE expr ';' { $$ = Stmt\Continue_[$2]; } - | T_RETURN ';' { $$ = Stmt\Return_[null]; } - | T_RETURN expr ';' { $$ = Stmt\Return_[$2]; } - | T_GLOBAL global_var_list ';' { $$ = Stmt\Global_[$2]; } - | T_STATIC static_var_list ';' { $$ = Stmt\Static_[$2]; } - | T_ECHO expr_list ';' { $$ = Stmt\Echo_[$2]; } - | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } - | yield_expr ';' { $$ = Stmt\Expression[$1]; } - | expr ';' { $$ = Stmt\Expression[$1]; } - | T_UNSET '(' variables_list ')' ';' { $$ = Stmt\Unset_[$3]; } - | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } - | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } - | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } - | T_TRY '{' inner_statement_list '}' catches optional_finally - { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } - | T_THROW expr ';' { $$ = Stmt\Throw_[$2]; } - | T_GOTO identifier ';' { $$ = Stmt\Goto_[$2]; } - | identifier ':' { $$ = Stmt\Label[$1]; } - | expr error { $$ = Stmt\Expression[$1]; } - | error { $$ = array(); /* means: no statement */ } -; - -statement: - non_empty_statement { $$ = $1; } - | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if ($$ === null) $$ = array(); /* means: no statement */ } -; - -catches: - /* empty */ { init(); } - | catches catch { push($1, $2); } -; - -catch: - T_CATCH '(' name plain_variable ')' '{' inner_statement_list '}' - { $$ = Stmt\Catch_[array($3), $4, $7]; } -; - -optional_finally: - /* empty */ { $$ = null; } - | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } -; - -variables_list: - variable { init($1); } - | variables_list ',' variable { push($1, $3); } -; - -optional_ref: - /* empty */ { $$ = false; } - | ampersand { $$ = true; } -; - -optional_arg_ref: - /* empty */ { $$ = false; } - | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } -; - -optional_ellipsis: - /* empty */ { $$ = false; } - | T_ELLIPSIS { $$ = true; } -; - -function_declaration_statement: - T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type '{' inner_statement_list '}' - { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; } -; - -class_declaration_statement: - class_entry_type identifier extends_from implements_list '{' class_statement_list '}' - { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]]; - $this->checkClass($$, #2); } - | T_INTERFACE identifier interface_extends_list '{' class_statement_list '}' - { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]]; - $this->checkInterface($$, #2); } - | T_TRAIT identifier '{' class_statement_list '}' - { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; } -; - -class_entry_type: - T_CLASS { $$ = 0; } - | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } -; - -extends_from: - /* empty */ { $$ = null; } - | T_EXTENDS class_name { $$ = $2; } -; - -interface_extends_list: - /* empty */ { $$ = array(); } - | T_EXTENDS class_name_list { $$ = $2; } -; - -implements_list: - /* empty */ { $$ = array(); } - | T_IMPLEMENTS class_name_list { $$ = $2; } -; - -class_name_list: - class_name { init($1); } - | class_name_list ',' class_name { push($1, $3); } -; - -for_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } -; - -foreach_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } -; - -declare_statement: - non_empty_statement { $$ = toArray($1); } - | ';' { $$ = null; } - | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } -; - -declare_list: - declare_list_element { init($1); } - | declare_list ',' declare_list_element { push($1, $3); } -; - -declare_list_element: - identifier '=' static_scalar { $$ = Stmt\DeclareDeclare[$1, $3]; } -; - -switch_case_list: - '{' case_list '}' { $$ = $2; } - | '{' ';' case_list '}' { $$ = $3; } - | ':' case_list T_ENDSWITCH ';' { $$ = $2; } - | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } -; - -case_list: - /* empty */ { init(); } - | case_list case { push($1, $2); } -; - -case: - T_CASE expr case_separator inner_statement_list_ex { $$ = Stmt\Case_[$2, $4]; } - | T_DEFAULT case_separator inner_statement_list_ex { $$ = Stmt\Case_[null, $3]; } -; - -case_separator: - ':' - | ';' -; - -while_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } -; - -elseif_list: - /* empty */ { init(); } - | elseif_list elseif { push($1, $2); } -; - -elseif: - T_ELSEIF parentheses_expr statement { $$ = Stmt\ElseIf_[$2, toArray($3)]; } -; - -new_elseif_list: - /* empty */ { init(); } - | new_elseif_list new_elseif { push($1, $2); } -; - -new_elseif: - T_ELSEIF parentheses_expr ':' inner_statement_list { $$ = Stmt\ElseIf_[$2, $4]; } -; - -else_single: - /* empty */ { $$ = null; } - | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } -; - -new_else_single: - /* empty */ { $$ = null; } - | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } -; - -foreach_variable: - variable { $$ = array($1, false); } - | ampersand variable { $$ = array($2, true); } - | list_expr { $$ = array($1, false); } -; - -parameter_list: - non_empty_parameter_list { $$ = $1; } - | /* empty */ { $$ = array(); } -; - -non_empty_parameter_list: - parameter { init($1); } - | non_empty_parameter_list ',' parameter { push($1, $3); } -; - -parameter: - optional_param_type optional_arg_ref optional_ellipsis plain_variable - { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_arg_ref optional_ellipsis plain_variable '=' static_scalar - { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } -; - -type: - name { $$ = $1; } - | T_ARRAY { $$ = Node\Identifier['array']; } - | T_CALLABLE { $$ = Node\Identifier['callable']; } -; - -optional_param_type: - /* empty */ { $$ = null; } - | type { $$ = $1; } -; - -optional_return_type: - /* empty */ { $$ = null; } - | ':' type { $$ = $2; } -; - -argument_list: - '(' ')' { $$ = array(); } - | '(' non_empty_argument_list ')' { $$ = $2; } - | '(' yield_expr ')' { $$ = array(Node\Arg[$2, false, false]); } -; - -non_empty_argument_list: - argument { init($1); } - | non_empty_argument_list ',' argument { push($1, $3); } -; - -argument: - expr { $$ = Node\Arg[$1, false, false]; } - | ampersand variable { $$ = Node\Arg[$2, true, false]; } - | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } -; - -global_var_list: - global_var_list ',' global_var { push($1, $3); } - | global_var { init($1); } -; - -global_var: - plain_variable { $$ = $1; } - | '$' variable { $$ = Expr\Variable[$2]; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } -; - -static_var_list: - static_var_list ',' static_var { push($1, $3); } - | static_var { init($1); } -; - -static_var: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' static_scalar { $$ = Stmt\StaticVar[$1, $3]; } -; - -class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } - | /* empty */ { init(); } -; - -class_statement_list: - class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -class_statement: - variable_modifiers property_declaration_list ';' - { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } - | T_CONST class_const_list ';' { $$ = Stmt\ClassConst[$2, 0]; } - | method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body - { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]]; - $this->checkClassMethod($$, #1); } - | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } -; - -trait_adaptations: - ';' { $$ = array(); } - | '{' trait_adaptation_list '}' { $$ = $2; } -; - -trait_adaptation_list: - /* empty */ { init(); } - | trait_adaptation_list trait_adaptation { push($1, $2); } -; - -trait_adaptation: - trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' - { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_ex ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } - | trait_method_reference T_AS member_modifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } - | trait_method_reference T_AS identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } - | trait_method_reference T_AS reserved_non_modifiers_identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } -; - -trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = array($1, $3); } -; -trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } - | identifier_ex { $$ = array(null, $1); } -; - -method_body: - ';' /* abstract method */ { $$ = null; } - | '{' inner_statement_list '}' { $$ = $2; } -; - -variable_modifiers: - non_empty_member_modifiers { $$ = $1; } - | T_VAR { $$ = 0; } -; - -method_modifiers: - /* empty */ { $$ = 0; } - | non_empty_member_modifiers { $$ = $1; } -; - -non_empty_member_modifiers: - member_modifier { $$ = $1; } - | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -member_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } - | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } -; - -property_declaration_list: - property_declaration { init($1); } - | property_declaration_list ',' property_declaration { push($1, $3); } -; - -property_decl_name: - T_VARIABLE { $$ = Node\VarLikeIdentifier[parseVar($1)]; } -; - -property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' static_scalar { $$ = Stmt\PropertyProperty[$1, $3]; } -; - -expr_list: - expr_list ',' expr { push($1, $3); } - | expr { init($1); } -; - -for_expr: - /* empty */ { $$ = array(); } - | expr_list { $$ = $1; } -; - -expr: - variable { $$ = $1; } - | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } - | variable '=' ampersand new_expr { $$ = Expr\AssignRef[$1, $4]; } - | new_expr { $$ = $1; } - | T_CLONE expr { $$ = Expr\Clone_[$2]; } - | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } - | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } - | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } - | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } - | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } - | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } - | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } - | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } - | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } - | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } - | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } - | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } - | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } - | variable T_INC { $$ = Expr\PostInc[$1]; } - | T_INC variable { $$ = Expr\PreInc [$2]; } - | variable T_DEC { $$ = Expr\PostDec[$1]; } - | T_DEC variable { $$ = Expr\PreDec [$2]; } - | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } - | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' expr { $$ = Expr\BooleanNot[$2]; } - | '~' expr { $$ = Expr\BitwiseNot[$2]; } - | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } - | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } - | parentheses_expr { $$ = $1; } - /* we need a separate '(' new_expr ')' rule to avoid problems caused by a s/r conflict */ - | '(' new_expr ')' { $$ = $2; } - | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } - | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } - | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } - | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; } - | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } - | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } - | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } - | T_EVAL parentheses_expr { $$ = Expr\Eval_[$2]; } - | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } - | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } - | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr - { $attrs = attributes(); - $attrs['kind'] = $this->getFloatCastKind($1); - $$ = new Expr\Cast\Double($2, $attrs); } - | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } - | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } - | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } - | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } - | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } - | T_EXIT exit_expr - { $attrs = attributes(); - $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $$ = new Expr\Exit_($2, $attrs); } - | '@' expr { $$ = Expr\ErrorSuppress[$2]; } - | scalar { $$ = $1; } - | array_expr { $$ = $1; } - | scalar_dereference { $$ = $1; } - | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } - | T_PRINT expr { $$ = Expr\Print_[$2]; } - | T_YIELD { $$ = Expr\Yield_[null, null]; } - | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } - | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type - '{' inner_statement_list '}' - { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; } - | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type - '{' inner_statement_list '}' - { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; } -; - -parentheses_expr: - '(' expr ')' { $$ = $2; } - | '(' yield_expr ')' { $$ = $2; } -; - -yield_expr: - T_YIELD expr { $$ = Expr\Yield_[$2, null]; } - | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } -; - -array_expr: - T_ARRAY '(' array_pair_list ')' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; - $$ = new Expr\Array_($3, $attrs); } - | '[' array_pair_list ']' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $$ = new Expr\Array_($2, $attrs); } -; - -scalar_dereference: - array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = Expr\ArrayDimFetch[new Scalar\String_(Scalar\String_::parse($1), $attrs), $3]; } - | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -anonymous_class: - T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' - { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2); - $this->checkClass($$[0], -1); } -; - -new_expr: - T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } - | T_NEW anonymous_class - { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } -; - -lexical_vars: - /* empty */ { $$ = array(); } - | T_USE '(' lexical_var_list ')' { $$ = $3; } -; - -lexical_var_list: - lexical_var { init($1); } - | lexical_var_list ',' lexical_var { push($1, $3); } -; - -lexical_var: - optional_ref plain_variable { $$ = Expr\ClosureUse[$2, $1]; } -; - -function_call: - name argument_list { $$ = Expr\FuncCall[$1, $2]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex argument_list - { $$ = Expr\StaticCall[$1, $3, $4]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' argument_list - { $$ = Expr\StaticCall[$1, $4, $6]; } - | static_property argument_list - { $$ = $this->fixupPhp5StaticPropCall($1, $2, attributes()); } - | variable_without_objects argument_list - { $$ = Expr\FuncCall[$1, $2]; } - | function_call '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -class_name: - T_STATIC { $$ = Name[$1]; } - | name { $$ = $1; } -; - -name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } - | T_NAME_FULLY_QUALIFIED { $$ = Name\FullyQualified[substr($1, 1)]; } - | T_NAME_RELATIVE { $$ = Name\Relative[substr($1, 10)]; } -; - -class_name_reference: - class_name { $$ = $1; } - | dynamic_class_name_reference { $$ = $1; } -; - -dynamic_class_name_reference: - object_access_for_dcnr { $$ = $1; } - | base_variable { $$ = $1; } -; - -class_name_or_var: - class_name { $$ = $1; } - | reference_variable { $$ = $1; } -; - -object_access_for_dcnr: - base_variable T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | object_access_for_dcnr T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | object_access_for_dcnr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | object_access_for_dcnr '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -exit_expr: - /* empty */ { $$ = null; } - | '(' ')' { $$ = null; } - | parentheses_expr { $$ = $1; } -; - -backticks_expr: - /* empty */ { $$ = array(); } - | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`', false)]); } - | encaps_list { parseEncapsed($1, '`', false); $$ = $1; } -; - -ctor_arguments: - /* empty */ { $$ = array(); } - | argument_list { $$ = $1; } -; - -common_scalar: - T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } - | T_CONSTANT_ENCAPSED_STRING - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); } - | T_LINE { $$ = Scalar\MagicConst\Line[]; } - | T_FILE { $$ = Scalar\MagicConst\File[]; } - | T_DIR { $$ = Scalar\MagicConst\Dir[]; } - | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } - | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } - | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } - | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } - | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), false); } - | T_START_HEREDOC T_END_HEREDOC - { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), false); } -; - -static_scalar: - common_scalar { $$ = $1; } - | class_name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = Expr\ClassConstFetch[$1, $3]; } - | name { $$ = Expr\ConstFetch[$1]; } - | T_ARRAY '(' static_array_pair_list ')' { $$ = Expr\Array_[$3]; } - | '[' static_array_pair_list ']' { $$ = Expr\Array_[$2]; } - | static_operation { $$ = $1; } -; - -static_operation: - static_scalar T_BOOLEAN_OR static_scalar { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | static_scalar T_BOOLEAN_AND static_scalar { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | static_scalar T_LOGICAL_OR static_scalar { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | static_scalar T_LOGICAL_AND static_scalar { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | static_scalar T_LOGICAL_XOR static_scalar { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | static_scalar '|' static_scalar { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | static_scalar T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG static_scalar - { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | static_scalar T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG static_scalar - { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | static_scalar '^' static_scalar { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | static_scalar '.' static_scalar { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | static_scalar '+' static_scalar { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | static_scalar '-' static_scalar { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | static_scalar '*' static_scalar { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | static_scalar '/' static_scalar { $$ = Expr\BinaryOp\Div [$1, $3]; } - | static_scalar '%' static_scalar { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | static_scalar T_SL static_scalar { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | static_scalar T_SR static_scalar { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | static_scalar T_POW static_scalar { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' static_scalar %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' static_scalar %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' static_scalar { $$ = Expr\BooleanNot[$2]; } - | '~' static_scalar { $$ = Expr\BitwiseNot[$2]; } - | static_scalar T_IS_IDENTICAL static_scalar { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | static_scalar T_IS_NOT_IDENTICAL static_scalar { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | static_scalar T_IS_EQUAL static_scalar { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | static_scalar T_IS_NOT_EQUAL static_scalar { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | static_scalar '<' static_scalar { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | static_scalar T_IS_SMALLER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | static_scalar '>' static_scalar { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | static_scalar T_IS_GREATER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | static_scalar '?' static_scalar ':' static_scalar { $$ = Expr\Ternary[$1, $3, $5]; } - | static_scalar '?' ':' static_scalar { $$ = Expr\Ternary[$1, null, $4]; } - | static_scalar '[' static_scalar ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | '(' static_scalar ')' { $$ = $2; } -; - -constant: - name { $$ = Expr\ConstFetch[$1]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex - { $$ = Expr\ClassConstFetch[$1, $3]; } -; - -scalar: - common_scalar { $$ = $1; } - | constant { $$ = $1; } - | '"' encaps_list '"' - { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } - | T_START_HEREDOC encaps_list T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } -; - -static_array_pair_list: - /* empty */ { $$ = array(); } - | non_empty_static_array_pair_list optional_comma { $$ = $1; } -; - -optional_comma: - /* empty */ - | ',' -; - -non_empty_static_array_pair_list: - non_empty_static_array_pair_list ',' static_array_pair { push($1, $3); } - | static_array_pair { init($1); } -; - -static_array_pair: - static_scalar T_DOUBLE_ARROW static_scalar { $$ = Expr\ArrayItem[$3, $1, false]; } - | static_scalar { $$ = Expr\ArrayItem[$1, null, false]; } -; - -variable: - object_access { $$ = $1; } - | base_variable { $$ = $1; } - | function_call { $$ = $1; } - | new_expr_array_deref { $$ = $1; } -; - -new_expr_array_deref: - '(' new_expr ')' '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$2, $5]; } - | new_expr_array_deref '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - /* alternative array syntax missing intentionally */ -; - -object_access: - variable_or_new_expr T_OBJECT_OPERATOR object_property - { $$ = Expr\PropertyFetch[$1, $3]; } - | variable_or_new_expr T_OBJECT_OPERATOR object_property argument_list - { $$ = Expr\MethodCall[$1, $3, $4]; } - | object_access argument_list { $$ = Expr\FuncCall[$1, $2]; } - | object_access '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | object_access '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -variable_or_new_expr: - variable { $$ = $1; } - | '(' new_expr ')' { $$ = $2; } -; - -variable_without_objects: - reference_variable { $$ = $1; } - | '$' variable_without_objects { $$ = Expr\Variable[$2]; } -; - -base_variable: - variable_without_objects { $$ = $1; } - | static_property { $$ = $1; } -; - -static_property: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' reference_variable - { $$ = Expr\StaticPropertyFetch[$1, $4]; } - | static_property_with_arrays { $$ = $1; } -; - -static_property_simple_name: - T_VARIABLE - { $var = parseVar($1); $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } -; - -static_property_with_arrays: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_property_simple_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' '{' expr '}' - { $$ = Expr\StaticPropertyFetch[$1, $5]; } - | static_property_with_arrays '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | static_property_with_arrays '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } -; - -reference_variable: - reference_variable '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | reference_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable { $$ = $1; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } -; - -dim_offset: - /* empty */ { $$ = null; } - | expr { $$ = $1; } -; - -object_property: - identifier { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | variable_without_objects { $$ = $1; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -list_expr: - T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; } -; - -list_expr_elements: - list_expr_elements ',' list_expr_element { push($1, $3); } - | list_expr_element { init($1); } -; - -list_expr_element: - variable { $$ = Expr\ArrayItem[$1, null, false]; } - | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } - | /* empty */ { $$ = null; } -; - -array_pair_list: - /* empty */ { $$ = array(); } - | non_empty_array_pair_list optional_comma { $$ = $1; } -; - -non_empty_array_pair_list: - non_empty_array_pair_list ',' array_pair { push($1, $3); } - | array_pair { init($1); } -; - -array_pair: - expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr { $$ = Expr\ArrayItem[$1, null, false]; } - | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } -; - -encaps_list: - encaps_list encaps_var { push($1, $2); } - | encaps_list encaps_string_part { push($1, $2); } - | encaps_var { init($1); } - | encaps_string_part encaps_var { init($1, $2); } -; - -encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } -; - -encaps_str_varname: - T_STRING_VARNAME { $$ = Expr\Variable[$1]; } -; - -encaps_var: - plain_variable { $$ = $1; } - | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier { $$ = Expr\PropertyFetch[$1, $3]; } - | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}' - { $$ = Expr\ArrayDimFetch[$2, $4]; } - | T_CURLY_OPEN variable '}' { $$ = $2; } -; - -encaps_var_offset: - T_STRING { $$ = Scalar\String_[$1]; } - | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } - | plain_variable { $$ = $1; } -; - -%% diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y deleted file mode 100644 index eac68d09..00000000 --- a/vendor/nikic/php-parser/grammar/php7.y +++ /dev/null @@ -1,1196 +0,0 @@ -%pure_parser -%expect 2 - -%tokens - -%% - -start: - top_statement_list { $$ = $this->handleNamespaces($1); } -; - -top_statement_list_ex: - top_statement_list_ex top_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -top_statement_list: - top_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -ampersand: - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG -; - -reserved_non_modifiers: - T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND - | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE - | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH - | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO - | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT - | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN - | T_MATCH | T_ENUM -; - -semi_reserved: - reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY -; - -identifier_maybe_reserved: - T_STRING { $$ = Node\Identifier[$1]; } - | semi_reserved { $$ = Node\Identifier[$1]; } -; - -identifier_not_reserved: - T_STRING { $$ = Node\Identifier[$1]; } -; - -reserved_non_modifiers_identifier: - reserved_non_modifiers { $$ = Node\Identifier[$1]; } -; - -namespace_declaration_name: - T_STRING { $$ = Name[$1]; } - | semi_reserved { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -namespace_name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -legacy_namespace_name: - namespace_name { $$ = $1; } - | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } -; - -plain_variable: - T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; } -; - -semi: - ';' { /* nothing */ } - | error { /* nothing */ } -; - -no_comma: - /* empty */ { /* nothing */ } - | ',' { $this->emitError(new Error('A trailing comma is not allowed here', attributes())); } -; - -optional_comma: - /* empty */ - | ',' -; - -attribute_decl: - class_name { $$ = Node\Attribute[$1, []]; } - | class_name argument_list { $$ = Node\Attribute[$1, $2]; } -; - -attribute_group: - attribute_decl { init($1); } - | attribute_group ',' attribute_decl { push($1, $3); } -; - -attribute: - T_ATTRIBUTE attribute_group optional_comma ']' { $$ = Node\AttributeGroup[$2]; } -; - -attributes: - attribute { init($1); } - | attributes attribute { push($1, $2); } -; - -optional_attributes: - /* empty */ { $$ = []; } - | attributes { $$ = $1; } -; - -top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } - | T_NAMESPACE namespace_declaration_name semi - { $$ = Stmt\Namespace_[$2, null]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($$); } - | T_NAMESPACE namespace_declaration_name '{' top_statement_list '}' - { $$ = Stmt\Namespace_[$2, $4]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_NAMESPACE '{' top_statement_list '}' - { $$ = Stmt\Namespace_[null, $3]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } - | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration semi { $$ = $1; } - | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } -; - -use_type: - T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; } - | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; } -; - -group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' - { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' - { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } -; - -unprefixed_use_declarations: - non_empty_unprefixed_use_declarations optional_comma { $$ = $1; } -; - -non_empty_unprefixed_use_declarations: - non_empty_unprefixed_use_declarations ',' unprefixed_use_declaration - { push($1, $3); } - | unprefixed_use_declaration { init($1); } -; - -use_declarations: - non_empty_use_declarations no_comma { $$ = $1; } -; - -non_empty_use_declarations: - non_empty_use_declarations ',' use_declaration { push($1, $3); } - | use_declaration { init($1); } -; - -inline_use_declarations: - non_empty_inline_use_declarations optional_comma { $$ = $1; } -; - -non_empty_inline_use_declarations: - non_empty_inline_use_declarations ',' inline_use_declaration - { push($1, $3); } - | inline_use_declaration { init($1); } -; - -unprefixed_use_declaration: - namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -use_declaration: - legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -inline_use_declaration: - unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; } - | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; } -; - -constant_declaration_list: - non_empty_constant_declaration_list no_comma { $$ = $1; } -; - -non_empty_constant_declaration_list: - non_empty_constant_declaration_list ',' constant_declaration - { push($1, $3); } - | constant_declaration { init($1); } -; - -constant_declaration: - identifier_not_reserved '=' expr { $$ = Node\Const_[$1, $3]; } -; - -class_const_list: - non_empty_class_const_list no_comma { $$ = $1; } -; - -non_empty_class_const_list: - non_empty_class_const_list ',' class_const { push($1, $3); } - | class_const { init($1); } -; - -class_const: - identifier_maybe_reserved '=' expr { $$ = Node\Const_[$1, $3]; } -; - -inner_statement_list_ex: - inner_statement_list_ex inner_statement { pushNormalizing($1, $2); } - | /* empty */ { init(); } -; - -inner_statement_list: - inner_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER - { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } -; - -non_empty_statement: - '{' inner_statement_list '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if (null === $$) { $$ = array(); } - } - } - | T_IF '(' expr ')' statement elseif_list else_single - { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; } - | T_IF '(' expr ')' ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';' - { $$ = Stmt\If_[$3, ['stmts' => $6, 'elseifs' => $7, 'else' => $8]]; } - | T_WHILE '(' expr ')' while_statement { $$ = Stmt\While_[$3, $5]; } - | T_DO statement T_WHILE '(' expr ')' ';' { $$ = Stmt\Do_ [$5, toArray($2)]; } - | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement - { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; } - | T_SWITCH '(' expr ')' switch_case_list { $$ = Stmt\Switch_[$3, $5]; } - | T_BREAK optional_expr semi { $$ = Stmt\Break_[$2]; } - | T_CONTINUE optional_expr semi { $$ = Stmt\Continue_[$2]; } - | T_RETURN optional_expr semi { $$ = Stmt\Return_[$2]; } - | T_GLOBAL global_var_list semi { $$ = Stmt\Global_[$2]; } - | T_STATIC static_var_list semi { $$ = Stmt\Static_[$2]; } - | T_ECHO expr_list_forbid_comma semi { $$ = Stmt\Echo_[$2]; } - | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } - | expr semi { - $e = $1; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $$ = Stmt\Throw_[$e->expr]; - } else { - $$ = Stmt\Expression[$e]; - } - } - | T_UNSET '(' variables_list ')' semi { $$ = Stmt\Unset_[$3]; } - | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } - | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement - { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; } - | T_FOREACH '(' expr error ')' foreach_statement - { $$ = Stmt\Foreach_[$3, new Expr\Error(stackAttributes(#4)), ['stmts' => $6]]; } - | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; } - | T_TRY '{' inner_statement_list '}' catches optional_finally - { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } - | T_GOTO identifier_not_reserved semi { $$ = Stmt\Goto_[$2]; } - | identifier_not_reserved ':' { $$ = Stmt\Label[$1]; } - | error { $$ = array(); /* means: no statement */ } -; - -statement: - non_empty_statement { $$ = $1; } - | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if ($$ === null) $$ = array(); /* means: no statement */ } -; - -catches: - /* empty */ { init(); } - | catches catch { push($1, $2); } -; - -name_union: - name { init($1); } - | name_union '|' name { push($1, $3); } -; - -catch: - T_CATCH '(' name_union optional_plain_variable ')' '{' inner_statement_list '}' - { $$ = Stmt\Catch_[$3, $4, $7]; } -; - -optional_finally: - /* empty */ { $$ = null; } - | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; } -; - -variables_list: - non_empty_variables_list optional_comma { $$ = $1; } -; - -non_empty_variables_list: - variable { init($1); } - | non_empty_variables_list ',' variable { push($1, $3); } -; - -optional_ref: - /* empty */ { $$ = false; } - | ampersand { $$ = true; } -; - -optional_arg_ref: - /* empty */ { $$ = false; } - | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } -; - -optional_ellipsis: - /* empty */ { $$ = false; } - | T_ELLIPSIS { $$ = true; } -; - -block_or_error: - '{' inner_statement_list '}' { $$ = $2; } - | error { $$ = []; } -; - -function_declaration_statement: - T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error - { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | attributes T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error - { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } -; - -class_declaration_statement: - optional_attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' - { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; - $this->checkClass($$, #3); } - | optional_attributes T_INTERFACE identifier_not_reserved interface_extends_list '{' class_statement_list '}' - { $$ = Stmt\Interface_[$3, ['extends' => $4, 'stmts' => $6, 'attrGroups' => $1]]; - $this->checkInterface($$, #3); } - | optional_attributes T_TRAIT identifier_not_reserved '{' class_statement_list '}' - { $$ = Stmt\Trait_[$3, ['stmts' => $5, 'attrGroups' => $1]]; } - | optional_attributes T_ENUM identifier_not_reserved enum_scalar_type implements_list '{' class_statement_list '}' - { $$ = Stmt\Enum_[$3, ['scalarType' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; - $this->checkEnum($$, #3); } -; - -enum_scalar_type: - /* empty */ { $$ = null; } - | ':' type { $$ = $2; } - -enum_case_expr: - /* empty */ { $$ = null; } - | '=' expr { $$ = $2; } -; - -class_entry_type: - T_CLASS { $$ = 0; } - | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } -; - -extends_from: - /* empty */ { $$ = null; } - | T_EXTENDS class_name { $$ = $2; } -; - -interface_extends_list: - /* empty */ { $$ = array(); } - | T_EXTENDS class_name_list { $$ = $2; } -; - -implements_list: - /* empty */ { $$ = array(); } - | T_IMPLEMENTS class_name_list { $$ = $2; } -; - -class_name_list: - non_empty_class_name_list no_comma { $$ = $1; } -; - -non_empty_class_name_list: - class_name { init($1); } - | non_empty_class_name_list ',' class_name { push($1, $3); } -; - -for_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } -; - -foreach_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } -; - -declare_statement: - non_empty_statement { $$ = toArray($1); } - | ';' { $$ = null; } - | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } -; - -declare_list: - non_empty_declare_list no_comma { $$ = $1; } -; - -non_empty_declare_list: - declare_list_element { init($1); } - | non_empty_declare_list ',' declare_list_element { push($1, $3); } -; - -declare_list_element: - identifier_not_reserved '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } -; - -switch_case_list: - '{' case_list '}' { $$ = $2; } - | '{' ';' case_list '}' { $$ = $3; } - | ':' case_list T_ENDSWITCH ';' { $$ = $2; } - | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; } -; - -case_list: - /* empty */ { init(); } - | case_list case { push($1, $2); } -; - -case: - T_CASE expr case_separator inner_statement_list_ex { $$ = Stmt\Case_[$2, $4]; } - | T_DEFAULT case_separator inner_statement_list_ex { $$ = Stmt\Case_[null, $3]; } -; - -case_separator: - ':' - | ';' -; - -match: - T_MATCH '(' expr ')' '{' match_arm_list '}' { $$ = Expr\Match_[$3, $6]; } -; - -match_arm_list: - /* empty */ { $$ = []; } - | non_empty_match_arm_list optional_comma { $$ = $1; } -; - -non_empty_match_arm_list: - match_arm { init($1); } - | non_empty_match_arm_list ',' match_arm { push($1, $3); } -; - -match_arm: - expr_list_allow_comma T_DOUBLE_ARROW expr { $$ = Node\MatchArm[$1, $3]; } - | T_DEFAULT optional_comma T_DOUBLE_ARROW expr { $$ = Node\MatchArm[null, $4]; } -; - -while_statement: - statement { $$ = toArray($1); } - | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } -; - -elseif_list: - /* empty */ { init(); } - | elseif_list elseif { push($1, $2); } -; - -elseif: - T_ELSEIF '(' expr ')' statement { $$ = Stmt\ElseIf_[$3, toArray($5)]; } -; - -new_elseif_list: - /* empty */ { init(); } - | new_elseif_list new_elseif { push($1, $2); } -; - -new_elseif: - T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; } -; - -else_single: - /* empty */ { $$ = null; } - | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } -; - -new_else_single: - /* empty */ { $$ = null; } - | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } -; - -foreach_variable: - variable { $$ = array($1, false); } - | ampersand variable { $$ = array($2, true); } - | list_expr { $$ = array($1, false); } - | array_short_syntax { $$ = array($1, false); } -; - -parameter_list: - non_empty_parameter_list optional_comma { $$ = $1; } - | /* empty */ { $$ = array(); } -; - -non_empty_parameter_list: - parameter { init($1); } - | non_empty_parameter_list ',' parameter { push($1, $3); } -; - -optional_property_modifiers: - /* empty */ { $$ = 0; } - | optional_property_modifiers property_modifier - { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -property_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } -; - -parameter: - optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable - { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); - $this->checkParam($$); } - | optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable '=' expr - { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); - $this->checkParam($$); } - | optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis error - { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } -; - -type_expr: - type { $$ = $1; } - | '?' type { $$ = Node\NullableType[$2]; } - | union_type { $$ = Node\UnionType[$1]; } - | intersection_type { $$ = Node\IntersectionType[$1]; } -; - -type: - type_without_static { $$ = $1; } - | T_STATIC { $$ = Node\Name['static']; } -; - -type_without_static: - name { $$ = $this->handleBuiltinTypes($1); } - | T_ARRAY { $$ = Node\Identifier['array']; } - | T_CALLABLE { $$ = Node\Identifier['callable']; } -; - -union_type: - type '|' type { init($1, $3); } - | union_type '|' type { push($1, $3); } -; - -union_type_without_static: - type_without_static '|' type_without_static { init($1, $3); } - | union_type_without_static '|' type_without_static { push($1, $3); } -; - -intersection_type: - type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } - | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type - { push($1, $3); } -; - -intersection_type_without_static: - type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { init($1, $3); } - | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static - { push($1, $3); } -; - -type_expr_without_static: - type_without_static { $$ = $1; } - | '?' type_without_static { $$ = Node\NullableType[$2]; } - | union_type_without_static { $$ = Node\UnionType[$1]; } - | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } -; - -optional_type_without_static: - /* empty */ { $$ = null; } - | type_expr_without_static { $$ = $1; } -; - -optional_return_type: - /* empty */ { $$ = null; } - | ':' type_expr { $$ = $2; } - | ':' error { $$ = null; } -; - -argument_list: - '(' ')' { $$ = array(); } - | '(' non_empty_argument_list optional_comma ')' { $$ = $2; } - | '(' variadic_placeholder ')' { init($2); } -; - -variadic_placeholder: - T_ELLIPSIS { $$ = Node\VariadicPlaceholder[]; } -; - -non_empty_argument_list: - argument { init($1); } - | non_empty_argument_list ',' argument { push($1, $3); } -; - -argument: - expr { $$ = Node\Arg[$1, false, false]; } - | ampersand variable { $$ = Node\Arg[$2, true, false]; } - | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } - | identifier_maybe_reserved ':' expr - { $$ = new Node\Arg($3, false, false, attributes(), $1); } -; - -global_var_list: - non_empty_global_var_list no_comma { $$ = $1; } -; - -non_empty_global_var_list: - non_empty_global_var_list ',' global_var { push($1, $3); } - | global_var { init($1); } -; - -global_var: - simple_variable { $$ = $1; } -; - -static_var_list: - non_empty_static_var_list no_comma { $$ = $1; } -; - -non_empty_static_var_list: - non_empty_static_var_list ',' static_var { push($1, $3); } - | static_var { init($1); } -; - -static_var: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' expr { $$ = Stmt\StaticVar[$1, $3]; } -; - -class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } - | /* empty */ { init(); } -; - -class_statement_list: - class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -class_statement: - optional_attributes variable_modifiers optional_type_without_static property_declaration_list semi - { $$ = new Stmt\Property($2, $4, attributes(), $3, $1); - $this->checkProperty($$, #2); } - | optional_attributes method_modifiers T_CONST class_const_list semi - { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); - $this->checkClassConst($$, #2); } - | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_maybe_reserved '(' parameter_list ')' - optional_return_type method_body - { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; - $this->checkClassMethod($$, #2); } - | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } - | optional_attributes T_CASE identifier_maybe_reserved enum_case_expr semi - { $$ = Stmt\EnumCase[$3, $4, $1]; } - | error { $$ = null; /* will be skipped */ } -; - -trait_adaptations: - ';' { $$ = array(); } - | '{' trait_adaptation_list '}' { $$ = $2; } -; - -trait_adaptation_list: - /* empty */ { init(); } - | trait_adaptation_list trait_adaptation { push($1, $2); } -; - -trait_adaptation: - trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' - { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_maybe_reserved ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; } - | trait_method_reference T_AS member_modifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; } - | trait_method_reference T_AS identifier_not_reserved ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } - | trait_method_reference T_AS reserved_non_modifiers_identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } -; - -trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = array($1, $3); } -; -trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } - | identifier_maybe_reserved { $$ = array(null, $1); } -; - -method_body: - ';' /* abstract method */ { $$ = null; } - | block_or_error { $$ = $1; } -; - -variable_modifiers: - non_empty_member_modifiers { $$ = $1; } - | T_VAR { $$ = 0; } -; - -method_modifiers: - /* empty */ { $$ = 0; } - | non_empty_member_modifiers { $$ = $1; } -; - -non_empty_member_modifiers: - member_modifier { $$ = $1; } - | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } -; - -member_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } - | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } -; - -property_declaration_list: - non_empty_property_declaration_list no_comma { $$ = $1; } -; - -non_empty_property_declaration_list: - property_declaration { init($1); } - | non_empty_property_declaration_list ',' property_declaration - { push($1, $3); } -; - -property_decl_name: - T_VARIABLE { $$ = Node\VarLikeIdentifier[parseVar($1)]; } -; - -property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' expr { $$ = Stmt\PropertyProperty[$1, $3]; } -; - -expr_list_forbid_comma: - non_empty_expr_list no_comma { $$ = $1; } -; - -expr_list_allow_comma: - non_empty_expr_list optional_comma { $$ = $1; } -; - -non_empty_expr_list: - non_empty_expr_list ',' expr { push($1, $3); } - | expr { init($1); } -; - -for_expr: - /* empty */ { $$ = array(); } - | expr_list_forbid_comma { $$ = $1; } -; - -expr: - variable { $$ = $1; } - | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } - | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' expr { $$ = Expr\Assign[$1, $3]; } - | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } - | new_expr { $$ = $1; } - | match { $$ = $1; } - | T_CLONE expr { $$ = Expr\Clone_[$2]; } - | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; } - | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; } - | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; } - | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; } - | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; } - | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; } - | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; } - | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; } - | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; } - | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } - | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } - | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } - | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } - | variable T_INC { $$ = Expr\PostInc[$1]; } - | T_INC variable { $$ = Expr\PreInc [$2]; } - | variable T_DEC { $$ = Expr\PostDec[$1]; } - | T_DEC variable { $$ = Expr\PreDec [$2]; } - | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; } - | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; } - | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; } - | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; } - | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; } - | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; } - | expr T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; } - | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; } - | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; } - | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; } - | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; } - | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; } - | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; } - | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; } - | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; } - | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; } - | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; } - | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; } - | '!' expr { $$ = Expr\BooleanNot[$2]; } - | '~' expr { $$ = Expr\BitwiseNot[$2]; } - | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; } - | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; } - | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; } - | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; } - | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; } - | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; } - | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; } - | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; } - | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; } - | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } - | '(' expr ')' { $$ = $2; } - | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } - | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; } - | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; } - | T_ISSET '(' expr_list_allow_comma ')' { $$ = Expr\Isset_[$3]; } - | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; } - | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; } - | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; } - | T_EVAL '(' expr ')' { $$ = Expr\Eval_[$3]; } - | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } - | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } - | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr - { $attrs = attributes(); - $attrs['kind'] = $this->getFloatCastKind($1); - $$ = new Expr\Cast\Double($2, $attrs); } - | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } - | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } - | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } - | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; } - | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } - | T_EXIT exit_expr - { $attrs = attributes(); - $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $$ = new Expr\Exit_($2, $attrs); } - | '@' expr { $$ = Expr\ErrorSuppress[$2]; } - | scalar { $$ = $1; } - | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } - | T_PRINT expr { $$ = Expr\Print_[$2]; } - | T_YIELD { $$ = Expr\Yield_[null, null]; } - | T_YIELD expr { $$ = Expr\Yield_[$2, null]; } - | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } - | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } - | T_THROW expr { $$ = Expr\Throw_[$2]; } - - | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $2, 'params' => $4, 'returnType' => $6, 'expr' => $8, 'attrGroups' => []]]; } - | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => []]]; } - | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => []]]; } - - | attributes T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => $1]]; } - | attributes T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW - { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $4, 'params' => $6, 'returnType' => $8, 'expr' => $10, 'attrGroups' => $1]]; } - | attributes T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => false, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } - | attributes T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error - { $$ = Expr\Closure[['static' => true, 'byRef' => $4, 'params' => $6, 'uses' => $8, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; } -; - -anonymous_class: - optional_attributes T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' - { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]], $3); - $this->checkClass($$[0], -1); } -; - -new_expr: - T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } - | T_NEW anonymous_class - { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } -; - -lexical_vars: - /* empty */ { $$ = array(); } - | T_USE '(' lexical_var_list ')' { $$ = $3; } -; - -lexical_var_list: - non_empty_lexical_var_list optional_comma { $$ = $1; } -; - -non_empty_lexical_var_list: - lexical_var { init($1); } - | non_empty_lexical_var_list ',' lexical_var { push($1, $3); } -; - -lexical_var: - optional_ref plain_variable { $$ = Expr\ClosureUse[$2, $1]; } -; - -function_call: - name argument_list { $$ = Expr\FuncCall[$1, $2]; } - | callable_expr argument_list { $$ = Expr\FuncCall[$1, $2]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM member_name argument_list - { $$ = Expr\StaticCall[$1, $3, $4]; } -; - -class_name: - T_STATIC { $$ = Name[$1]; } - | name { $$ = $1; } -; - -name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } - | T_NAME_FULLY_QUALIFIED { $$ = Name\FullyQualified[substr($1, 1)]; } - | T_NAME_RELATIVE { $$ = Name\Relative[substr($1, 10)]; } -; - -class_name_reference: - class_name { $$ = $1; } - | new_variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -class_name_or_var: - class_name { $$ = $1; } - | fully_dereferencable { $$ = $1; } -; - -exit_expr: - /* empty */ { $$ = null; } - | '(' optional_expr ')' { $$ = $2; } -; - -backticks_expr: - /* empty */ { $$ = array(); } - | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } - | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } -; - -ctor_arguments: - /* empty */ { $$ = array(); } - | argument_list { $$ = $1; } -; - -constant: - name { $$ = Expr\ConstFetch[$1]; } - | T_LINE { $$ = Scalar\MagicConst\Line[]; } - | T_FILE { $$ = Scalar\MagicConst\File[]; } - | T_DIR { $$ = Scalar\MagicConst\Dir[]; } - | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; } - | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; } - | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } - | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } - | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } -; - -class_constant: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved - { $$ = Expr\ClassConstFetch[$1, $3]; } - /* We interpret an isolated FOO:: as an unfinished class constant fetch. It could also be - an unfinished static property fetch or unfinished scoped call. */ - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM error - { $$ = Expr\ClassConstFetch[$1, new Expr\Error(stackAttributes(#3))]; $this->errorState = 2; } -; - -array_short_syntax: - '[' array_pair_list ']' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $$ = new Expr\Array_($2, $attrs); } -; - -dereferencable_scalar: - T_ARRAY '(' array_pair_list ')' - { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; - $$ = new Expr\Array_($3, $attrs); } - | array_short_syntax { $$ = $1; } - | T_CONSTANT_ENCAPSED_STRING - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = new Scalar\String_(Scalar\String_::parse($1), $attrs); } - | '"' encaps_list '"' - { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } -; - -scalar: - T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } - | dereferencable_scalar { $$ = $1; } - | constant { $$ = $1; } - | class_constant { $$ = $1; } - | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } - | T_START_HEREDOC T_END_HEREDOC - { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), true); } - | T_START_HEREDOC encaps_list T_END_HEREDOC - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } -; - -optional_expr: - /* empty */ { $$ = null; } - | expr { $$ = $1; } -; - -fully_dereferencable: - variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } - | class_constant { $$ = $1; } -; - -array_object_dereferencable: - fully_dereferencable { $$ = $1; } - | constant { $$ = $1; } -; - -callable_expr: - callable_variable { $$ = $1; } - | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } -; - -callable_variable: - simple_variable { $$ = $1; } - | array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | function_call { $$ = $1; } - | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list - { $$ = Expr\MethodCall[$1, $3, $4]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list - { $$ = Expr\NullsafeMethodCall[$1, $3, $4]; } -; - -optional_plain_variable: - /* empty */ { $$ = null; } - | plain_variable { $$ = $1; } -; - -variable: - callable_variable { $$ = $1; } - | static_member { $$ = $1; } - | array_object_dereferencable T_OBJECT_OPERATOR property_name - { $$ = Expr\PropertyFetch[$1, $3]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name - { $$ = Expr\NullsafePropertyFetch[$1, $3]; } -; - -simple_variable: - plain_variable { $$ = $1; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } - | '$' simple_variable { $$ = Expr\Variable[$2]; } - | '$' error { $$ = Expr\Variable[Expr\Error[]]; $this->errorState = 2; } -; - -static_member_prop_name: - simple_variable - { $var = $1->name; $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } -; - -static_member: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } -; - -new_variable: - simple_variable { $$ = $1; } - | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } - | new_variable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = Expr\NullsafePropertyFetch[$1, $3]; } - | class_name T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } - | new_variable T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name - { $$ = Expr\StaticPropertyFetch[$1, $3]; } -; - -member_name: - identifier_maybe_reserved { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } -; - -property_name: - identifier_not_reserved { $$ = $1; } - | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } - | error { $$ = Expr\Error[]; $this->errorState = 2; } -; - -list_expr: - T_LIST '(' inner_array_pair_list ')' { $$ = Expr\List_[$3]; } -; - -array_pair_list: - inner_array_pair_list - { $$ = $1; $end = count($$)-1; if ($$[$end] === null) array_pop($$); } -; - -comma_or_error: - ',' - | error - { /* do nothing -- prevent default action of $$=$1. See #551. */ } -; - -inner_array_pair_list: - inner_array_pair_list comma_or_error array_pair { push($1, $3); } - | array_pair { init($1); } -; - -array_pair: - expr { $$ = Expr\ArrayItem[$1, null, false]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } - | expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } - | /* empty */ { $$ = null; } -; - -encaps_list: - encaps_list encaps_var { push($1, $2); } - | encaps_list encaps_string_part { push($1, $2); } - | encaps_var { init($1); } - | encaps_string_part encaps_var { init($1, $2); } -; - -encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } -; - -encaps_str_varname: - T_STRING_VARNAME { $$ = Expr\Variable[$1]; } -; - -encaps_var: - plain_variable { $$ = $1; } - | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier_not_reserved - { $$ = Expr\PropertyFetch[$1, $3]; } - | plain_variable T_NULLSAFE_OBJECT_OPERATOR identifier_not_reserved - { $$ = Expr\NullsafePropertyFetch[$1, $3]; } - | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; } - | T_DOLLAR_OPEN_CURLY_BRACES encaps_str_varname '[' expr ']' '}' - { $$ = Expr\ArrayDimFetch[$2, $4]; } - | T_CURLY_OPEN variable '}' { $$ = $2; } -; - -encaps_var_offset: - T_STRING { $$ = Scalar\String_[$1]; } - | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } - | '-' T_NUM_STRING { $$ = $this->parseNumString('-' . $2, attributes()); } - | plain_variable { $$ = $1; } -; - -%% diff --git a/vendor/nikic/php-parser/grammar/phpyLang.php b/vendor/nikic/php-parser/grammar/phpyLang.php deleted file mode 100644 index 1a9808dc..00000000 --- a/vendor/nikic/php-parser/grammar/phpyLang.php +++ /dev/null @@ -1,192 +0,0 @@ -\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') - (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") - (?(?&singleQuotedString)|(?&doubleQuotedString)) - (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) - (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) -)'; - -const PARAMS = '\[(?[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]'; -const ARGS = '\((?[^()]*+(?:\((?&args)\)[^()]*+)*+)\)'; - -/////////////////////////////// -/// Preprocessing functions /// -/////////////////////////////// - -function preprocessGrammar($code) { - $code = resolveNodes($code); - $code = resolveMacros($code); - $code = resolveStackAccess($code); - - return $code; -} - -function resolveNodes($code) { - return preg_replace_callback( - '~\b(?[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~', - function($matches) { - // recurse - $matches['params'] = resolveNodes($matches['params']); - - $params = magicSplit( - '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', - $matches['params'] - ); - - $paramCode = ''; - foreach ($params as $param) { - $paramCode .= $param . ', '; - } - - return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())'; - }, - $code - ); -} - -function resolveMacros($code) { - return preg_replace_callback( - '~\b(?)(?!array\()(?[a-z][A-Za-z]++)' . ARGS . '~', - function($matches) { - // recurse - $matches['args'] = resolveMacros($matches['args']); - - $name = $matches['name']; - $args = magicSplit( - '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,', - $matches['args'] - ); - - if ('attributes' === $name) { - assertArgs(0, $args, $name); - return '$this->startAttributeStack[#1] + $this->endAttributes'; - } - - if ('stackAttributes' === $name) { - assertArgs(1, $args, $name); - return '$this->startAttributeStack[' . $args[0] . ']' - . ' + $this->endAttributeStack[' . $args[0] . ']'; - } - - if ('init' === $name) { - return '$$ = array(' . implode(', ', $args) . ')'; - } - - if ('push' === $name) { - assertArgs(2, $args, $name); - - return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0]; - } - - if ('pushNormalizing' === $name) { - assertArgs(2, $args, $name); - - return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }' - . ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }'; - } - - if ('toArray' == $name) { - assertArgs(1, $args, $name); - - return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')'; - } - - if ('parseVar' === $name) { - assertArgs(1, $args, $name); - - return 'substr(' . $args[0] . ', 1)'; - } - - if ('parseEncapsed' === $name) { - assertArgs(3, $args, $name); - - return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' - . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }'; - } - - if ('makeNop' === $name) { - assertArgs(3, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }' - . ' else { ' . $args[0] . ' = null; }'; - } - - if ('makeZeroLengthNop' == $name) { - assertArgs(2, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }' - . ' else { ' . $args[0] . ' = null; }'; - } - - if ('strKind' === $name) { - assertArgs(1, $args, $name); - - return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && ' - . '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) ' - . '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)'; - } - - if ('prependLeadingComments' === $name) { - assertArgs(1, $args, $name); - - return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' - . 'if (!empty($attrs[\'comments\'])) {' - . '$stmts[0]->setAttribute(\'comments\', ' - . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }'; - } - - return $matches[0]; - }, - $code - ); -} - -function assertArgs($num, $args, $name) { - if ($num != count($args)) { - die('Wrong argument count for ' . $name . '().'); - } -} - -function resolveStackAccess($code) { - $code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code); - $code = preg_replace('/#(\d+)/', '$$1', $code); - return $code; -} - -function removeTrailingWhitespace($code) { - $lines = explode("\n", $code); - $lines = array_map('rtrim', $lines); - return implode("\n", $lines); -} - -////////////////////////////// -/// Regex helper functions /// -////////////////////////////// - -function regex($regex) { - return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; -} - -function magicSplit($regex, $string) { - $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); - - foreach ($pieces as &$piece) { - $piece = trim($piece); - } - - if ($pieces === ['']) { - return []; - } - - return $pieces; -} diff --git a/vendor/nikic/php-parser/grammar/rebuildParsers.php b/vendor/nikic/php-parser/grammar/rebuildParsers.php deleted file mode 100644 index 2d0c6b14..00000000 --- a/vendor/nikic/php-parser/grammar/rebuildParsers.php +++ /dev/null @@ -1,81 +0,0 @@ - 'Php5', - __DIR__ . '/php7.y' => 'Php7', -]; - -$tokensFile = __DIR__ . '/tokens.y'; -$tokensTemplate = __DIR__ . '/tokens.template'; -$skeletonFile = __DIR__ . '/parser.template'; -$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy'; -$tmpResultFile = __DIR__ . '/tmp_parser.php'; -$resultDir = __DIR__ . '/../lib/PhpParser/Parser'; -$tokensResultsFile = $resultDir . '/Tokens.php'; - -$kmyacc = getenv('KMYACC'); -if (!$kmyacc) { - // Use phpyacc from dev dependencies by default. - $kmyacc = __DIR__ . '/../vendor/bin/phpyacc'; -} - -$options = array_flip($argv); -$optionDebug = isset($options['--debug']); -$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']); - -/////////////////// -/// Main script /// -/////////////////// - -$tokens = file_get_contents($tokensFile); - -foreach ($grammarFileToName as $grammarFile => $name) { - echo "Building temporary $name grammar file.\n"; - - $grammarCode = file_get_contents($grammarFile); - $grammarCode = str_replace('%tokens', $tokens, $grammarCode); - $grammarCode = preprocessGrammar($grammarCode); - - file_put_contents($tmpGrammarFile, $grammarCode); - - $additionalArgs = $optionDebug ? '-t -v' : ''; - - echo "Building $name parser.\n"; - $output = execCmd("$kmyacc $additionalArgs -m $skeletonFile -p $name $tmpGrammarFile"); - - $resultCode = file_get_contents($tmpResultFile); - $resultCode = removeTrailingWhitespace($resultCode); - - ensureDirExists($resultDir); - file_put_contents("$resultDir/$name.php", $resultCode); - unlink($tmpResultFile); - - echo "Building token definition.\n"; - $output = execCmd("$kmyacc -m $tokensTemplate $tmpGrammarFile"); - rename($tmpResultFile, $tokensResultsFile); - - if (!$optionKeepTmpGrammar) { - unlink($tmpGrammarFile); - } -} - -//////////////////////////////// -/// Utility helper functions /// -//////////////////////////////// - -function ensureDirExists($dir) { - if (!is_dir($dir)) { - mkdir($dir, 0777, true); - } -} - -function execCmd($cmd) { - $output = trim(shell_exec("$cmd 2>&1")); - if ($output !== "") { - echo "> " . $cmd . "\n"; - echo $output; - } - return $output; -} diff --git a/vendor/nikic/php-parser/grammar/tokens.template b/vendor/nikic/php-parser/grammar/tokens.template deleted file mode 100644 index ba4e4901..00000000 --- a/vendor/nikic/php-parser/grammar/tokens.template +++ /dev/null @@ -1,17 +0,0 @@ -semValue -#semval($,%t) $this->semValue -#semval(%n) $this->stackPos-(%l-%n) -#semval(%n,%t) $this->stackPos-(%l-%n) - -namespace PhpParser\Parser; -#include; - -/* GENERATED file based on grammar/tokens.y */ -final class Tokens -{ -#tokenval - const %s = %n; -#endtokenval -} diff --git a/vendor/nikic/php-parser/grammar/tokens.y b/vendor/nikic/php-parser/grammar/tokens.y deleted file mode 100644 index 8f0b2172..00000000 --- a/vendor/nikic/php-parser/grammar/tokens.y +++ /dev/null @@ -1,115 +0,0 @@ -/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for - * both. This is enforced by sharing this token file. */ - -%right T_THROW -%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE -%left ',' -%left T_LOGICAL_OR -%left T_LOGICAL_XOR -%left T_LOGICAL_AND -%right T_PRINT -%right T_YIELD -%right T_DOUBLE_ARROW -%right T_YIELD_FROM -%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL -%left '?' ':' -%right T_COALESCE -%left T_BOOLEAN_OR -%left T_BOOLEAN_AND -%left '|' -%left '^' -%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG -%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP -%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL -%left T_SL T_SR -%left '+' '-' '.' -%left '*' '/' '%' -%right '!' -%nonassoc T_INSTANCEOF -%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@' -%right T_POW -%right '[' -%nonassoc T_NEW T_CLONE -%token T_EXIT -%token T_IF -%left T_ELSEIF -%left T_ELSE -%left T_ENDIF -%token T_LNUMBER -%token T_DNUMBER -%token T_STRING -%token T_STRING_VARNAME -%token T_VARIABLE -%token T_NUM_STRING -%token T_INLINE_HTML -%token T_ENCAPSED_AND_WHITESPACE -%token T_CONSTANT_ENCAPSED_STRING -%token T_ECHO -%token T_DO -%token T_WHILE -%token T_ENDWHILE -%token T_FOR -%token T_ENDFOR -%token T_FOREACH -%token T_ENDFOREACH -%token T_DECLARE -%token T_ENDDECLARE -%token T_AS -%token T_SWITCH -%token T_MATCH -%token T_ENDSWITCH -%token T_CASE -%token T_DEFAULT -%token T_BREAK -%token T_CONTINUE -%token T_GOTO -%token T_FUNCTION -%token T_FN -%token T_CONST -%token T_RETURN -%token T_TRY -%token T_CATCH -%token T_FINALLY -%token T_THROW -%token T_USE -%token T_INSTEADOF -%token T_GLOBAL -%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY -%token T_VAR -%token T_UNSET -%token T_ISSET -%token T_EMPTY -%token T_HALT_COMPILER -%token T_CLASS -%token T_TRAIT -%token T_INTERFACE -%token T_ENUM -%token T_EXTENDS -%token T_IMPLEMENTS -%token T_OBJECT_OPERATOR -%token T_NULLSAFE_OBJECT_OPERATOR -%token T_DOUBLE_ARROW -%token T_LIST -%token T_ARRAY -%token T_CALLABLE -%token T_CLASS_C -%token T_TRAIT_C -%token T_METHOD_C -%token T_FUNC_C -%token T_LINE -%token T_FILE -%token T_START_HEREDOC -%token T_END_HEREDOC -%token T_DOLLAR_OPEN_CURLY_BRACES -%token T_CURLY_OPEN -%token T_PAAMAYIM_NEKUDOTAYIM -%token T_NAMESPACE -%token T_NS_C -%token T_DIR -%token T_NS_SEPARATOR -%token T_ELLIPSIS -%token T_NAME_FULLY_QUALIFIED -%token T_NAME_QUALIFIED -%token T_NAME_RELATIVE -%token T_ATTRIBUTE -%token T_ENUM diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php index 26d8921e..d6aa124c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder.php @@ -2,12 +2,11 @@ namespace PhpParser; -interface Builder -{ +interface Builder { /** * Returns the built node. * * @return Node The built node */ - public function getNode() : Node; + public function getNode(): Node; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php index f616c627..fa5dc10e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php @@ -6,24 +6,28 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Const_; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class ClassConst implements PhpParser\Builder -{ - protected $flags = 0; - protected $attributes = []; - protected $constants = []; +class ClassConst implements PhpParser\Builder { + protected int $flags = 0; + /** @var array */ + protected array $attributes = []; + /** @var list */ + protected array $constants = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list */ + protected array $attributeGroups = []; + /** @var Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; /** * Creates a class constant builder * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value */ public function __construct($name, $value) { @@ -33,7 +37,7 @@ class ClassConst implements PhpParser\Builder /** * Add another constant to const group * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return $this The builder instance (for fluid interface) @@ -50,7 +54,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -61,7 +65,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -72,7 +76,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -83,7 +87,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } @@ -116,6 +120,19 @@ class ClassConst implements PhpParser\Builder return $this; } + /** + * Sets the constant type. + * + * @param string|Node\Name|Identifier|Node\ComplexType $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + /** * Returns the built class node. * @@ -126,7 +143,8 @@ class ClassConst implements PhpParser\Builder $this->constants, $this->flags, $this->attributes, - $this->attributeGroups + $this->attributeGroups, + $this->type ); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php index 87e2901a..6f394315 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php @@ -4,25 +4,27 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Class_ extends Declaration -{ - protected $name; - - protected $extends = null; - protected $implements = []; - protected $flags = 0; - - protected $uses = []; - protected $constants = []; - protected $properties = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Class_ extends Declaration { + protected string $name; + protected ?Name $extends = null; + /** @var list */ + protected array $implements = []; + protected int $flags = 0; + /** @var list */ + protected array $uses = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $properties = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates a class builder. @@ -67,7 +69,7 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeAbstract() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); return $this; } @@ -78,7 +80,18 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); + + return $this; + } + + /** + * Makes the class readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); return $this; } @@ -93,20 +106,18 @@ class Class_ extends Declaration public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\ClassConst::class => &$this->constants, - Stmt\Property::class => &$this->properties, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } @@ -128,7 +139,7 @@ class Class_ extends Declaration * * @return Stmt\Class_ The built class node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Class_($this->name, [ 'flags' => $this->flags, 'extends' => $this->extends, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php index 83094992..488b7213 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php @@ -5,16 +5,23 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; -abstract class Declaration implements PhpParser\Builder -{ - protected $attributes = []; +abstract class Declaration implements PhpParser\Builder { + /** @var array */ + protected array $attributes = []; + /** + * Adds a statement. + * + * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ abstract public function addStmt($stmt); /** * Adds multiple statements. * - * @param array $stmts The statements to add + * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add * * @return $this The builder instance (for fluid interface) */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php index 02fa83e6..04058bf5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php @@ -10,19 +10,21 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class EnumCase implements PhpParser\Builder -{ +class EnumCase implements PhpParser\Builder { + /** @var Identifier|string */ protected $name; - protected $value = null; - protected $attributes = []; + /** @var ?Node\Expr */ + protected ?Node\Expr $value = null; + /** @var array */ + protected array $attributes = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name */ public function __construct($name) { $this->name = $name; @@ -78,8 +80,8 @@ class EnumCase implements PhpParser\Builder return new Stmt\EnumCase( $this->name, $this->value, - $this->attributes, - $this->attributeGroups + $this->attributeGroups, + $this->attributes ); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php index be7eef95..c00df03f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php @@ -9,20 +9,21 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Enum_ extends Declaration -{ - protected $name; - protected $scalarType = null; - - protected $implements = []; - - protected $uses = []; - protected $enumCases = []; - protected $constants = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Enum_ extends Declaration { + protected string $name; + protected ?Identifier $scalarType = null; + /** @var list */ + protected array $implements = []; + /** @var list */ + protected array $uses = []; + /** @var list */ + protected array $enumCases = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates an enum builder. @@ -36,7 +37,7 @@ class Enum_ extends Declaration /** * Sets the scalar type. * - * @param string|Identifier $type + * @param string|Identifier $scalarType * * @return $this */ @@ -71,20 +72,18 @@ class Enum_ extends Declaration public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\EnumCase::class => &$this->enumCases, - Stmt\ClassConst::class => &$this->constants, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\EnumCase) { + $this->enumCases[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } @@ -106,7 +105,7 @@ class Enum_ extends Declaration * * @return Stmt\Enum_ The built enum node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Enum_($this->name, [ 'scalarType' => $this->scalarType, 'implements' => $this->implements, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php index 98ea9d33..ff79cb6b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -5,13 +5,13 @@ namespace PhpParser\Builder; use PhpParser\BuilderHelpers; use PhpParser\Node; -abstract class FunctionLike extends Declaration -{ - protected $returnByRef = false; - protected $params = []; +abstract class FunctionLike extends Declaration { + protected bool $returnByRef = false; + /** @var Node\Param[] */ + protected array $params = []; - /** @var string|Node\Name|Node\NullableType|null */ - protected $returnType = null; + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $returnType = null; /** * Make the function return by reference. @@ -46,7 +46,7 @@ abstract class FunctionLike extends Declaration /** * Adds multiple parameters. * - * @param array $params The parameters to add + * @param (Node\Param|Param)[] $params The parameters to add * * @return $this The builder instance (for fluid interface) */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php index 1cd73c0d..48f5f693 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php @@ -7,13 +7,13 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Function_ extends FunctionLike -{ - protected $name; - protected $stmts = []; +class Function_ extends FunctionLike { + protected string $name; + /** @var list */ + protected array $stmts = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates a function builder. @@ -55,7 +55,7 @@ class Function_ extends FunctionLike * * @return Stmt\Function_ The built function node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Function_($this->name, [ 'byRef' => $this->returnByRef, 'params' => $this->params, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php index 7806e85f..13dd3f7f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php @@ -8,15 +8,16 @@ use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Interface_ extends Declaration -{ - protected $name; - protected $extends = []; - protected $constants = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Interface_ extends Declaration { + protected string $name; + /** @var list */ + protected array $extends = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates an interface builder. @@ -83,7 +84,7 @@ class Interface_ extends Declaration * * @return Stmt\Interface_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Interface_($this->name, [ 'extends' => $this->extends, 'stmts' => array_merge($this->constants, $this->methods), diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php index 232d7cb8..8358dbe3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php @@ -4,19 +4,20 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Method extends FunctionLike -{ - protected $name; - protected $flags = 0; +class Method extends FunctionLike { + protected string $name; - /** @var array|null */ - protected $stmts = []; + protected int $flags = 0; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list|null */ + protected ?array $stmts = []; + + /** @var list */ + protected array $attributeGroups = []; /** * Creates a method builder. @@ -33,7 +34,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -44,7 +45,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -55,7 +56,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -66,7 +67,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -81,7 +82,7 @@ class Method extends FunctionLike throw new \LogicException('Cannot make method with statements abstract'); } - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); $this->stmts = null; // abstract methods don't have statements return $this; @@ -93,7 +94,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } @@ -133,7 +134,7 @@ class Method extends FunctionLike * * @return Stmt\ClassMethod The built method node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\ClassMethod($this->name, [ 'flags' => $this->flags, 'byRef' => $this->returnByRef, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php index 1c751e16..80fe6f84 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php @@ -7,10 +7,10 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Namespace_ extends Declaration -{ - private $name; - private $stmts = []; +class Namespace_ extends Declaration { + private ?Node\Name $name; + /** @var Stmt[] */ + private array $stmts = []; /** * Creates a namespace builder. @@ -39,7 +39,7 @@ class Namespace_ extends Declaration * * @return Stmt\Namespace_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php index de9aae7e..f439e876 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -4,23 +4,19 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; -class Param implements PhpParser\Builder -{ - protected $name; - - protected $default = null; - - /** @var Node\Identifier|Node\Name|Node\NullableType|null */ - protected $type = null; - - protected $byRef = false; - - protected $variadic = false; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Param implements PhpParser\Builder { + protected string $name; + protected ?Node\Expr $default = null; + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; + protected bool $byRef = false; + protected int $flags = 0; + protected bool $variadic = false; + /** @var list */ + protected array $attributeGroups = []; /** * Creates a parameter builder. @@ -60,19 +56,6 @@ class Param implements PhpParser\Builder return $this; } - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - * - * @deprecated Use setType() instead - */ - public function setTypeHint($type) { - return $this->setType($type); - } - /** * Make the parameter accept the value by reference. * @@ -95,6 +78,50 @@ class Param implements PhpParser\Builder return $this; } + /** + * Makes the (promoted) parameter public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the (promoted) parameter protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the (promoted) parameter private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + + /** + * Makes the (promoted) parameter readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); + + return $this; + } + /** * Adds an attribute group. * @@ -113,10 +140,10 @@ class Param implements PhpParser\Builder * * @return Node\Param The built parameter node */ - public function getNode() : Node { + public function getNode(): Node { return new Node\Param( new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups + $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups ); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php index 68e31856..3fc96d98 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -4,25 +4,25 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\ComplexType; -class Property implements PhpParser\Builder -{ - protected $name; +class Property implements PhpParser\Builder { + protected string $name; - protected $flags = 0; - protected $default = null; - protected $attributes = []; + protected int $flags = 0; - /** @var null|Identifier|Name|NullableType */ - protected $type; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + protected ?Node\Expr $default = null; + /** @var array */ + protected array $attributes = []; + /** @var null|Identifier|Name|ComplexType */ + protected ?Node $type = null; + /** @var list */ + protected array $attributeGroups = []; /** * Creates a property builder. @@ -39,7 +39,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -50,7 +50,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -61,7 +61,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -72,7 +72,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -83,7 +83,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); return $this; } @@ -147,11 +147,11 @@ class Property implements PhpParser\Builder * * @return Stmt\Property The built property node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, + $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ - new Stmt\PropertyProperty($this->name, $this->default) + new Node\PropertyItem($this->name, $this->default) ], $this->attributes, $this->type, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php index 311e8cd7..cf21c821 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php @@ -7,10 +7,11 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUse implements Builder -{ - protected $traits = []; - protected $adaptations = []; +class TraitUse implements Builder { + /** @var Node\Name[] */ + protected array $traits = []; + /** @var Stmt\TraitUseAdaptation[] */ + protected array $adaptations = []; /** * Creates a trait use builder. @@ -58,7 +59,7 @@ class TraitUse implements Builder * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\TraitUse($this->traits, $this->adaptations); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php index eb6c0b62..fee09583 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -4,43 +4,40 @@ namespace PhpParser\Builder; use PhpParser\Builder; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUseAdaptation implements Builder -{ - const TYPE_UNDEFINED = 0; - const TYPE_ALIAS = 1; - const TYPE_PRECEDENCE = 2; +class TraitUseAdaptation implements Builder { + private const TYPE_UNDEFINED = 0; + private const TYPE_ALIAS = 1; + private const TYPE_PRECEDENCE = 2; - /** @var int Type of building adaptation */ - protected $type; - - protected $trait; - protected $method; - - protected $modifier = null; - protected $alias = null; - - protected $insteadof = []; + protected int $type; + protected ?Node\Name $trait; + protected Node\Identifier $method; + protected ?int $modifier = null; + protected ?Node\Identifier $alias = null; + /** @var Node\Name[] */ + protected array $insteadof = []; /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Name of adaptated trait - * @param Node\Identifier|string $method Name of adaptated method + * @param Node\Name|string|null $trait Name of adapted trait + * @param Node\Identifier|string $method Name of adapted method */ public function __construct($trait, $method) { $this->type = self::TYPE_UNDEFINED; - $this->trait = is_null($trait)? null: BuilderHelpers::normalizeName($trait); + $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); $this->method = BuilderHelpers::normalizeIdentifier($method); } /** * Sets alias of method. * - * @param Node\Identifier|string $alias Alias for adaptated method + * @param Node\Identifier|string $alias Alias for adapted method * * @return $this The builder instance (for fluid interface) */ @@ -53,37 +50,37 @@ class TraitUseAdaptation implements Builder throw new \LogicException('Cannot set alias for not alias adaptation buider'); } - $this->alias = $alias; + $this->alias = BuilderHelpers::normalizeIdentifier($alias); return $this; } /** - * Sets adaptated method public. + * Sets adapted method public. * * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); + $this->setModifier(Modifiers::PUBLIC); return $this; } /** - * Sets adaptated method protected. + * Sets adapted method protected. * * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); + $this->setModifier(Modifiers::PROTECTED); return $this; } /** - * Sets adaptated method private. + * Sets adapted method private. * * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); + $this->setModifier(Modifiers::PRIVATE); return $this; } @@ -114,7 +111,7 @@ class TraitUseAdaptation implements Builder return $this; } - protected function setModifier(int $modifier) { + protected function setModifier(int $modifier): void { if ($this->type === self::TYPE_UNDEFINED) { $this->type = self::TYPE_ALIAS; } @@ -135,7 +132,7 @@ class TraitUseAdaptation implements Builder * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { switch ($this->type) { case self::TYPE_ALIAS: return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php index 97f32f98..ffa1bd5c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -7,15 +7,18 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Trait_ extends Declaration -{ - protected $name; - protected $uses = []; - protected $properties = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Trait_ extends Declaration { + protected string $name; + /** @var list */ + protected array $uses = []; + /** @var list */ + protected array $constants = []; + /** @var list */ + protected array $properties = []; + /** @var list */ + protected array $methods = []; + /** @var list */ + protected array $attributeGroups = []; /** * Creates an interface builder. @@ -42,6 +45,8 @@ class Trait_ extends Declaration $this->methods[] = $stmt; } elseif ($stmt instanceof Stmt\TraitUse) { $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } @@ -67,10 +72,10 @@ class Trait_ extends Declaration * * @return Stmt\Trait_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Trait_( $this->name, [ - 'stmts' => array_merge($this->uses, $this->properties, $this->methods), + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups, ], $this->attributes ); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php index 4bd3d12d..b82cf139 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php @@ -7,17 +7,17 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Use_ implements Builder -{ - protected $name; - protected $type; - protected $alias = null; +class Use_ implements Builder { + protected Node\Name $name; + /** @var Stmt\Use_::TYPE_* */ + protected int $type; + protected ?string $alias = null; /** * Creates a name use (alias) builder. * * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias - * @param int $type One of the Stmt\Use_::TYPE_* constants + * @param Stmt\Use_::TYPE_* $type One of the Stmt\Use_::TYPE_* constants */ public function __construct($name, int $type) { $this->name = BuilderHelpers::normalizeName($name); @@ -41,9 +41,9 @@ class Use_ implements Builder * * @return Stmt\Use_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Use_([ - new Stmt\UseUse($this->name, $this->alias) + new Node\UseItem($this->name, $this->alias) ], $this->type); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php index fef2579b..b7efe5e9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -10,17 +10,14 @@ use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Use_; -class BuilderFactory -{ +class BuilderFactory { /** * Creates an attribute node. * * @param string|Name $name Name of the attribute - * @param array $args Attribute named arguments - * - * @return Node\Attribute + * @param array $args Attribute named arguments */ - public function attribute($name, array $args = []) : Node\Attribute { + public function attribute($name, array $args = []): Node\Attribute { return new Node\Attribute( BuilderHelpers::normalizeName($name), $this->args($args) @@ -34,7 +31,7 @@ class BuilderFactory * * @return Builder\Namespace_ The created namespace builder */ - public function namespace($name) : Builder\Namespace_ { + public function namespace($name): Builder\Namespace_ { return new Builder\Namespace_($name); } @@ -45,7 +42,7 @@ class BuilderFactory * * @return Builder\Class_ The created class builder */ - public function class(string $name) : Builder\Class_ { + public function class(string $name): Builder\Class_ { return new Builder\Class_($name); } @@ -56,7 +53,7 @@ class BuilderFactory * * @return Builder\Interface_ The created interface builder */ - public function interface(string $name) : Builder\Interface_ { + public function interface(string $name): Builder\Interface_ { return new Builder\Interface_($name); } @@ -67,7 +64,7 @@ class BuilderFactory * * @return Builder\Trait_ The created trait builder */ - public function trait(string $name) : Builder\Trait_ { + public function trait(string $name): Builder\Trait_ { return new Builder\Trait_($name); } @@ -78,7 +75,7 @@ class BuilderFactory * * @return Builder\Enum_ The created enum builder */ - public function enum(string $name) : Builder\Enum_ { + public function enum(string $name): Builder\Enum_ { return new Builder\Enum_($name); } @@ -87,21 +84,21 @@ class BuilderFactory * * @param Node\Name|string ...$traits Trait names * - * @return Builder\TraitUse The create trait use builder + * @return Builder\TraitUse The created trait use builder */ - public function useTrait(...$traits) : Builder\TraitUse { + public function useTrait(...$traits): Builder\TraitUse { return new Builder\TraitUse(...$traits); } /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Trait name + * @param Node\Name|string|null $trait Trait name * @param Node\Identifier|string $method Method name * - * @return Builder\TraitUseAdaptation The create trait use adaptation builder + * @return Builder\TraitUseAdaptation The created trait use adaptation builder */ - public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { + public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { if ($method === null) { $method = $trait; $trait = null; @@ -117,7 +114,7 @@ class BuilderFactory * * @return Builder\Method The created method builder */ - public function method(string $name) : Builder\Method { + public function method(string $name): Builder\Method { return new Builder\Method($name); } @@ -128,7 +125,7 @@ class BuilderFactory * * @return Builder\Param The created parameter builder */ - public function param(string $name) : Builder\Param { + public function param(string $name): Builder\Param { return new Builder\Param($name); } @@ -139,7 +136,7 @@ class BuilderFactory * * @return Builder\Property The created property builder */ - public function property(string $name) : Builder\Property { + public function property(string $name): Builder\Property { return new Builder\Property($name); } @@ -150,7 +147,7 @@ class BuilderFactory * * @return Builder\Function_ The created function builder */ - public function function(string $name) : Builder\Function_ { + public function function(string $name): Builder\Function_ { return new Builder\Function_($name); } @@ -161,7 +158,7 @@ class BuilderFactory * * @return Builder\Use_ The created use builder */ - public function use($name) : Builder\Use_ { + public function use($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_NORMAL); } @@ -172,7 +169,7 @@ class BuilderFactory * * @return Builder\Use_ The created use function builder */ - public function useFunction($name) : Builder\Use_ { + public function useFunction($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_FUNCTION); } @@ -183,30 +180,30 @@ class BuilderFactory * * @return Builder\Use_ The created use const builder */ - public function useConst($name) : Builder\Use_ { + public function useConst($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_CONSTANT); } /** * Creates a class constant builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return Builder\ClassConst The created use const builder */ - public function classConst($name, $value) : Builder\ClassConst { + public function classConst($name, $value): Builder\ClassConst { return new Builder\ClassConst($name, $value); } /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * * @return Builder\EnumCase The created use const builder */ - public function enumCase($name) : Builder\EnumCase { + public function enumCase($name): Builder\EnumCase { return new Builder\EnumCase($name); } @@ -214,10 +211,8 @@ class BuilderFactory * Creates node a for a literal value. * * @param Expr|bool|null|int|float|string|array $value $value - * - * @return Expr */ - public function val($value) : Expr { + public function val($value): Expr { return BuilderHelpers::normalizeValue($value); } @@ -225,10 +220,8 @@ class BuilderFactory * Creates variable node. * * @param string|Expr $name Name - * - * @return Expr\Variable */ - public function var($name) : Expr\Variable { + public function var($name): Expr\Variable { if (!\is_string($name) && !$name instanceof Expr) { throw new \LogicException('Variable name must be string or Expr'); } @@ -243,9 +236,9 @@ class BuilderFactory * * @param array $args List of arguments to normalize * - * @return Arg[] + * @return list */ - public function args(array $args) : array { + public function args(array $args): array { $normalizedArgs = []; foreach ($args as $key => $arg) { if (!($arg instanceof Arg)) { @@ -263,11 +256,9 @@ class BuilderFactory * Creates a function call node. * * @param string|Name|Expr $name Function name - * @param array $args Function arguments - * - * @return Expr\FuncCall + * @param array $args Function arguments */ - public function funcCall($name, array $args = []) : Expr\FuncCall { + public function funcCall($name, array $args = []): Expr\FuncCall { return new Expr\FuncCall( BuilderHelpers::normalizeNameOrExpr($name), $this->args($args) @@ -277,13 +268,11 @@ class BuilderFactory /** * Creates a method call node. * - * @param Expr $var Variable the method is called on + * @param Expr $var Variable the method is called on * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\MethodCall + * @param array $args Method arguments */ - public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { + public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { return new Expr\MethodCall( $var, BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -294,13 +283,11 @@ class BuilderFactory /** * Creates a static method call node. * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\StaticCall + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Method arguments */ - public function staticCall($class, $name, array $args = []) : Expr\StaticCall { + public function staticCall($class, $name, array $args = []): Expr\StaticCall { return new Expr\StaticCall( BuilderHelpers::normalizeNameOrExpr($class), BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -312,11 +299,9 @@ class BuilderFactory * Creates an object creation node. * * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments - * - * @return Expr\New_ + * @param array $args Constructor arguments */ - public function new($class, array $args = []) : Expr\New_ { + public function new($class, array $args = []): Expr\New_ { return new Expr\New_( BuilderHelpers::normalizeNameOrExpr($class), $this->args($args) @@ -327,37 +312,31 @@ class BuilderFactory * Creates a constant fetch node. * * @param string|Name $name Constant name - * - * @return Expr\ConstFetch */ - public function constFetch($name) : Expr\ConstFetch { + public function constFetch($name): Expr\ConstFetch { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); } /** * Creates a property fetch node. * - * @param Expr $var Variable holding object + * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name - * - * @return Expr\PropertyFetch */ - public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { + public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); } /** * Creates a class constant fetch node. * - * @param string|Name|Expr $class Class name - * @param string|Identifier $name Constant name - * - * @return Expr\ClassConstFetch + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Constant name */ public function classConstFetch($class, $name): Expr\ClassConstFetch { return new Expr\ClassConstFetch( BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifier($name) + BuilderHelpers::normalizeIdentifierOrExpr($name) ); } @@ -365,10 +344,8 @@ class BuilderFactory * Creates nested Concat nodes from a list of expressions. * * @param Expr|string ...$exprs Expressions or literal strings - * - * @return Concat */ - public function concat(...$exprs) : Concat { + public function concat(...$exprs): Concat { $numExprs = count($exprs); if ($numExprs < 2) { throw new \LogicException('Expected at least two expressions'); @@ -383,9 +360,8 @@ class BuilderFactory /** * @param string|Expr $expr - * @return Expr */ - private function normalizeStringExpr($expr) : Expr { + private function normalizeStringExpr($expr): Expr { if ($expr instanceof Expr) { return $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php index 2f0e9127..3e41b26f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -15,8 +15,7 @@ use PhpParser\Node\Stmt; * * @internal */ -final class BuilderHelpers -{ +final class BuilderHelpers { /** * Normalizes a node: Converts builder objects to nodes. * @@ -24,7 +23,7 @@ final class BuilderHelpers * * @return Node The normalized node */ - public static function normalizeNode($node) : Node { + public static function normalizeNode($node): Node { if ($node instanceof Builder) { return $node->getNode(); } @@ -45,7 +44,7 @@ final class BuilderHelpers * * @return Stmt The normalized statement node */ - public static function normalizeStmt($node) : Stmt { + public static function normalizeStmt($node): Stmt { $node = self::normalizeNode($node); if ($node instanceof Stmt) { return $node; @@ -65,7 +64,7 @@ final class BuilderHelpers * * @return Identifier The normalized identifier */ - public static function normalizeIdentifier($name) : Identifier { + public static function normalizeIdentifier($name): Identifier { if ($name instanceof Identifier) { return $name; } @@ -103,7 +102,7 @@ final class BuilderHelpers * * @return Name The normalized name */ - public static function normalizeName($name) : Name { + public static function normalizeName($name): Name { if ($name instanceof Name) { return $name; } @@ -178,7 +177,20 @@ final class BuilderHelpers } $builtinTypes = [ - 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never', + 'array', + 'callable', + 'bool', + 'int', + 'float', + 'string', + 'iterable', + 'void', + 'object', + 'null', + 'false', + 'mixed', + 'never', + 'true', ]; $lowerType = strtolower($type); @@ -206,7 +218,7 @@ final class BuilderHelpers * * @return Expr The normalized value */ - public static function normalizeValue($value) : Expr { + public static function normalizeValue($value): Expr { if ($value instanceof Node\Expr) { return $value; } @@ -224,11 +236,11 @@ final class BuilderHelpers } if (is_int($value)) { - return new Scalar\LNumber($value); + return new Scalar\Int_($value); } if (is_float($value)) { - return new Scalar\DNumber($value); + return new Scalar\Float_($value); } if (is_string($value)) { @@ -241,12 +253,12 @@ final class BuilderHelpers foreach ($value as $itemKey => $itemValue) { // for consecutive, numeric keys don't generate keys if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue) ); } else { $lastKey = null; - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue), self::normalizeValue($itemKey) ); @@ -266,7 +278,7 @@ final class BuilderHelpers * * @return Comment\Doc The normalized doc comment */ - public static function normalizeDocComment($docComment) : Comment\Doc { + public static function normalizeDocComment($docComment): Comment\Doc { if ($docComment instanceof Comment\Doc) { return $docComment; } @@ -285,8 +297,7 @@ final class BuilderHelpers * * @return Node\AttributeGroup The Attribute Group */ - public static function normalizeAttribute($attribute) : Node\AttributeGroup - { + public static function normalizeAttribute($attribute): Node\AttributeGroup { if ($attribute instanceof Node\AttributeGroup) { return $attribute; } @@ -302,12 +313,21 @@ final class BuilderHelpers * Adds a modifier and returns new modifier bitmask. * * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set + * @param int $modifier Modifier to set * * @return int New modifiers */ - public static function addModifier(int $modifiers, int $modifier) : int { - Stmt\Class_::verifyModifier($modifiers, $modifier); + public static function addModifier(int $modifiers, int $modifier): int { + Modifiers::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } + + /** + * Adds a modifier and returns new modifier bitmask. + * @return int New modifiers + */ + public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { + Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); + return $existingModifiers | $modifierToSet; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php index 61e98d3d..17dc4c73 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment.php @@ -2,23 +2,22 @@ namespace PhpParser; -class Comment implements \JsonSerializable -{ - protected $text; - protected $startLine; - protected $startFilePos; - protected $startTokenPos; - protected $endLine; - protected $endFilePos; - protected $endTokenPos; +class Comment implements \JsonSerializable { + protected string $text; + protected int $startLine; + protected int $startFilePos; + protected int $startTokenPos; + protected int $endLine; + protected int $endFilePos; + protected int $endTokenPos; /** * Constructs a comment node. * - * @param string $text Comment text (including comment delimiters like /*) - * @param int $startLine Line number the comment started on - * @param int $startFilePos File offset the comment started on - * @param int $startTokenPos Token offset the comment started on + * @param string $text Comment text (including comment delimiters like /*) + * @param int $startLine Line number the comment started on + * @param int $startFilePos File offset the comment started on + * @param int $startTokenPos Token offset the comment started on */ public function __construct( string $text, @@ -39,7 +38,7 @@ class Comment implements \JsonSerializable * * @return string The comment text (including comment delimiters like /*) */ - public function getText() : string { + public function getText(): string { return $this->text; } @@ -48,7 +47,7 @@ class Comment implements \JsonSerializable * * @return int Line number (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->startLine; } @@ -57,7 +56,7 @@ class Comment implements \JsonSerializable * * @return int File offset (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->startFilePos; } @@ -66,7 +65,7 @@ class Comment implements \JsonSerializable * * @return int Token offset (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->startTokenPos; } @@ -75,7 +74,7 @@ class Comment implements \JsonSerializable * * @return int Line number (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->endLine; } @@ -84,7 +83,7 @@ class Comment implements \JsonSerializable * * @return int File offset (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->endFilePos; } @@ -93,49 +92,16 @@ class Comment implements \JsonSerializable * * @return int Token offset (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->endTokenPos; } - /** - * Gets the line number the comment started on. - * - * @deprecated Use getStartLine() instead - * - * @return int Line number - */ - public function getLine() : int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @deprecated Use getStartFilePos() instead - * - * @return int File offset - */ - public function getFilePos() : int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @deprecated Use getStartTokenPos() instead - * - * @return int Token offset - */ - public function getTokenPos() : int { - return $this->startTokenPos; - } - /** * Gets the comment text. * * @return string The comment text (including comment delimiters like /*) */ - public function __toString() : string { + public function __toString(): string { return $this->text; } @@ -144,18 +110,19 @@ class Comment implements \JsonSerializable * * "Reformatted" here means that we try to clean up the whitespace at the * starts of the lines. This is necessary because we receive the comments - * without trailing whitespace on the first line, but with trailing whitespace + * without leading whitespace on the first line, but with leading whitespace * on all subsequent lines. * - * @return mixed|string + * Additionally, this normalizes CRLF newlines to LF newlines. */ - public function getReformattedText() { - $text = trim($this->text); + public function getReformattedText(): string { + $text = str_replace("\r\n", "\n", $this->text); $newlinePos = strpos($text, "\n"); if (false === $newlinePos) { // Single line comments don't need further processing return $text; - } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { + } + if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { // Multi line comment of the type // // /* @@ -164,8 +131,9 @@ class Comment implements \JsonSerializable // */ // // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $this->text); - } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + return preg_replace('(^\s+\*)m', ' *', $text); + } + if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { // Multi line comment of the type // // /* @@ -177,7 +145,8 @@ class Comment implements \JsonSerializable // */ on all lines. So if the last line is " */", then " " is removed at the // start of all lines. return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); - } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { + } + if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { // Multi line comment of the type // // /* Some text. @@ -204,9 +173,9 @@ class Comment implements \JsonSerializable * @param string $str String to check * @return int Length in characters. Tabs count as single characters. */ - private function getShortestWhitespacePrefixLen(string $str) : int { + private function getShortestWhitespacePrefixLen(string $str): int { $lines = explode("\n", $str); - $shortestPrefixLen = \INF; + $shortestPrefixLen = \PHP_INT_MAX; foreach ($lines as $line) { preg_match('(^\s*)', $line, $matches); $prefixLen = strlen($matches[0]); @@ -218,10 +187,9 @@ class Comment implements \JsonSerializable } /** - * @return array - * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} + * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { // Technically not a node, but we make it look like one anyway $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; return [ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php index a9db6128..bb3e9146 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php @@ -2,6 +2,5 @@ namespace PhpParser\Comment; -class Doc extends \PhpParser\Comment -{ +class Doc extends \PhpParser\Comment { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php index 49c92d59..7964058a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php @@ -1,6 +1,6 @@ -fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) { + public function __construct(?callable $fallbackEvaluator = null) { + $this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { throw new ConstExprEvaluationException( "Expression of type {$expr->getType()} cannot be evaluated" ); @@ -63,7 +64,7 @@ class ConstExprEvaluator * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred */ public function evaluateSilently(Expr $expr) { - set_error_handler(function($num, $str, $file, $line) { + set_error_handler(function ($num, $str, $file, $line) { throw new \ErrorException($str, 0, $num, $file, $line); }); @@ -101,9 +102,10 @@ class ConstExprEvaluator return $this->evaluate($expr); } + /** @return mixed */ private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\LNumber - || $expr instanceof Scalar\DNumber + if ($expr instanceof Scalar\Int_ + || $expr instanceof Scalar\Float_ || $expr instanceof Scalar\String_ ) { return $expr->value; @@ -146,7 +148,7 @@ class ConstExprEvaluator return ($this->fallbackEvaluator)($expr); } - private function evaluateArray(Expr\Array_ $expr) { + private function evaluateArray(Expr\Array_ $expr): array { $array = []; foreach ($expr->items as $item) { if (null !== $item->key) { @@ -160,6 +162,7 @@ class ConstExprEvaluator return $array; } + /** @return mixed */ private function evaluateTernary(Expr\Ternary $expr) { if (null === $expr->if) { return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); @@ -170,6 +173,7 @@ class ConstExprEvaluator : $this->evaluate($expr->else); } + /** @return mixed */ private function evaluateBinaryOp(Expr\BinaryOp $expr) { if ($expr instanceof Expr\BinaryOp\Coalesce && $expr->left instanceof Expr\ArrayDimFetch @@ -216,6 +220,7 @@ class ConstExprEvaluator throw new \Exception('Should not happen'); } + /** @return mixed */ private function evaluateConstFetch(Expr\ConstFetch $expr) { $name = $expr->name->toLowerString(); switch ($name) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php index d1fb959d..02feace0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Error.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Error.php @@ -2,25 +2,20 @@ namespace PhpParser; -class Error extends \RuntimeException -{ - protected $rawMessage; - protected $attributes; +class Error extends \RuntimeException { + protected string $rawMessage; + /** @var array */ + protected array $attributes; /** * Creates an Exception signifying a parse error. * - * @param string $message Error message - * @param array|int $attributes Attributes of node/token where error occurred - * (or start line of error -- deprecated) + * @param string $message Error message + * @param array $attributes Attributes of node/token where error occurred */ - public function __construct(string $message, $attributes = []) { + public function __construct(string $message, array $attributes = []) { $this->rawMessage = $message; - if (is_array($attributes)) { - $this->attributes = $attributes; - } else { - $this->attributes = ['startLine' => $attributes]; - } + $this->attributes = $attributes; $this->updateMessage(); } @@ -29,7 +24,7 @@ class Error extends \RuntimeException * * @return string Error message */ - public function getRawMessage() : string { + public function getRawMessage(): string { return $this->rawMessage; } @@ -38,7 +33,7 @@ class Error extends \RuntimeException * * @return int Error start line */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -47,25 +42,25 @@ class Error extends \RuntimeException * * @return int Error end line */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } /** * Gets the attributes of the node/token the error occurred at. * - * @return array + * @return array */ - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } /** * Sets the attributes of the node/token the error occurred at. * - * @param array $attributes + * @param array $attributes */ - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; $this->updateMessage(); } @@ -75,7 +70,7 @@ class Error extends \RuntimeException * * @param string $message Error message */ - public function setRawMessage(string $message) { + public function setRawMessage(string $message): void { $this->rawMessage = $message; $this->updateMessage(); } @@ -85,7 +80,7 @@ class Error extends \RuntimeException * * @param int $line Error start line */ - public function setStartLine(int $line) { + public function setStartLine(int $line): void { $this->attributes['startLine'] = $line; $this->updateMessage(); } @@ -94,10 +89,8 @@ class Error extends \RuntimeException * Returns whether the error has start and end column information. * * For column information enable the startFilePos and endFilePos in the lexer options. - * - * @return bool */ - public function hasColumnInfo() : bool { + public function hasColumnInfo(): bool { return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); } @@ -105,9 +98,8 @@ class Error extends \RuntimeException * Gets the start column (1-based) into the line where the error started. * * @param string $code Source code of the file - * @return int */ - public function getStartColumn(string $code) : int { + public function getStartColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -119,9 +111,8 @@ class Error extends \RuntimeException * Gets the end column (1-based) into the line where the error ended. * * @param string $code Source code of the file - * @return int */ - public function getEndColumn(string $code) : int { + public function getEndColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -136,7 +127,7 @@ class Error extends \RuntimeException * * @return string Formatted message */ - public function getMessageWithColumnInfo(string $code) : string { + public function getMessageWithColumnInfo(string $code): string { return sprintf( '%s from %d:%d to %d:%d', $this->getRawMessage(), $this->getStartLine(), $this->getStartColumn($code), @@ -148,11 +139,11 @@ class Error extends \RuntimeException * Converts a file offset into a column. * * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code + * @param int $pos 0-based position in $code * * @return int 1-based column (relative to start of line) */ - private function toColumn(string $code, int $pos) : int { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } @@ -168,7 +159,7 @@ class Error extends \RuntimeException /** * Updates the exception message after a change to rawMessage or rawLine. */ - protected function updateMessage() { + protected function updateMessage(): void { $this->message = $this->rawMessage; if (-1 === $this->getStartLine()) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php index d620e745..51ad730c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php @@ -2,12 +2,11 @@ namespace PhpParser; -interface ErrorHandler -{ +interface ErrorHandler { /** * Handle an error generated during lexing, parsing or some other operation. * * @param Error $error The error that needs to be handled */ - public function handleError(Error $error); + public function handleError(Error $error): void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php index 784b61b1..eee63492 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php @@ -10,12 +10,11 @@ use PhpParser\ErrorHandler; * * This allows graceful handling of errors. */ -class Collecting implements ErrorHandler -{ +class Collecting implements ErrorHandler { /** @var Error[] Collected errors */ - private $errors = []; + private array $errors = []; - public function handleError(Error $error) { + public function handleError(Error $error): void { $this->errors[] = $error; } @@ -24,23 +23,21 @@ class Collecting implements ErrorHandler * * @return Error[] */ - public function getErrors() : array { + public function getErrors(): array { return $this->errors; } /** * Check whether there are any errors. - * - * @return bool */ - public function hasErrors() : bool { + public function hasErrors(): bool { return !empty($this->errors); } /** * Reset/clear collected errors. */ - public function clearErrors() { + public function clearErrors(): void { $this->errors = []; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php index aeee989b..dff33dd0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php @@ -10,9 +10,8 @@ use PhpParser\ErrorHandler; * * This is the default strategy used by all components. */ -class Throwing implements ErrorHandler -{ - public function handleError(Error $error) { +class Throwing implements ErrorHandler { + public function handleError(Error $error): void { throw $error; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php index a38b57ba..7433b5d3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php @@ -5,20 +5,24 @@ namespace PhpParser\Internal; /** * @internal */ -class DiffElem -{ - const TYPE_KEEP = 0; - const TYPE_REMOVE = 1; - const TYPE_ADD = 2; - const TYPE_REPLACE = 3; +class DiffElem { + public const TYPE_KEEP = 0; + public const TYPE_REMOVE = 1; + public const TYPE_ADD = 2; + public const TYPE_REPLACE = 3; /** @var int One of the TYPE_* constants */ - public $type; + public int $type; /** @var mixed Is null for add operations */ public $old; /** @var mixed Is null for remove operations */ public $new; + /** + * @param int $type One of the TYPE_* constants + * @param mixed $old Is null for add operations + * @param mixed $new Is null for remove operations + */ public function __construct(int $type, $old, $new) { $this->type = $type; $this->old = $old; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php index 7f218c74..253e1757 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php @@ -8,16 +8,17 @@ namespace PhpParser\Internal; * Myers, Eugene W. "An O (ND) difference algorithm and its variations." * Algorithmica 1.1 (1986): 251-266. * + * @template T * @internal */ -class Differ -{ +class Differ { + /** @var callable(T, T): bool */ private $isEqual; /** * Create differ over the given equality relation. * - * @param callable $isEqual Equality relation with signature function($a, $b) : bool + * @param callable(T, T): bool $isEqual Equality relation */ public function __construct(callable $isEqual) { $this->isEqual = $isEqual; @@ -26,12 +27,14 @@ class Differ /** * Calculate diff (edit script) from $old to $new. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script) */ - public function diff(array $old, array $new) { + public function diff(array $old, array $new): array { + $old = \array_values($old); + $new = \array_values($new); list($trace, $x, $y) = $this->calculateTrace($old, $new); return $this->extractDiff($trace, $x, $y, $old, $new); } @@ -42,32 +45,37 @@ class Differ * If a sequence of remove operations is followed by the same number of add operations, these * will be coalesced into replace operations. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script), including replace operations */ - public function diffWithReplacements(array $old, array $new) { + public function diffWithReplacements(array $old, array $new): array { return $this->coalesceReplacements($this->diff($old, $new)); } - private function calculateTrace(array $a, array $b) { - $n = \count($a); - $m = \count($b); + /** + * @param T[] $old + * @param T[] $new + * @return array{array>, int, int} + */ + private function calculateTrace(array $old, array $new): array { + $n = \count($old); + $m = \count($new); $max = $n + $m; $v = [1 => 0]; $trace = []; for ($d = 0; $d <= $max; $d++) { $trace[] = $v; for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { - $x = $v[$k+1]; + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + $x = $v[$k + 1]; } else { - $x = $v[$k-1] + 1; + $x = $v[$k - 1] + 1; } $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { + while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { $x++; $y++; } @@ -81,13 +89,19 @@ class Differ throw new \Exception('Should not happen'); } - private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { + /** + * @param array> $trace + * @param T[] $old + * @param T[] $new + * @return DiffElem[] + */ + private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { $result = []; for ($d = \count($trace) - 1; $d >= 0; $d--) { $v = $trace[$d]; $k = $x - $y; - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { $prevK = $k + 1; } else { $prevK = $k - 1; @@ -97,7 +111,7 @@ class Differ $prevY = $prevX - $prevK; while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); $x--; $y--; } @@ -107,12 +121,12 @@ class Differ } while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); $x--; } while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); $y--; } } @@ -125,7 +139,7 @@ class Differ * @param DiffElem[] $diff * @return DiffElem[] */ - private function coalesceReplacements(array $diff) { + private function coalesceReplacements(array $diff): array { $newDiff = []; $c = \count($diff); for ($i = 0; $i < $c; $i++) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 3eeac04a..b30a99a1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -15,47 +15,57 @@ use PhpParser\Node\Expr; * * @internal */ -class PrintableNewAnonClassNode extends Expr -{ +class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; - /** @var Node\Arg[] Arguments */ - public $args; + public array $attrGroups; + /** @var int Modifiers */ + public int $flags; + /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ + public array $args; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; + /** + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param (Node\Arg|Node\VariadicPlaceholder)[] $args Arguments + * @param Node\Name|null $extends Name of extended class + * @param Node\Name[] $implements Names of implemented interfaces + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Attributes + */ public function __construct( - array $attrGroups, array $args, Node\Name $extends = null, array $implements, + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes ) { parent::__construct($attributes); $this->attrGroups = $attrGroups; + $this->flags = $flags; $this->args = $args; $this->extends = $extends; $this->implements = $implements; $this->stmts = $stmts; } - public static function fromNewNode(Expr\New_ $newNode) { + public static function fromNewNode(Expr\New_ $newNode): self { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); // We don't assert that $class->name is null here, to allow consumers to assign unique names // to anonymous classes for their own purposes. We simplify ignore the name here. return new self( - $class->attrGroups, $newNode->args, $class->extends, $class->implements, + $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes() ); } - public function getType() : string { + public function getType(): string { return 'Expr_PrintableNewAnonClass'; } - public function getSubNodeNames() : array { - return ['attrGroups', 'args', 'extends', 'implements', 'stmts']; + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php index 84c0175e..c02844ac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php @@ -2,22 +2,23 @@ namespace PhpParser\Internal; +use PhpParser\Token; + /** * Provides operations on token streams, for use by pretty printer. * * @internal */ -class TokenStream -{ - /** @var array Tokens (in token_get_all format) */ - private $tokens; +class TokenStream { + /** @var Token[] Tokens (in PhpToken::tokenize() format) */ + private array $tokens; /** @var int[] Map from position to indentation */ - private $indentMap; + private array $indentMap; /** * Create token stream instance. * - * @param array $tokens Tokens in token_get_all() format + * @param Token[] $tokens Tokens in PhpToken::tokenize() format */ public function __construct(array $tokens) { $this->tokens = $tokens; @@ -28,11 +29,9 @@ class TokenStream * Whether the given position is immediately surrounded by parenthesis. * * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool + * @param int $endPos End position */ - public function haveParens(int $startPos, int $endPos) : bool { + public function haveParens(int $startPos, int $endPos): bool { return $this->haveTokenImmediatelyBefore($startPos, '(') && $this->haveTokenImmediatelyAfter($endPos, ')'); } @@ -41,11 +40,9 @@ class TokenStream * Whether the given position is immediately surrounded by braces. * * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool + * @param int $endPos End position */ - public function haveBraces(int $startPos, int $endPos) : bool { + public function haveBraces(int $startPos, int $endPos): bool { return ($this->haveTokenImmediatelyBefore($startPos, '{') || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) && $this->haveTokenImmediatelyAfter($endPos, '}'); @@ -56,21 +53,20 @@ class TokenStream * * During this check whitespace and comments are skipped. * - * @param int $pos Position before which the token should occur + * @param int $pos Position before which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos--; for (; $pos >= 0; $pos--) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } @@ -82,28 +78,28 @@ class TokenStream * * During this check whitespace and comments are skipped. * - * @param int $pos Position after which the token should occur + * @param int $pos Position after which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos++; - for (; $pos < \count($tokens); $pos++) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + for ($c = \count($tokens); $pos < $c; $pos++) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } return false; } - public function skipLeft(int $pos, $skipTokenType) { + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipLeft(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipLeftWhitespace($pos); @@ -111,7 +107,7 @@ class TokenStream return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -120,7 +116,8 @@ class TokenStream return $this->skipLeftWhitespace($pos); } - public function skipRight(int $pos, $skipTokenType) { + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipRight(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipRightWhitespace($pos); @@ -128,7 +125,7 @@ class TokenStream return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -143,11 +140,10 @@ class TokenStream * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipLeftWhitespace(int $pos) { + public function skipLeftWhitespace(int $pos): int { $tokens = $this->tokens; for (; $pos >= 0; $pos--) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } @@ -160,22 +156,21 @@ class TokenStream * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipRightWhitespace(int $pos) { + public function skipRightWhitespace(int $pos): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } return $pos; } - public function findRight(int $pos, $findTokenType) { + /** @param int|string|(int|string)[] $findTokenType */ + public function findRight(int $pos, $findTokenType): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type === $findTokenType) { + if ($tokens[$pos]->is($findTokenType)) { return $pos; } } @@ -190,20 +185,19 @@ class TokenStream * @param int|string $tokenType Token type to look for * @return bool Whether the token occurs in the given range */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType) { + public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { $tokens = $this->tokens; for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos][0] === $tokenType) { + if ($tokens[$pos]->is($tokenType)) { return true; } } return false; } - public function haveBracesInRange(int $startPos, int $endPos) { - return $this->haveTokenInRange($startPos, $endPos, '{') - || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) - || $this->haveTokenInRange($startPos, $endPos, '}'); + public function haveTagInRange(int $startPos, int $endPos): bool { + return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) + || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); } /** @@ -213,41 +207,37 @@ class TokenStream * * @return int Indentation depth (in spaces) */ - public function getIndentationBefore(int $pos) : int { + public function getIndentationBefore(int $pos): int { return $this->indentMap[$pos]; } /** * Get the code corresponding to a token offset range, optionally adjusted for indentation. * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) + * @param int $from Token start position (inclusive) + * @param int $to Token end position (exclusive) * @param int $indent By how much the code should be indented (can be negative as well) * * @return string Code corresponding to token range, adjusted for indentation */ - public function getTokenCode(int $from, int $to, int $indent) : string { + public function getTokenCode(int $from, int $to, int $indent): string { $tokens = $this->tokens; $result = ''; for ($pos = $from; $pos < $to; $pos++) { $token = $tokens[$pos]; - if (\is_array($token)) { - $type = $token[0]; - $content = $token[1]; - if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $content; - } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content); - } else { - $result .= $content; - } - } + $id = $token->id; + $text = $token->text; + if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { + $result .= $text; } else { - $result .= $token; + // TODO Handle non-space indentation + if ($indent < 0) { + $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); + } elseif ($indent > 0) { + $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); + } else { + $result .= $text; + } } } return $result; @@ -258,17 +248,21 @@ class TokenStream * * @return int[] Token position to indentation map */ - private function calcIndentMap() { + private function calcIndentMap(): array { $indentMap = []; $indent = 0; - foreach ($this->tokens as $token) { + foreach ($this->tokens as $i => $token) { $indentMap[] = $indent; - if ($token[0] === \T_WHITESPACE) { - $content = $token[1]; + if ($token->id === \T_WHITESPACE) { + $content = $token->text; $newlinePos = \strrpos($content, "\n"); if (false !== $newlinePos) { $indent = \strlen($content) - $newlinePos - 1; + } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && + $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { + // Special case: Newline at the end of opening tag followed by whitespace. + $indent = \strlen($content); } } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php index 47d2003d..7be41426 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php @@ -2,11 +2,11 @@ namespace PhpParser; -class JsonDecoder -{ - /** @var \ReflectionClass[] Node type to reflection class map */ - private $reflectionClassCache; +class JsonDecoder { + /** @var \ReflectionClass[] Node type to reflection class map */ + private array $reflectionClassCache; + /** @return mixed */ public function decode(string $json) { $value = json_decode($json, true); if (json_last_error()) { @@ -16,6 +16,10 @@ class JsonDecoder return $this->decodeRecursive($value); } + /** + * @param mixed $value + * @return mixed + */ private function decodeRecursive($value) { if (\is_array($value)) { if (isset($value['nodeType'])) { @@ -29,7 +33,7 @@ class JsonDecoder return $value; } - private function decodeArray(array $array) : array { + private function decodeArray(array $array): array { $decodedArray = []; foreach ($array as $key => $value) { $decodedArray[$key] = $this->decodeRecursive($value); @@ -37,14 +41,13 @@ class JsonDecoder return $decodedArray; } - private function decodeNode(array $value) : Node { + private function decodeNode(array $value): Node { $nodeType = $value['nodeType']; if (!\is_string($nodeType)) { throw new \RuntimeException('Node type must be a string'); } $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - /** @var Node $node */ $node = $reflectionClass->newInstanceWithoutConstructor(); if (isset($value['attributes'])) { @@ -66,7 +69,7 @@ class JsonDecoder return $node; } - private function decodeComment(array $value) : Comment { + private function decodeComment(array $value): Comment { $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; if (!isset($value['text'])) { throw new \RuntimeException('Comment must have text'); @@ -79,7 +82,8 @@ class JsonDecoder ); } - private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass { + /** @return \ReflectionClass */ + private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); @@ -87,7 +91,8 @@ class JsonDecoder return $this->reflectionClassCache[$nodeType]; } - private function classNameFromNodeType(string $nodeType) : string { + /** @return class-string */ + private function classNameFromNodeType(string $nodeType): string { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { return $className; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php index e15dd0a5..5e2ece96 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php @@ -2,559 +2,115 @@ namespace PhpParser; -use PhpParser\Parser\Tokens; - -class Lexer -{ - protected $code; - protected $tokens; - protected $pos; - protected $line; - protected $filePos; - protected $prevCloseTagHasNewline; - - protected $tokenMap; - protected $dropTokens; - protected $identifierTokens; - - private $attributeStartLineUsed; - private $attributeEndLineUsed; - private $attributeStartTokenPosUsed; - private $attributeEndTokenPosUsed; - private $attributeStartFilePosUsed; - private $attributeEndFilePosUsed; - private $attributeCommentsUsed; +require __DIR__ . '/compatibility_tokens.php'; +class Lexer { /** - * Creates a Lexer. + * Tokenize the provided source code. * - * @param array $options Options array. Currently only the 'usedAttributes' option is supported, - * which is an array of attributes to add to the AST nodes. Possible - * attributes are: 'comments', 'startLine', 'endLine', 'startTokenPos', - * 'endTokenPos', 'startFilePos', 'endFilePos'. The option defaults to the - * first three. For more info see getNextToken() docs. - */ - public function __construct(array $options = []) { - // Create Map from internal tokens to PhpParser tokens. - $this->defineCompatibilityTokens(); - $this->tokenMap = $this->createTokenMap(); - $this->identifierTokens = $this->createIdentifierTokenMap(); - - // map of tokens to drop while lexing (the map is only used for isset lookup, - // that's why the value is simply set to 1; the value is never actually used.) - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 - ); - - $defaultAttributes = ['comments', 'startLine', 'endLine']; - $usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true); - - // Create individual boolean properties to make these checks faster. - $this->attributeStartLineUsed = isset($usedAttributes['startLine']); - $this->attributeEndLineUsed = isset($usedAttributes['endLine']); - $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']); - $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']); - $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']); - $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']); - $this->attributeCommentsUsed = isset($usedAttributes['comments']); - } - - /** - * Initializes the lexer for lexing the provided source code. + * The token array is in the same format as provided by the PhpToken::tokenize() method in + * PHP 8.0. The tokens are instances of PhpParser\Token, to abstract over a polyfill + * implementation in earlier PHP version. * - * This function does not throw if lexing errors occur. Instead, errors may be retrieved using - * the getErrors() method. + * The token array is terminated by a sentinel token with token ID 0. + * The token array does not discard any tokens (i.e. whitespace and comments are included). + * The token position attributes are against this token array. * - * @param string $code The source code to lex + * @param string $code The source code to tokenize. * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to - * ErrorHandler\Throwing + * ErrorHandler\Throwing. + * @return Token[] Tokens */ - public function startLexing(string $code, ErrorHandler $errorHandler = null) { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing(); } - $this->code = $code; // keep the code around for __halt_compiler() handling - $this->pos = -1; - $this->line = 1; - $this->filePos = 0; - - // If inline HTML occurs without preceding code, treat it as if it had a leading newline. - // This ensures proper composability, because having a newline is the "safe" assumption. - $this->prevCloseTagHasNewline = true; - $scream = ini_set('xdebug.scream', '0'); - $this->tokens = @token_get_all($code); - $this->postprocessTokens($errorHandler); + $tokens = @Token::tokenize($code); + $this->postprocessTokens($tokens, $errorHandler); if (false !== $scream) { ini_set('xdebug.scream', $scream); } - } - private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) { - $tokens = []; - for ($i = $start; $i < $end; $i++) { - $chr = $this->code[$i]; - if ($chr === "\0") { - // PHP cuts error message after null byte, so need special case - $errorMsg = 'Unexpected null byte'; - } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); - } - - $tokens[] = [\T_BAD_CHARACTER, $chr, $line]; - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $line, - 'endLine' => $line, - 'startFilePos' => $i, - 'endFilePos' => $i, - ])); - } return $tokens; } - /** - * Check whether comment token is unterminated. - * - * @return bool - */ - private function isUnterminatedComment($token) : bool { - return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT) - && substr($token[1], 0, 2) === '/*' - && substr($token[1], -2) !== '*/'; + private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { + $chr = $token->text; + if ($chr === "\0") { + // PHP cuts error message after null byte, so need special case + $errorMsg = 'Unexpected null byte'; + } else { + $errorMsg = sprintf( + 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) + ); + } + + $errorHandler->handleError(new Error($errorMsg, [ + 'startLine' => $token->line, + 'endLine' => $token->line, + 'startFilePos' => $token->pos, + 'endFilePos' => $token->pos, + ])); } - protected function postprocessTokens(ErrorHandler $errorHandler) { - // PHP's error handling for token_get_all() is rather bad, so if we want detailed - // error information we need to compute it ourselves. Invalid character errors are - // detected by finding "gaps" in the token array. Unterminated comments are detected - // by checking if a trailing comment has a "*/" at the end. - // - // Additionally, we perform a number of canonicalizations here: - // * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore. - // * Use PHP 8.0 T_NAME_* tokens. + private function isUnterminatedComment(Token $token): bool { + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) + && substr($token->text, 0, 2) === '/*' + && substr($token->text, -2) !== '*/'; + } + + /** + * @param list $tokens + */ + protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { + // This function reports errors (bad characters and unterminated comments) in the token + // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. + // * Add a sentinel token with ID 0. + + $numTokens = \count($tokens); + if ($numTokens === 0) { + // Empty input edge case: Just add the sentinel token. + $tokens[] = new Token(0, "\0", 1, 0); + return; + } - $filePos = 0; - $line = 1; - $numTokens = \count($this->tokens); for ($i = 0; $i < $numTokens; $i++) { - $token = $this->tokens[$i]; - - // Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token. - // In this case we only need to emit an error. - if ($token[0] === \T_BAD_CHARACTER) { - $this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler); + $token = $tokens[$i]; + if ($token->id === \T_BAD_CHARACTER) { + $this->handleInvalidCharacter($token, $errorHandler); } - if ($token[0] === \T_COMMENT && substr($token[1], 0, 2) !== '/*' - && preg_match('/(\r\n|\n|\r)$/D', $token[1], $matches)) { - $trailingNewline = $matches[0]; - $token[1] = substr($token[1], 0, -strlen($trailingNewline)); - $this->tokens[$i] = $token; - if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) { - // Move trailing newline into following T_WHITESPACE token, if it already exists. - $this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1]; - $this->tokens[$i + 1][2]--; - } else { - // Otherwise, we need to create a new T_WHITESPACE token. - array_splice($this->tokens, $i + 1, 0, [ - [\T_WHITESPACE, $trailingNewline, $line], - ]); - $numTokens++; - } - } - - // Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING - // into a single token. - if (\is_array($token) - && ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) { - $lastWasSeparator = $token[0] === \T_NS_SEPARATOR; - $text = $token[1]; - for ($j = $i + 1; isset($this->tokens[$j]); $j++) { - if ($lastWasSeparator) { - if (!isset($this->identifierTokens[$this->tokens[$j][0]])) { - break; - } - $lastWasSeparator = false; - } else { - if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) { - break; - } - $lastWasSeparator = true; - } - $text .= $this->tokens[$j][1]; - } - if ($lastWasSeparator) { - // Trailing separator is not part of the name. - $j--; - $text = substr($text, 0, -1); - } - if ($j > $i + 1) { - if ($token[0] === \T_NS_SEPARATOR) { - $type = \T_NAME_FULLY_QUALIFIED; - } else if ($token[0] === \T_NAMESPACE) { - $type = \T_NAME_RELATIVE; - } else { - $type = \T_NAME_QUALIFIED; - } - $token = [$type, $text, $line]; - array_splice($this->tokens, $i, $j - $i, [$token]); - $numTokens -= $j - $i - 1; - } - } - - if ($token === '&') { + if ($token->id === \ord('&')) { $next = $i + 1; - while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) { + while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { $next++; } - $followedByVarOrVarArg = isset($this->tokens[$next]) && - ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS); - $this->tokens[$i] = $token = [ - $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, - '&', - $line, - ]; - } - - $tokenValue = \is_string($token) ? $token : $token[1]; - $tokenLen = \strlen($tokenValue); - - if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) { - // Something is missing, must be an invalid character - $nextFilePos = strpos($this->code, $tokenValue, $filePos); - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, $nextFilePos, $line, $errorHandler); - $filePos = (int) $nextFilePos; - - array_splice($this->tokens, $i, 0, $badCharTokens); - $numTokens += \count($badCharTokens); - $i += \count($badCharTokens); - } - - $filePos += $tokenLen; - $line += substr_count($tokenValue, "\n"); - } - - if ($filePos !== \strlen($this->code)) { - if (substr($this->code, $filePos, 2) === '/*') { - // Unlike PHP, HHVM will drop unterminated comments entirely - $comment = substr($this->code, $filePos); - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line, - 'endLine' => $line + substr_count($comment, "\n"), - 'startFilePos' => $filePos, - 'endFilePos' => $filePos + \strlen($comment), - ])); - - // Emulate the PHP behavior - $isDocComment = isset($comment[3]) && $comment[3] === '*'; - $this->tokens[] = [$isDocComment ? \T_DOC_COMMENT : \T_COMMENT, $comment, $line]; - } else { - // Invalid characters at the end of the input - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, \strlen($this->code), $line, $errorHandler); - $this->tokens = array_merge($this->tokens, $badCharTokens); - } - return; - } - - if (count($this->tokens) > 0) { - // Check for unterminated comment - $lastToken = $this->tokens[count($this->tokens) - 1]; - if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line - substr_count($lastToken[1], "\n"), - 'endLine' => $line, - 'startFilePos' => $filePos - \strlen($lastToken[1]), - 'endFilePos' => $filePos, - ])); - } - } - } - - /** - * Fetches the next token. - * - * The available attributes are determined by the 'usedAttributes' option, which can - * be specified in the constructor. The following attributes are supported: - * - * * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances, - * representing all comments that occurred between the previous - * non-discarded token and the current one. - * * 'startLine' => Line in which the node starts. - * * 'endLine' => Line in which the node ends. - * * 'startTokenPos' => Offset into the token array of the first token in the node. - * * 'endTokenPos' => Offset into the token array of the last token in the node. - * * 'startFilePos' => Offset into the code string of the first character that is part of the node. - * * 'endFilePos' => Offset into the code string of the last character that is part of the node. - * - * @param mixed $value Variable to store token content in - * @param mixed $startAttributes Variable to store start attributes in - * @param mixed $endAttributes Variable to store end attributes in - * - * @return int Token id - */ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int { - $startAttributes = []; - $endAttributes = []; - - while (1) { - if (isset($this->tokens[++$this->pos])) { - $token = $this->tokens[$this->pos]; - } else { - // EOF token with ID 0 - $token = "\0"; - } - - if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $this->line; - } - if ($this->attributeStartTokenPosUsed) { - $startAttributes['startTokenPos'] = $this->pos; - } - if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $this->filePos; - } - - if (\is_string($token)) { - $value = $token; - if (isset($token[1])) { - // bug in token_get_all - $this->filePos += 2; - $id = ord('"'); - } else { - $this->filePos += 1; - $id = ord($token); - } - } elseif (!isset($this->dropTokens[$token[0]])) { - $value = $token[1]; - $id = $this->tokenMap[$token[0]]; - if (\T_CLOSE_TAG === $token[0]) { - $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n") - || false !== strpos($token[1], "\r"); - } elseif (\T_INLINE_HTML === $token[0]) { - $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; - } - - $this->line += substr_count($value, "\n"); - $this->filePos += \strlen($value); - } else { - $origLine = $this->line; - $origFilePos = $this->filePos; - $this->line += substr_count($token[1], "\n"); - $this->filePos += \strlen($token[1]); - - if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) { - if ($this->attributeCommentsUsed) { - $comment = \T_DOC_COMMENT === $token[0] - ? new Comment\Doc($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos) - : new Comment($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos); - $startAttributes['comments'][] = $comment; - } - } - continue; - } - - if ($this->attributeEndLineUsed) { - $endAttributes['endLine'] = $this->line; - } - if ($this->attributeEndTokenPosUsed) { - $endAttributes['endTokenPos'] = $this->pos; - } - if ($this->attributeEndFilePosUsed) { - $endAttributes['endFilePos'] = $this->filePos - 1; - } - - return $id; - } - - throw new \RuntimeException('Reached end of lexer loop'); - } - - /** - * Returns the token array for current code. - * - * The token array is in the same format as provided by the - * token_get_all() function and does not discard tokens (i.e. - * whitespace and comments are included). The token position - * attributes are against this token array. - * - * @return array Array of tokens in token_get_all() format - */ - public function getTokens() : array { - return $this->tokens; - } - - /** - * Handles __halt_compiler() by returning the text after it. - * - * @return string Remaining text - */ - public function handleHaltCompiler() : string { - // text after T_HALT_COMPILER, still including (); - $textAfter = substr($this->code, $this->filePos); - - // ensure that it is followed by (); - // this simplifies the situation, by not allowing any comments - // in between of the tokens. - if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) { - throw new Error('__HALT_COMPILER must be followed by "();"'); - } - - // prevent the lexer from returning any further tokens - $this->pos = count($this->tokens); - - // return with (); removed - return substr($textAfter, strlen($matches[0])); - } - - private function defineCompatibilityTokens() { - static $compatTokensDefined = false; - if ($compatTokensDefined) { - return; - } - - $compatTokens = [ - // PHP 7.4 - 'T_BAD_CHARACTER', - 'T_FN', - 'T_COALESCE_EQUAL', - // PHP 8.0 - 'T_NAME_QUALIFIED', - 'T_NAME_FULLY_QUALIFIED', - 'T_NAME_RELATIVE', - 'T_MATCH', - 'T_NULLSAFE_OBJECT_OPERATOR', - 'T_ATTRIBUTE', - // PHP 8.1 - 'T_ENUM', - 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', - 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', - 'T_READONLY', - ]; - - // PHP-Parser might be used together with another library that also emulates some or all - // of these tokens. Perform a sanity-check that all already defined tokens have been - // assigned a unique ID. - $usedTokenIds = []; - foreach ($compatTokens as $token) { - if (\defined($token)) { - $tokenId = \constant($token); - $clashingToken = $usedTokenIds[$tokenId] ?? null; - if ($clashingToken !== null) { - throw new \Error(sprintf( - 'Token %s has same ID as token %s, ' . - 'you may be using a library with broken token emulation', - $token, $clashingToken - )); - } - $usedTokenIds[$tokenId] = $token; + $followedByVarOrVarArg = isset($tokens[$next]) && + $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $token->id = $followedByVarOrVarArg + ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; } } - // Now define any tokens that have not yet been emulated. Try to assign IDs from -1 - // downwards, but skip any IDs that may already be in use. - $newTokenId = -1; - foreach ($compatTokens as $token) { - if (!\defined($token)) { - while (isset($usedTokenIds[$newTokenId])) { - $newTokenId--; - } - \define($token, $newTokenId); - $newTokenId--; - } + // Check for unterminated comment + $lastToken = $tokens[$numTokens - 1]; + if ($this->isUnterminatedComment($lastToken)) { + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $lastToken->line, + 'endLine' => $lastToken->getEndLine(), + 'startFilePos' => $lastToken->pos, + 'endFilePos' => $lastToken->getEndPos(), + ])); } - $compatTokensDefined = true; - } - - /** - * Creates the token map. - * - * The token map maps the PHP internal token identifiers - * to the identifiers used by the Parser. Additionally it - * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. - * - * @return array The token map - */ - protected function createTokenMap() : array { - $tokenMap = []; - - // 256 is the minimum possible token number, as everything below - // it is an ASCII value - for ($i = 256; $i < 1000; ++$i) { - if (\T_DOUBLE_COLON === $i) { - // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM - $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM; - } elseif(\T_OPEN_TAG_WITH_ECHO === $i) { - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO - $tokenMap[$i] = Tokens::T_ECHO; - } elseif(\T_CLOSE_TAG === $i) { - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[$i] = ord(';'); - } elseif ('UNKNOWN' !== $name = token_name($i)) { - if ('T_HASHBANG' === $name) { - // HHVM uses a special token for #! hashbang lines - $tokenMap[$i] = Tokens::T_INLINE_HTML; - } elseif (defined($name = Tokens::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } - } - } - - // HHVM uses a special token for numbers that overflow to double - if (defined('T_ONUMBER')) { - $tokenMap[\T_ONUMBER] = Tokens::T_DNUMBER; - } - // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant - if (defined('T_COMPILER_HALT_OFFSET')) { - $tokenMap[\T_COMPILER_HALT_OFFSET] = Tokens::T_STRING; - } - - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = Tokens::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = Tokens::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = Tokens::T_ENUM; - $tokenMap[\T_READONLY] = Tokens::T_READONLY; - - return $tokenMap; - } - - private function createIdentifierTokenMap(): array { - // Based on semi_reserved production. - return array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, - \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, - \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, - \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, - \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, - \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, - \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, - \T_MATCH, - ], true); + // Add sentinel token. + $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index 5c56e026..934954cd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -14,49 +14,39 @@ use PhpParser\Lexer\TokenEmulator\FnTokenEmulator; use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator; use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator; +use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; +use PhpParser\PhpVersion; +use PhpParser\Token; -class Emulative extends Lexer -{ - const PHP_7_3 = '7.3dev'; - const PHP_7_4 = '7.4dev'; - const PHP_8_0 = '8.0dev'; - const PHP_8_1 = '8.1dev'; +class Emulative extends Lexer { + /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ + private array $patches = []; - /** @var mixed[] Patches used to reverse changes introduced in the code */ - private $patches = []; + /** @var list */ + private array $emulators = []; - /** @var TokenEmulator[] */ - private $emulators = []; + private PhpVersion $targetPhpVersion; - /** @var string */ - private $targetPhpVersion; + private PhpVersion $hostPhpVersion; /** - * @param mixed[] $options Lexer options. In addition to the usual options, - * accepts a 'phpVersion' string that specifies the - * version to emulate. Defaults to newest supported. + * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. */ - public function __construct(array $options = []) - { - $this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_1; - unset($options['phpVersion']); - - parent::__construct($options); + public function __construct(?PhpVersion $phpVersion = null) { + $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); + $this->hostPhpVersion = PhpVersion::getHostVersion(); $emulators = [ - new FlexibleDocStringEmulator(), - new FnTokenEmulator(), new MatchTokenEmulator(), - new CoaleseEqualTokenEmulator(), - new NumericLiteralSeparatorEmulator(), new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), new ReadonlyTokenEmulator(), new ExplicitOctalEmulator(), + new ReadonlyFunctionTokenEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running @@ -65,21 +55,24 @@ class Emulative extends Lexer $emulatorPhpVersion = $emulator->getPhpVersion(); if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = $emulator; - } else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { + } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = new ReverseEmulator($emulator); } } } - public function startLexing(string $code, ErrorHandler $errorHandler = null) { - $emulators = array_filter($this->emulators, function($emulator) use($code) { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { + $emulators = array_filter($this->emulators, function ($emulator) use ($code) { return $emulator->isEmulationNeeded($code); }); if (empty($emulators)) { // Nothing to emulate, yay - parent::startLexing($code, $errorHandler); - return; + return parent::tokenize($code, $errorHandler); + } + + if ($errorHandler === null) { + $errorHandler = new ErrorHandler\Throwing(); } $this->patches = []; @@ -88,9 +81,9 @@ class Emulative extends Lexer } $collector = new ErrorHandler\Collecting(); - parent::startLexing($code, $collector); + $tokens = parent::tokenize($code, $collector); $this->sortPatches(); - $this->fixupTokens(); + $tokens = $this->fixupTokens($tokens); $errors = $collector->getErrors(); if (!empty($errors)) { @@ -101,90 +94,80 @@ class Emulative extends Lexer } foreach ($emulators as $emulator) { - $this->tokens = $emulator->emulate($code, $this->tokens); + $tokens = $emulator->emulate($code, $tokens); } + + return $tokens; } - private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>='); + private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->older($emulatorPhpVersion) + && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); } - private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<'); + private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) + && $this->targetPhpVersion->older($emulatorPhpVersion); } - private function sortPatches() - { + private function sortPatches(): void { // Patches may be contributed by different emulators. // Make sure they are sorted by increasing patch position. - usort($this->patches, function($p1, $p2) { + usort($this->patches, function ($p1, $p2) { return $p1[0] <=> $p2[0]; }); } - private function fixupTokens() - { + /** + * @param list $tokens + * @return list + */ + private function fixupTokens(array $tokens): array { if (\count($this->patches) === 0) { - return; + return $tokens; } // Load first patch $patchIdx = 0; - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; // We use a manual loop over the tokens, because we modify the array on the fly - $pos = 0; - for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { - $token = $this->tokens[$i]; - if (\is_string($token)) { - if ($patchPos === $pos) { - // Only support replacement for string tokens. - assert($patchType === 'replace'); - $this->tokens[$i] = $patchText; - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; - } - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $pos += \strlen($token); - continue; - } - - $len = \strlen($token[1]); - $posDelta = 0; + $posDelta = 0; + $lineDelta = 0; + for ($i = 0, $c = \count($tokens); $i < $c; $i++) { + $token = $tokens[$i]; + $pos = $token->pos; + $token->pos += $posDelta; + $token->line += $lineDelta; + $localPosDelta = 0; + $len = \strlen($token->text); while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); if ($patchType === 'remove') { if ($patchPos === $pos && $patchTextLen === $len) { // Remove token entirely - array_splice($this->tokens, $i, 1, []); + array_splice($tokens, $i, 1, []); $i--; $c--; } else { // Remove from token string - $this->tokens[$i][1] = substr_replace( - $token[1], '', $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen ); - $posDelta -= $patchTextLen; + $localPosDelta -= $patchTextLen; } + $lineDelta -= \substr_count($patchText, "\n"); } elseif ($patchType === 'add') { // Insert into the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, 0 + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 ); - $posDelta += $patchTextLen; - } else if ($patchType === 'replace') { + $localPosDelta += $patchTextLen; + $lineDelta += \substr_count($patchText, "\n"); + } elseif ($patchType === 'replace') { // Replace inside the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen ); } else { assert(false); @@ -193,22 +176,17 @@ class Emulative extends Lexer // Fetch the next patch $patchIdx++; if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; + // No more patches. However, we still need to adjust position. + $patchPos = \PHP_INT_MAX; + break; } list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // Multiple patches may apply to the same token. Reload the current one to check - // If the new patch applies - $token = $this->tokens[$i]; } - $pos += $len; + $posDelta += $localPosDelta; } - - // A patch did not apply - assert(false); + return $tokens; } /** @@ -216,7 +194,7 @@ class Emulative extends Lexer * * @param Error[] $errors */ - private function fixupErrors(array $errors) { + private function fixupErrors(array $errors): void { foreach ($errors as $error) { $attrs = $error->getAttributes(); @@ -232,7 +210,7 @@ class Emulative extends Lexer if ($patchType === 'add') { $posDelta += strlen($patchText); $lineDelta += substr_count($patchText, "\n"); - } else if ($patchType === 'remove') { + } elseif ($patchType === 'remove') { $posDelta -= strlen($patchText); $lineDelta -= substr_count($patchText, "\n"); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index 6776a519..2c12f33a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -2,43 +2,36 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; -final class AttributeEmulator extends TokenEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class AttributeEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code) : bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '#[') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way. - $line = 1; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1] === '[') { + $token = $tokens[$i]; + if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { array_splice($tokens, $i, 2, [ - [\T_ATTRIBUTE, '#[', $line] + new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), ]); $c--; continue; } - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // TODO return $tokens; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php deleted file mode 100644 index d91da921..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ /dev/null @@ -1,47 +0,0 @@ -id === \T_WHITESPACE + && $tokens[$pos + 2]->id === \T_STRING; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index f5f6805b..9cadf420 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -2,11 +2,12 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; class ExplicitOctalEmulator extends TokenEmulator { - public function getPhpVersion(): string { - return Emulative::PHP_8_1; + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } public function isEmulationNeeded(string $code): bool { @@ -15,13 +16,14 @@ class ExplicitOctalEmulator extends TokenEmulator { public function emulate(string $code, array $tokens): array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i][0] == \T_LNUMBER && $tokens[$i][1] === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1][0] == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1][1]) + $token = $tokens[$i]; + if ($token->id == \T_LNUMBER && $token->text === '0' && + isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && + preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1][1]); + $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); array_splice($tokens, $i, 2, [ - [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], + new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), ]); $c--; } @@ -29,8 +31,7 @@ class ExplicitOctalEmulator extends TokenEmulator { return $tokens; } - private function resolveIntegerOrFloatToken(string $str): int - { + private function resolveIntegerOrFloatToken(string $str): int { $str = substr($str, 1); $str = str_replace('_', '', $str); $num = octdec($str); @@ -41,4 +42,4 @@ class ExplicitOctalEmulator extends TokenEmulator { // Explicit octals were not legal code previously, don't bother. return $tokens; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php deleted file mode 100644 index c15d6271..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ /dev/null @@ -1,76 +0,0 @@ -\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x -REGEX; - - public function getPhpVersion(): string - { - return Emulative::PHP_7_3; - } - - public function isEmulationNeeded(string $code) : bool - { - return strpos($code, '<<<') !== false; - } - - public function emulate(string $code, array $tokens): array - { - // Handled by preprocessing + fixup. - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Not supported. - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { - // No heredoc/nowdoc found - return $code; - } - - // Keep track of how much we need to adjust string offsets due to the modifications we - // already made - $posDelta = 0; - foreach ($matches as $match) { - $indentation = $match['indentation'][0]; - $indentationStart = $match['indentation'][1]; - - $separator = $match['separator'][0]; - $separatorStart = $match['separator'][1]; - - if ($indentation === '' && $separator !== '') { - // Ordinary heredoc/nowdoc - continue; - } - - if ($indentation !== '') { - // Remove indentation - $indentationLen = strlen($indentation); - $code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen); - $patches[] = [$indentationStart + $posDelta, 'add', $indentation]; - $posDelta -= $indentationLen; - } - - if ($separator === '') { - // Insert newline as separator - $code = substr_replace($code, "\n", $separatorStart + $posDelta, 0); - $patches[] = [$separatorStart + $posDelta, 'remove', "\n"]; - $posDelta += 1; - } - } - - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php deleted file mode 100644 index eb7e4963..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ /dev/null @@ -1,23 +0,0 @@ -getKeywordString()) !== false; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos): bool { $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR; + return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { - if ($token[0] === T_STRING && strtolower($token[1]) === $keywordString + if ($token->id === T_STRING && strtolower($token->text) === $keywordString && $this->isKeywordContext($tokens, $i)) { - $tokens[$i][0] = $this->getKeywordToken(); + $token->id = $this->getKeywordToken(); } } return $tokens; } - /** - * @param mixed[] $tokens - * @return mixed[]|null - */ - private function getPreviousNonSpaceToken(array $tokens, int $start) - { + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i][0] === T_WHITESPACE) { + if ($tokens[$i]->id === T_WHITESPACE) { continue; } @@ -48,12 +43,11 @@ abstract class KeywordEmulator extends TokenEmulator return null; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $i => $token) { - if ($token[0] === $keywordToken) { - $tokens[$i][0] = \T_STRING; + foreach ($tokens as $token) { + if ($token->id === $keywordToken) { + $token->id = \T_STRING; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php index 902a46df..0fa5fbc2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -2,22 +2,18 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; -final class MatchTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class MatchTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'match'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_MATCH; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index 1a29c676..cede96f0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -2,65 +2,58 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; -final class NullsafeTokenEmulator extends TokenEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class NullsafeTokenEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code): bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '?->') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way - $line = 1; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) { + $token = $tokens[$i]; + if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { array_splice($tokens, $i, 2, [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line] + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), ]); $c--; continue; } // Handle ?-> inside encapsed string. - if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1][0] === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $tokens[$i][1], $matches) + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) + && $tokens[$i - 1]->id === \T_VARIABLE + && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) ) { $replacement = [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line], - [\T_STRING, $matches[1], $line], + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), + new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), ]; - if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) { - $replacement[] = [ + $matchLen = \strlen($matches[0]); + if ($matchLen !== \strlen($token->text)) { + $replacement[] = new Token( \T_ENCAPSED_AND_WHITESPACE, - \substr($tokens[$i][1], \strlen($matches[0])), - $line - ]; + \substr($token->text, $matchLen), + $token->line, $token->pos + $matchLen + ); } array_splice($tokens, $i, 1, $replacement); $c += \count($replacement) - 1; continue; } - - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // ?-> was not valid code previously, don't bother. return $tokens; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php deleted file mode 100644 index cdf793e4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ /dev/null @@ -1,105 +0,0 @@ -resolveIntegerOrFloatToken($match); - $newTokens = [[$tokenKind, $match, $token[2]]]; - - $numTokens = 1; - $len = $tokenLen; - while ($matchLen > $len) { - $nextToken = $tokens[$i + $numTokens]; - $nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken; - $nextTokenLen = \strlen($nextTokenText); - - $numTokens++; - if ($matchLen < $len + $nextTokenLen) { - // Split trailing characters into a partial token. - assert(is_array($nextToken), "Partial token should be an array token"); - $partialText = substr($nextTokenText, $matchLen - $len); - $newTokens[] = [$nextToken[0], $partialText, $nextToken[2]]; - break; - } - - $len += $nextTokenLen; - } - - array_splice($tokens, $i, $numTokens, $newTokens); - $c -= $numTokens - \count($newTokens); - $codeOffset += $matchLen; - } - - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int - { - $str = str_replace('_', '', $str); - - if (stripos($str, '0b') === 0) { - $num = bindec($str); - } elseif (stripos($str, '0x') === 0) { - $num = hexdec($str); - } elseif (stripos($str, '0') === 0 && ctype_digit($str)) { - $num = octdec($str); - } else { - $num = +$str; - } - - return is_float($num) ? T_DNUMBER : T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Numeric separators were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index b97f8d11..37240f79 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -2,22 +2,30 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; -final class ReadonlyTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_1; +final class ReadonlyTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'readonly'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_READONLY; } -} \ No newline at end of file + + protected function isKeywordContext(array $tokens, int $pos): bool { + if (!parent::isKeywordContext($tokens, $pos)) { + return false; + } + // Support "function readonly(" + return !(isset($tokens[$pos + 1]) && + ($tokens[$pos + 1]->text === '(' || + ($tokens[$pos + 1]->id === \T_WHITESPACE && + isset($tokens[$pos + 2]) && + $tokens[$pos + 2]->text === '('))); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index 90093f66..851b5c4a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -2,19 +2,20 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; + /** * Reverses emulation direction of the inner emulator. */ -final class ReverseEmulator extends TokenEmulator -{ +final class ReverseEmulator extends TokenEmulator { /** @var TokenEmulator Inner emulator */ - private $emulator; + private TokenEmulator $emulator; public function __construct(TokenEmulator $emulator) { $this->emulator = $emulator; } - public function getPhpVersion(): string { + public function getPhpVersion(): PhpVersion { return $this->emulator->getPhpVersion(); } @@ -33,4 +34,4 @@ final class ReverseEmulator extends TokenEmulator public function preprocessCode(string $code, array &$patches): string { return $code; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index a020bc0f..fec2f19f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -2,23 +2,28 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; +use PhpParser\Token; + /** @internal */ -abstract class TokenEmulator -{ - abstract public function getPhpVersion(): string; +abstract class TokenEmulator { + abstract public function getPhpVersion(): PhpVersion; abstract public function isEmulationNeeded(string $code): bool; /** - * @return array Modified Tokens + * @param Token[] $tokens Original tokens + * @return Token[] Modified Tokens */ abstract public function emulate(string $code, array $tokens): array; /** - * @return array Modified Tokens + * @param Token[] $tokens Original tokens + * @return Token[] Modified Tokens */ abstract public function reverseEmulate(string $code, array $tokens): array; + /** @param array{int, string, string}[] $patches */ public function preprocessCode(string $code, array &$patches): string { return $code; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php index 777a4afd..292df691 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php @@ -6,19 +6,18 @@ use PhpParser\Node\Name; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt; -class NameContext -{ +class NameContext { /** @var null|Name Current namespace */ - protected $namespace; + protected ?Name $namespace; /** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */ - protected $aliases = []; + protected array $aliases = []; /** @var Name[][] Same as $aliases but preserving original case */ - protected $origAliases = []; + protected array $origAliases = []; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** * Create a name context. @@ -36,7 +35,7 @@ class NameContext * * @param Name|null $namespace Null is the global namespace */ - public function startNamespace(Name $namespace = null) { + public function startNamespace(?Name $namespace = null): void { $this->namespace = $namespace; $this->origAliases = $this->aliases = [ Stmt\Use_::TYPE_NORMAL => [], @@ -48,12 +47,12 @@ class NameContext /** * Add an alias / import. * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param int $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error + * @param Name $name Original name + * @param string $aliasName Aliased name + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * @param array $errorAttrs Attributes to use to report an error */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) { + public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { // Constant names are case sensitive, everything else case insensitive if ($type === Stmt\Use_::TYPE_CONSTANT) { $aliasLookupName = $aliasName; @@ -87,7 +86,7 @@ class NameContext * * @return null|Name Namespace (or null if global namespace) */ - public function getNamespace() { + public function getNamespace(): ?Name { return $this->namespace; } @@ -95,11 +94,11 @@ class NameContext * Get resolved name. * * @param Name $name Name to resolve - * @param int $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} * * @return null|Name Resolved name, or null if static resolution is not possible */ - public function getResolvedName(Name $name, int $type) { + public function getResolvedName(Name $name, int $type): ?Name { // don't resolve special class names if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { if (!$name->isUnqualified()) { @@ -142,7 +141,7 @@ class NameContext * * @return Name Resolved name */ - public function getResolvedClassName(Name $name) : Name { + public function getResolvedClassName(Name $name): Name { return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); } @@ -150,11 +149,11 @@ class NameContext * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). * * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name[] Possible representations of the name */ - public function getPossibleNames(string $name, int $type) : array { + public function getPossibleNames(string $name, int $type): array { $lcName = strtolower($name); if ($type === Stmt\Use_::TYPE_NORMAL) { @@ -206,11 +205,11 @@ class NameContext * Get shortest representation of this fully-qualified name. * * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Shortest representation */ - public function getShortName(string $name, int $type) : Name { + public function getShortName(string $name, int $type): Name { $possibleNames = $this->getPossibleNames($name, $type); // Find shortest name @@ -224,10 +223,10 @@ class NameContext } } - return $shortestName; + return $shortestName; } - private function resolveAlias(Name $name, $type) { + private function resolveAlias(Name $name, int $type): ?FullyQualified { $firstPart = $name->getFirst(); if ($name->isQualified()) { @@ -250,7 +249,7 @@ class NameContext return null; } - private function getNamespaceRelativeName(string $name, string $lcName, int $type) { + private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { if (null === $this->namespace) { return new Name($name); } @@ -271,7 +270,7 @@ class NameContext return null; } - private function normalizeConstName(string $name) { + private function normalizeConstName(string $name): string { $nsSep = strrpos($name, '\\'); if (false === $nsSep) { return $name; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php index befb2565..258e4516 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php @@ -2,28 +2,29 @@ namespace PhpParser; -interface Node -{ +interface Node { /** * Gets the type of the node. * * @return string Type of the node */ - public function getType() : string; + public function getType(): string; /** * Gets the names of the sub nodes. * - * @return array Names of sub nodes + * @return string[] Names of sub nodes */ - public function getSubNodeNames() : array; + public function getSubNodeNames(): array; /** * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) + * + * @deprecated Use getStartLine() instead */ - public function getLine() : int; + public function getLine(): int; /** * Gets line the node started in. @@ -32,7 +33,7 @@ interface Node * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int; + public function getStartLine(): int; /** * Gets the line the node ended in. @@ -41,7 +42,7 @@ interface Node * * @return int End line (or -1 if not available) */ - public function getEndLine() : int; + public function getEndLine(): int; /** * Gets the token offset of the first token that is part of this node. @@ -52,7 +53,7 @@ interface Node * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int; + public function getStartTokenPos(): int; /** * Gets the token offset of the last token that is part of this node. @@ -63,7 +64,7 @@ interface Node * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int; + public function getEndTokenPos(): int; /** * Gets the file offset of the first character that is part of this node. @@ -72,7 +73,7 @@ interface Node * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int; + public function getStartFilePos(): int; /** * Gets the file offset of the last character that is part of this node. @@ -81,7 +82,7 @@ interface Node * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int; + public function getEndFilePos(): int; /** * Gets all comments directly preceding this node. @@ -90,14 +91,14 @@ interface Node * * @return Comment[] */ - public function getComments() : array; + public function getComments(): array; /** * Gets the doc comment of the node. * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment(); + public function getDocComment(): ?Comment\Doc; /** * Sets the doc comment of the node. @@ -106,30 +107,24 @@ interface Node * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment); + public function setDocComment(Comment\Doc $docComment): void; /** * Sets an attribute on a node. * - * @param string $key - * @param mixed $value + * @param mixed $value */ - public function setAttribute(string $key, $value); + public function setAttribute(string $key, $value): void; /** * Returns whether an attribute exists. - * - * @param string $key - * - * @return bool */ - public function hasAttribute(string $key) : bool; + public function hasAttribute(string $key): bool; /** * Returns the value of an attribute. * - * @param string $key - * @param mixed $default + * @param mixed $default * * @return mixed */ @@ -138,14 +133,14 @@ interface Node /** * Returns all the attributes of this node. * - * @return array + * @return array */ - public function getAttributes() : array; + public function getAttributes(): array; /** * Replaces all the attributes of this node. * - * @param array $attributes + * @param array $attributes */ - public function setAttributes(array $attributes); + public function setAttributes(array $attributes): void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php index bcf130e6..6680efac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php @@ -2,32 +2,30 @@ namespace PhpParser\Node; -use PhpParser\Node\VariadicPlaceholder; use PhpParser\NodeAbstract; -class Arg extends NodeAbstract -{ +class Arg extends NodeAbstract { /** @var Identifier|null Parameter name (for named parameters) */ - public $name; + public ?Identifier $name; /** @var Expr Value to pass */ - public $value; + public Expr $value; /** @var bool Whether to pass by ref */ - public $byRef; + public bool $byRef; /** @var bool Whether to unpack the argument */ - public $unpack; + public bool $unpack; /** * Constructs a function call argument node. * - * @param Expr $value Value to pass - * @param bool $byRef Whether to pass by ref - * @param bool $unpack Whether to unpack the argument - * @param array $attributes Additional attributes + * @param Expr $value Value to pass + * @param bool $byRef Whether to pass by ref + * @param bool $unpack Whether to unpack the argument + * @param array $attributes Additional attributes * @param Identifier|null $name Parameter name (for named parameters) */ public function __construct( Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - Identifier $name = null + ?Identifier $name = null ) { $this->attributes = $attributes; $this->name = $name; @@ -36,11 +34,11 @@ class Arg extends NodeAbstract $this->unpack = $unpack; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value', 'byRef', 'unpack']; } - - public function getType() : string { + + public function getType(): string { return 'Arg'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php index c96f66e5..9d892436 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php @@ -5,18 +5,17 @@ namespace PhpParser\Node; use PhpParser\Node; use PhpParser\NodeAbstract; -class Attribute extends NodeAbstract -{ +class Attribute extends NodeAbstract { /** @var Name Attribute name */ - public $name; + public Name $name; - /** @var Arg[] Attribute arguments */ - public $args; + /** @var list Attribute arguments */ + public array $args; /** - * @param Node\Name $name Attribute name - * @param Arg[] $args Attribute arguments - * @param array $attributes Additional node attributes + * @param Node\Name $name Attribute name + * @param list $args Attribute arguments + * @param array $attributes Additional node attributes */ public function __construct(Name $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Attribute extends NodeAbstract $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - public function getType() : string { + public function getType(): string { return 'Attribute'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php index 613bfc41..b9eb588d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php @@ -2,28 +2,26 @@ namespace PhpParser\Node; -use PhpParser\Node; use PhpParser\NodeAbstract; -class AttributeGroup extends NodeAbstract -{ +class AttributeGroup extends NodeAbstract { /** @var Attribute[] Attributes */ - public $attrs; + public array $attrs; /** * @param Attribute[] $attrs PHP attributes - * @param array $attributes Additional node attributes + * @param array $attributes Additional node attributes */ public function __construct(array $attrs, array $attributes = []) { $this->attributes = $attributes; $this->attrs = $attrs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrs']; } - public function getType() : string { + public function getType(): string { return 'AttributeGroup'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php index 9505532a..05a5e5ee 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php @@ -9,6 +9,5 @@ use PhpParser\NodeAbstract; * * It does not provide any shared behavior and exists only for type-checking purposes. */ -abstract class ComplexType extends NodeAbstract -{ +abstract class ComplexType extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php index b69eb16f..8b26ae86 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php @@ -4,22 +4,21 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -class Const_ extends NodeAbstract -{ +class Const_ extends NodeAbstract { /** @var Identifier Name */ - public $name; + public Identifier $name; /** @var Expr Value */ - public $value; + public Expr $value; - /** @var Name Namespaced name (if using NameResolver) */ - public $namespacedName; + /** @var Name|null Namespaced name (if using NameResolver) */ + public ?Name $namespacedName; /** * Constructs a const node for use in class const and const statements. * - * @param string|Identifier $name Name - * @param Expr $value Value - * @param array $attributes Additional attributes + * @param string|Identifier $name Name + * @param Expr $value Value + * @param array $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { $this->attributes = $attributes; @@ -27,11 +26,11 @@ class Const_ extends NodeAbstract $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value']; } - - public function getType() : string { + + public function getType(): string { return 'Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php index 6cf4df22..8b7dbb6c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php @@ -4,6 +4,5 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -abstract class Expr extends NodeAbstract -{ +abstract class Expr extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 71694478..24427bbc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class ArrayDimFetch extends Expr -{ +class ArrayDimFetch extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var null|Expr Array index / dim */ - public $dim; + public ?Expr $dim; /** * Constructs an array index fetch node. * - * @param Expr $var Variable - * @param null|Expr $dim Array index / dim - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param null|Expr $dim Array index / dim + * @param array $attributes Additional attributes */ - public function __construct(Expr $var, Expr $dim = null, array $attributes = []) { + public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'dim']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ArrayDimFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php index 1b078f82..490ac937 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -1,41 +1,3 @@ attributes = $attributes; - $this->key = $key; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames() : array { - return ['key', 'value', 'byRef', 'unpack']; - } - - public function getType() : string { - return 'Expr_ArrayItem'; - } -} +require __DIR__ . '/../ArrayItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php index e6eaa283..3c8c9c2f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php @@ -2,33 +2,33 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; -class Array_ extends Expr -{ +class Array_ extends Expr { // For use in "kind" attribute - const KIND_LONG = 1; // array() syntax - const KIND_SHORT = 2; // [] syntax + public const KIND_LONG = 1; // array() syntax + public const KIND_SHORT = 2; // [] syntax - /** @var (ArrayItem|null)[] Items */ - public $items; + /** @var ArrayItem[] Items */ + public array $items; /** * Constructs an array node. * - * @param (ArrayItem|null)[] $items Items of the array - * @param array $attributes Additional attributes + * @param ArrayItem[] $items Items of the array + * @param array $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Array'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php index c273fb7e..0e98ce9f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -6,55 +6,60 @@ use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class ArrowFunction extends Expr implements FunctionLike -{ - /** @var bool */ - public $static; +class ArrowFunction extends Expr implements FunctionLike { + /** @var bool Whether the closure is static */ + public bool $static; - /** @var bool */ - public $byRef; + /** @var bool Whether to return by reference */ + public bool $byRef; /** @var Node\Param[] */ - public $params = []; + public array $params = []; /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ - public $returnType; + public ?Node $returnType; - /** @var Expr */ - public $expr; + /** @var Expr Expression body */ + public Expr $expr; /** @var Node\AttributeGroup[] */ - public $attrGroups; + public array $attrGroups; /** - * @param array $subNodes Array of the following optional subnodes: - * 'static' => false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'expr' => Expr : Expression body - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * expr: Expr, + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * attrGroups?: Node\AttributeGroup[] + * } $subNodes Array of the following subnodes: + * 'expr' : Expression body + * 'static' => false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes */ - public function __construct(array $subNodes = [], array $attributes = []) { + public function __construct(array $subNodes, array $attributes = []) { $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,18 +67,18 @@ class ArrowFunction extends Expr implements FunctionLike return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** * @return Node\Stmt\Return_[] */ - public function getStmts() : array { + public function getStmts(): array { return [new Node\Stmt\Return_($this->expr)]; } - public function getType() : string { + public function getType(): string { return 'Expr_ArrowFunction'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php index cf9e6e82..dcbf84dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Assign extends Expr -{ +class Assign extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Assign extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Assign'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php index bce8604f..5209a64b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class AssignOp extends Expr -{ +abstract class AssignOp extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a compound assignment operation node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,7 +23,7 @@ abstract class AssignOp extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php index 420284cd..4f3623fb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseAnd extends AssignOp -{ - public function getType() : string { +class BitwiseAnd extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php index 481ad3bb..23efe107 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseOr extends AssignOp -{ - public function getType() : string { +class BitwiseOr extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php index f41d4c8e..24be7303 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseXor extends AssignOp -{ - public function getType() : string { +class BitwiseXor extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php index c0e9b316..b78ea901 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Coalesce extends AssignOp -{ - public function getType() : string { +class Coalesce extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Coalesce'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php index ac168207..f419e2ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Concat extends AssignOp -{ - public function getType() : string { +class Concat extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Concat'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php index f1fcfc09..98b04727 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Div extends AssignOp -{ - public function getType() : string { +class Div extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Div'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php index 82ef4517..20765993 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Minus extends AssignOp -{ - public function getType() : string { +class Minus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Minus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php index be3b4a0a..526430e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Mod extends AssignOp -{ - public function getType() : string { +class Mod extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php index 5c196c3b..81241ac9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Mul extends AssignOp -{ - public function getType() : string { +class Mul extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mul'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php index dd101c61..0bca8cc1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Plus extends AssignOp -{ - public function getType() : string { +class Plus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Plus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php index 5e1307d1..4e3279c4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Pow extends AssignOp -{ - public function getType() : string { +class Pow extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Pow'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php index b8f88269..7a5dd60c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class ShiftLeft extends AssignOp -{ - public function getType() : string { +class ShiftLeft extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftLeft'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php index e0cc67b7..4f270864 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class ShiftRight extends AssignOp -{ - public function getType() : string { +class ShiftRight extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftRight'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php index de3c644c..9714650a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class AssignRef extends Expr -{ +class AssignRef extends Expr { /** @var Expr Variable reference is assigned to */ - public $var; + public Expr $var; /** @var Expr Variable which is referenced */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class AssignRef extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_AssignRef'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php index d9c582b0..1b92bd4f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class BinaryOp extends Expr -{ +abstract class BinaryOp extends Expr { /** @var Expr The left hand side expression */ - public $left; + public Expr $left; /** @var Expr The right hand side expression */ - public $right; + public Expr $right; /** * Constructs a binary operator node. * - * @param Expr $left The left hand side expression - * @param Expr $right The right hand side expression - * @param array $attributes Additional attributes + * @param Expr $left The left hand side expression + * @param Expr $right The right hand side expression + * @param array $attributes Additional attributes */ public function __construct(Expr $left, Expr $right, array $attributes = []) { $this->attributes = $attributes; @@ -24,7 +23,7 @@ abstract class BinaryOp extends Expr $this->right = $right; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['left', 'right']; } @@ -33,8 +32,6 @@ abstract class BinaryOp extends Expr * * In the case there are multiple possible sigils for an operator, this method does not * necessarily return the one used in the parsed code. - * - * @return string */ - abstract public function getOperatorSigil() : string; + abstract public function getOperatorSigil(): string; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php index d907393b..5930c541 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php index d92069f3..adcefd0e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseOr extends BinaryOp { + public function getOperatorSigil(): string { return '|'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php index 40fa94f8..92bca609 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseXor extends BinaryOp { + public function getOperatorSigil(): string { return '^'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php index 4c3c9e9b..82a6b5a2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BooleanAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php index 5ad41727..739edafa 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BooleanOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanOr extends BinaryOp { + public function getOperatorSigil(): string { return '||'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php index b8cf6f45..ab75a23e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Coalesce extends BinaryOp -{ - public function getOperatorSigil() : string { +class Coalesce extends BinaryOp { + public function getOperatorSigil(): string { return '??'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Coalesce'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php index 9a8d9873..a730f576 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Concat extends BinaryOp -{ - public function getOperatorSigil() : string { +class Concat extends BinaryOp { + public function getOperatorSigil(): string { return '.'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Concat'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php index d38df0db..ba1f629d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Div extends BinaryOp -{ - public function getOperatorSigil() : string { +class Div extends BinaryOp { + public function getOperatorSigil(): string { return '/'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Div'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php index e7b11dc8..28bde812 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Equal extends BinaryOp -{ - public function getOperatorSigil() : string { +class Equal extends BinaryOp { + public function getOperatorSigil(): string { return '=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Equal'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php index da01f7a1..6215c50b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Greater extends BinaryOp -{ - public function getOperatorSigil() : string { +class Greater extends BinaryOp { + public function getOperatorSigil(): string { return '>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Greater'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php index d677502c..4d440b10 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class GreaterOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class GreaterOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '>='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_GreaterOrEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php index 3d96285c..e25d17cd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Identical extends BinaryOp -{ - public function getOperatorSigil() : string { +class Identical extends BinaryOp { + public function getOperatorSigil(): string { return '==='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Identical'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php index 2a3afd54..9b9ea1f6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalAnd extends BinaryOp { + public function getOperatorSigil(): string { return 'and'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php index 21507dba..a6235ee7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalOr extends BinaryOp { + public function getOperatorSigil(): string { return 'or'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php index 261c6a91..7ff2fdb0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalXor extends BinaryOp { + public function getOperatorSigil(): string { return 'xor'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php index 54b3c6e9..8924c55e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Minus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Minus extends BinaryOp { + public function getOperatorSigil(): string { return '-'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Minus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php index 10340404..56619de1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Mod extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mod extends BinaryOp { + public function getOperatorSigil(): string { return '%'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php index b82d0b2f..98745fbe 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Mul extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mul extends BinaryOp { + public function getOperatorSigil(): string { return '*'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mul'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php index 51075da5..72d03c45 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class NotEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotEqual extends BinaryOp { + public function getOperatorSigil(): string { return '!='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php index fa4050e0..e9befd80 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class NotIdentical extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotIdentical extends BinaryOp { + public function getOperatorSigil(): string { return '!=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotIdentical'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php index 62f02299..fe34b84c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Plus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Plus extends BinaryOp { + public function getOperatorSigil(): string { return '+'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Plus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php index 572a1e8e..e4e641cb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Pow extends BinaryOp -{ - public function getOperatorSigil() : string { +class Pow extends BinaryOp { + public function getOperatorSigil(): string { return '**'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Pow'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php index 4e70b4ef..22c6260f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class ShiftLeft extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftLeft extends BinaryOp { + public function getOperatorSigil(): string { return '<<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftLeft'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php index 45acbd04..cd42644a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class ShiftRight extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftRight extends BinaryOp { + public function getOperatorSigil(): string { return '>>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftRight'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php index 3cb8e7e0..01e9b231 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Smaller extends BinaryOp -{ - public function getOperatorSigil() : string { +class Smaller extends BinaryOp { + public function getOperatorSigil(): string { return '<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Smaller'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php index 83e8e214..2c88f383 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class SmallerOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class SmallerOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '<='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_SmallerOrEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php index 8c6d787f..974ec7dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Spaceship extends BinaryOp -{ - public function getOperatorSigil() : string { +class Spaceship extends BinaryOp { + public function getOperatorSigil(): string { return '<=>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Spaceship'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php index ed44984b..b7175a7a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class BitwiseNot extends Expr -{ +class BitwiseNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a bitwise not node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BitwiseNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php index bf27e9f6..c66d2332 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class BooleanNot extends Expr -{ +class BooleanNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a boolean not node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BooleanNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php index 78e1cf34..2af2245b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php @@ -19,12 +19,8 @@ abstract class CallLike extends Expr { * Returns whether this call expression is actually a first class callable. */ public function isFirstClassCallable(): bool { - foreach ($this->getRawArgs() as $arg) { - if ($arg instanceof VariadicPlaceholder) { - return true; - } - } - return false; + $rawArgs = $this->getRawArgs(); + return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; } /** @@ -36,4 +32,4 @@ abstract class CallLike extends Expr { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php index 36769d4f..c2751de4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -4,23 +4,22 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class Cast extends Expr -{ +abstract class Cast extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a cast node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php index 57cc473b..471cb824 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Array_ extends Cast -{ - public function getType() : string { +class Array_ extends Cast { + public function getType(): string { return 'Expr_Cast_Array'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php index 04eb4af5..3aed497c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Bool_ extends Cast -{ - public function getType() : string { +class Bool_ extends Cast { + public function getType(): string { return 'Expr_Cast_Bool'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php index 891ba5f8..e7f5cd9b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php @@ -4,14 +4,13 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Double extends Cast -{ +class Double extends Cast { // For use in "kind" attribute - const KIND_DOUBLE = 1; // "double" syntax - const KIND_FLOAT = 2; // "float" syntax - const KIND_REAL = 3; // "real" syntax + public const KIND_DOUBLE = 1; // "double" syntax + public const KIND_FLOAT = 2; // "float" syntax + public const KIND_REAL = 3; // "real" syntax - public function getType() : string { + public function getType(): string { return 'Expr_Cast_Double'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php index 01ed594b..20744b9b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Int_ extends Cast -{ - public function getType() : string { +class Int_ extends Cast { + public function getType(): string { return 'Expr_Cast_Int'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php index 163752be..dffa9e54 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Object_ extends Cast -{ - public function getType() : string { +class Object_ extends Cast { + public function getType(): string { return 'Expr_Cast_Object'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php index b3d99270..c7605ab8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class String_ extends Cast -{ - public function getType() : string { +class String_ extends Cast { + public function getType(): string { return 'Expr_Cast_String'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php index accda3e4..cb709a43 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Unset_ extends Cast -{ - public function getType() : string { +class Unset_ extends Cast { + public function getType(): string { return 'Expr_Cast_Unset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php index faf832f9..7fdd40e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -2,35 +2,35 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -class ClassConstFetch extends Expr -{ +class ClassConstFetch extends Expr { /** @var Name|Expr Class name */ - public $class; - /** @var Identifier|Error Constant name */ - public $name; + public Node $class; + /** @var Identifier|Expr|Error Constant name */ + public Node $name; /** * Constructs a class const fetch node. * - * @param Name|Expr $class Class name - * @param string|Identifier|Error $name Constant name - * @param array $attributes Additional attributes + * @param Name|Expr $class Class name + * @param string|Identifier|Expr|Error $name Constant name + * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ClassConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php index db216b8f..d85bc9ab 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Clone_ extends Expr -{ +class Clone_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a clone node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Clone'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php index 56ddea6a..0680446f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -3,38 +3,46 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\ClosureUse; use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class Closure extends Expr implements FunctionLike -{ +class Closure extends Expr implements FunctionLike { /** @var bool Whether the closure is static */ - public $static; + public bool $static; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var ClosureUse[] use()s */ - public $uses; + public array $uses; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a lambda function node. * - * @param array $subNodes Array of the following optional subnodes: - * 'static' => false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'uses' => array(): use()s - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes + * @param array{ + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * uses?: ClosureUse[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'static' => false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'uses' => array(): use()s + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attributes groups + * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -42,21 +50,20 @@ class Closure extends Expr implements FunctionLike $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->uses = $subNodes['uses'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -65,15 +72,15 @@ class Closure extends Expr implements FunctionLike } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } - public function getType() : string { + public function getType(): string { return 'Expr_Closure'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php index 2b8a0966..681ff317 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -1,34 +1,3 @@ attributes = $attributes; - $this->var = $var; - $this->byRef = $byRef; - } - - public function getSubNodeNames() : array { - return ['var', 'byRef']; - } - - public function getType() : string { - return 'Expr_ClosureUse'; - } -} +require __DIR__ . '/../ClosureUse.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php index 14ebd16b..47191c5f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; use PhpParser\Node\Name; -class ConstFetch extends Expr -{ +class ConstFetch extends Expr { /** @var Name Constant name */ - public $name; + public Name $name; /** * Constructs a const fetch node. * - * @param Name $name Constant name - * @param array $attributes Additional attributes + * @param Name $name Constant name + * @param array $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php index 4042ec93..d2f30506 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Empty_ extends Expr -{ +class Empty_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an empty() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Empty'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php index 1637f3ae..43010ac4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -10,22 +10,21 @@ use PhpParser\Node\Expr; * An error node may be placed at a position where an expression is required, but an error occurred. * Error nodes will not be present if the parser is run in throwOnError mode (the default). */ -class Error extends Expr -{ +class Error extends Expr { /** * Constructs an error node. * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Error'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php index c44ff6f9..32625a23 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class ErrorSuppress extends Expr -{ +class ErrorSuppress extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an error suppress node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ErrorSuppress'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php index 85685474..5120b1b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Eval_ extends Expr -{ +class Eval_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an eval() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Eval'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php index b88a8f7e..cf002466 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Exit_ extends Expr -{ +class Exit_ extends Expr { /* For use in "kind" attribute */ - const KIND_EXIT = 1; - const KIND_DIE = 2; + public const KIND_EXIT = 1; + public const KIND_DIE = 2; /** @var null|Expr Expression */ - public $expr; + public ?Expr $expr; /** * Constructs an exit() node. * - * @param null|Expr $expr Expression - * @param array $attributes Additional attributes + * @param null|Expr $expr Expression + * @param array $attributes Additional attributes */ - public function __construct(Expr $expr = null, array $attributes = []) { + public function __construct(?Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Exit'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php index 2de4d0dd..0b85840d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -5,31 +5,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; use PhpParser\Node\Expr; -class FuncCall extends CallLike -{ +class FuncCall extends CallLike { /** @var Node\Name|Expr Function name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr $name Function name - * @param array $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $name Function name + * @param array $args Arguments + * @param array $attributes Additional attributes */ - public function __construct($name, array $args = [], array $attributes = []) { + public function __construct(Node $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_FuncCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php index 07ce5968..e1187b19 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -4,24 +4,23 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Include_ extends Expr -{ - const TYPE_INCLUDE = 1; - const TYPE_INCLUDE_ONCE = 2; - const TYPE_REQUIRE = 3; - const TYPE_REQUIRE_ONCE = 4; +class Include_ extends Expr { + public const TYPE_INCLUDE = 1; + public const TYPE_INCLUDE_ONCE = 2; + public const TYPE_REQUIRE = 3; + public const TYPE_REQUIRE_ONCE = 4; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var int Type of include */ - public $type; + public int $type; /** * Constructs an include node. * - * @param Expr $expr Expression - * @param int $type Type of include - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param int $type Type of include + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { $this->attributes = $attributes; @@ -29,11 +28,11 @@ class Include_ extends Expr $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'type']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Include'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php index 9000d47b..a2783cb3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -2,34 +2,34 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; -class Instanceof_ extends Expr -{ +class Instanceof_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var Name|Expr Class name */ - public $class; + public Node $class; /** * Constructs an instanceof check node. * - * @param Expr $expr Expression - * @param Name|Expr $class Class name - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param Name|Expr $class Class name + * @param array $attributes Additional attributes */ - public function __construct(Expr $expr, $class, array $attributes = []) { + public function __construct(Expr $expr, Node $class, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'class']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Instanceof'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php index 76b73875..4f80fff7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Isset_ extends Expr -{ +class Isset_ extends Expr { /** @var Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs an array node. * - * @param Expr[] $vars Variables - * @param array $attributes Additional attributes + * @param Expr[] $vars Variables + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Isset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php index c27a27b9..496b7b38 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -2,29 +2,33 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; -class List_ extends Expr -{ +class List_ extends Expr { + // For use in "kind" attribute + public const KIND_LIST = 1; // list() syntax + public const KIND_ARRAY = 2; // [] syntax + /** @var (ArrayItem|null)[] List of items to assign to */ - public $items; + public array $items; /** * Constructs a list() destructuring node. * - * @param (ArrayItem|null)[] $items List of items to assign to - * @param array $attributes Additional attributes + * @param (ArrayItem|null)[] $items List of items to assign to + * @param array $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_List'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php index 2455a302..cd028a2d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php @@ -5,15 +5,16 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; use PhpParser\Node\MatchArm; -class Match_ extends Node\Expr -{ - /** @var Node\Expr */ - public $cond; +class Match_ extends Node\Expr { + /** @var Node\Expr Condition */ + public Node\Expr $cond; /** @var MatchArm[] */ - public $arms; + public array $arms; /** + * @param Node\Expr $cond Condition * @param MatchArm[] $arms + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { $this->attributes = $attributes; @@ -21,11 +22,11 @@ class Match_ extends Node\Expr $this->arms = $arms; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'arms']; } - public function getType() : string { + public function getType(): string { return 'Expr_Match'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php index 49ca4835..2703c75d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -2,27 +2,27 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class MethodCall extends CallLike -{ +class MethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -31,11 +31,11 @@ class MethodCall extends CallLike $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_MethodCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php index e2bb6492..eedaaa1e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -7,31 +7,30 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\VariadicPlaceholder; -class New_ extends CallLike -{ +class New_ extends CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ - public $class; + public Node $class; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) + * @param array $args Arguments + * @param array $attributes Additional attributes */ - public function __construct($class, array $args = [], array $attributes = []) { + public function __construct(Node $class, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_New'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index 07a571fd..a151f715 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -2,27 +2,27 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class NullsafeMethodCall extends CallLike -{ +class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a nullsafe method call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -31,11 +31,11 @@ class NullsafeMethodCall extends CallLike $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafeMethodCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 9317eb3b..6f73a16d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -2,22 +2,22 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class NullsafePropertyFetch extends Expr -{ +class NullsafePropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a nullsafe property fetch node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; @@ -25,11 +25,11 @@ class NullsafePropertyFetch extends Expr $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafePropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php index 94d6c296..3dca8fdc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PostDec extends Expr -{ +class PostDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post decrement node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php index 005c443a..bc990c30 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PostInc extends Expr -{ +class PostInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post increment node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php index a5ca685a..2f168730 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PreDec extends Expr -{ +class PreDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre decrement node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - public function getType() : string { + public function getType(): string { return 'Expr_PreDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php index 0986c447..fd455f55 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PreInc extends Expr -{ +class PreInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre increment node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PreInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php index 2d43c2ac..60574760 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Print_ extends Expr -{ +class Print_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an print() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Print'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php index 4281f31c..8c416a8c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -2,22 +2,22 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class PropertyFetch extends Expr -{ +class PropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; @@ -25,11 +25,11 @@ class PropertyFetch extends Expr $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php index 537a7cc8..e4003512 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -3,28 +3,28 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; +use PhpParser\Node\InterpolatedStringPart; -class ShellExec extends Expr -{ - /** @var array Encapsed string array */ - public $parts; +class ShellExec extends Expr { + /** @var (Expr|InterpolatedStringPart)[] Interpolated string array */ + public array $parts; /** * Constructs a shell exec (backtick) node. * - * @param array $parts Encapsed string array - * @param array $attributes Additional attributes + * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array + * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; $this->parts = $parts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['parts']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ShellExec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php index d0d099c4..707f34b6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -8,35 +8,34 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class StaticCall extends CallLike -{ +class StaticCall extends CallLike { /** @var Node\Name|Expr Class name */ - public $class; + public Node $class; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a static method call node. * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $args = [], array $attributes = []) { + public function __construct(Node $class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index 1ee1a25e..4836a65b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -2,35 +2,35 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\VarLikeIdentifier; -class StaticPropertyFetch extends Expr -{ +class StaticPropertyFetch extends Expr { /** @var Name|Expr Class name */ - public $class; + public Node $class; /** @var VarLikeIdentifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a static property fetch node. * - * @param Name|Expr $class Class name - * @param string|VarLikeIdentifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Name|Expr $class Class name + * @param string|VarLikeIdentifier|Expr $name Property name + * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticPropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php index 9316f47d..d4837e64 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Ternary extends Expr -{ +class Ternary extends Expr { /** @var Expr Condition */ - public $cond; + public Expr $cond; /** @var null|Expr Expression for true */ - public $if; + public ?Expr $if; /** @var Expr Expression for false */ - public $else; + public Expr $else; /** * Constructs a ternary operator node. * - * @param Expr $cond Condition - * @param null|Expr $if Expression for true - * @param Expr $else Expression for false - * @param array $attributes Additional attributes + * @param Expr $cond Condition + * @param null|Expr $if Expression for true + * @param Expr $else Expression for false + * @param array $attributes Additional attributes */ - public function __construct(Expr $cond, $if, Expr $else, array $attributes = []) { + public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; $this->else = $else; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'if', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Ternary'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php index 5c97f0e2..ee49f835 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; -class Throw_ extends Node\Expr -{ +class Throw_ extends Node\Expr { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs a throw expression node. * - * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - public function getType() : string { + public function getType(): string { return 'Expr_Throw'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php index ce8808bc..cd06f74b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class UnaryMinus extends Expr -{ +class UnaryMinus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary minus node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryMinus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php index d23047e5..1b44f7b3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class UnaryPlus extends Expr -{ +class UnaryPlus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary plus node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryPlus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php index b47d38e9..bab74920 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Variable extends Expr -{ +class Variable extends Expr { /** @var string|Expr Name */ public $name; /** * Constructs a variable node. * - * @param string|Expr $name Name - * @param array $attributes Additional attributes + * @param string|Expr $name Name + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Variable'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php index a3efce61..5cff88f8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class YieldFrom extends Expr -{ +class YieldFrom extends Expr { /** @var Expr Expression to yield from */ - public $expr; + public Expr $expr; /** * Constructs an "yield from" node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_YieldFrom'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php index aef8fc33..bd81e69b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Yield_ extends Expr -{ +class Yield_ extends Expr { /** @var null|Expr Key expression */ - public $key; + public ?Expr $key; /** @var null|Expr Value expression */ - public $value; + public ?Expr $value; /** * Constructs a yield expression node. * - * @param null|Expr $value Value expression - * @param null|Expr $key Key expression - * @param array $attributes Additional attributes + * @param null|Expr $value Value expression + * @param null|Expr $key Key expression + * @param array $attributes Additional attributes */ - public function __construct(Expr $value = null, Expr $key = null, array $attributes = []) { + public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['key', 'value']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Yield'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php index 5a825e73..58f653a8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -4,21 +4,18 @@ namespace PhpParser\Node; use PhpParser\Node; -interface FunctionLike extends Node -{ +interface FunctionLike extends Node { /** * Whether to return by reference - * - * @return bool */ - public function returnsByRef() : bool; + public function returnsByRef(): bool; /** * List of parameters * * @return Param[] */ - public function getParams() : array; + public function getParams(): array; /** * Get the declared return type or null @@ -32,12 +29,12 @@ interface FunctionLike extends Node * * @return Stmt[]|null */ - public function getStmts(); + public function getStmts(): ?array; /** * Get PHP attribute groups. * * @return AttributeGroup[] */ - public function getAttrGroups() : array; + public function getAttrGroups(): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php index 2f262db0..266166cb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php @@ -7,12 +7,12 @@ use PhpParser\NodeAbstract; /** * Represents a non-namespaced name. Namespaced names are represented using Name nodes. */ -class Identifier extends NodeAbstract -{ +class Identifier extends NodeAbstract { /** @var string Identifier as string */ - public $name; + public string $name; - private static $specialClassNames = [ + /** @var array */ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, @@ -21,15 +21,15 @@ class Identifier extends NodeAbstract /** * Constructs an identifier node. * - * @param string $name Identifier as string - * @param array $attributes Additional attributes + * @param string $name Identifier as string + * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } @@ -38,7 +38,7 @@ class Identifier extends NodeAbstract * * @return string Identifier as string. */ - public function toString() : string { + public function toString(): string { return $this->name; } @@ -47,7 +47,7 @@ class Identifier extends NodeAbstract * * @return string Lowercased identifier as string */ - public function toLowerString() : string { + public function toLowerString(): string { return strtolower($this->name); } @@ -56,7 +56,7 @@ class Identifier extends NodeAbstract * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { + public function isSpecialClassName(): bool { return isset(self::$specialClassNames[strtolower($this->name)]); } @@ -65,11 +65,11 @@ class Identifier extends NodeAbstract * * @return string Identifier as string */ - public function __toString() : string { + public function __toString(): string { return $this->name; } - - public function getType() : string { + + public function getType(): string { return 'Identifier'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php index 9208e139..3b39cf10 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php @@ -2,29 +2,26 @@ namespace PhpParser\Node; -use PhpParser\NodeAbstract; - -class IntersectionType extends ComplexType -{ +class IntersectionType extends ComplexType { /** @var (Identifier|Name)[] Types */ - public $types; + public array $types; /** * Constructs an intersection type. * - * @param (Identifier|Name)[] $types Types - * @param array $attributes Additional attributes + * @param (Identifier|Name)[] $types Types + * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - public function getType() : string { + public function getType(): string { return 'IntersectionType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php index 2ae1c86b..2927f029 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php @@ -5,27 +5,26 @@ namespace PhpParser\Node; use PhpParser\Node; use PhpParser\NodeAbstract; -class MatchArm extends NodeAbstract -{ - /** @var null|Node\Expr[] */ - public $conds; +class MatchArm extends NodeAbstract { + /** @var null|list */ + public ?array $conds; /** @var Node\Expr */ - public $body; + public Expr $body; /** - * @param null|Node\Expr[] $conds + * @param null|list $conds */ - public function __construct($conds, Node\Expr $body, array $attributes = []) { + public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { $this->conds = $conds; $this->body = $body; $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['conds', 'body']; } - public function getType() : string { + public function getType(): string { return 'MatchArm'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php index 6b1cc9f8..26b863e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -4,12 +4,12 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -class Name extends NodeAbstract -{ - /** @var string[] Parts of the name */ - public $parts; +class Name extends NodeAbstract { + /** @var string Name as string */ + public string $name; - private static $specialClassNames = [ + /** @var array */ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, @@ -18,16 +18,25 @@ class Name extends NodeAbstract /** * Constructs a name node. * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes + * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) + * @param array $attributes Additional attributes */ - public function __construct($name, array $attributes = []) { + final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; - $this->parts = self::prepareName($name); + $this->name = self::prepareName($name); } - public function getSubNodeNames() : array { - return ['parts']; + public function getSubNodeNames(): array { + return ['name']; + } + + /** + * Get parts of name (split by the namespace separator). + * + * @return string[] Parts of name + */ + public function getParts(): array { + return \explode('\\', $this->name); } /** @@ -35,8 +44,11 @@ class Name extends NodeAbstract * * @return string First part of the name */ - public function getFirst() : string { - return $this->parts[0]; + public function getFirst(): string { + if (false !== $pos = \strpos($this->name, '\\')) { + return \substr($this->name, 0, $pos); + } + return $this->name; } /** @@ -44,8 +56,11 @@ class Name extends NodeAbstract * * @return string Last part of the name */ - public function getLast() : string { - return $this->parts[count($this->parts) - 1]; + public function getLast(): string { + if (false !== $pos = \strrpos($this->name, '\\')) { + return \substr($this->name, $pos + 1); + } + return $this->name; } /** @@ -53,8 +68,8 @@ class Name extends NodeAbstract * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { - return 1 === count($this->parts); + public function isUnqualified(): bool { + return false === \strpos($this->name, '\\'); } /** @@ -62,8 +77,8 @@ class Name extends NodeAbstract * * @return bool Whether the name is qualified */ - public function isQualified() : bool { - return 1 < count($this->parts); + public function isQualified(): bool { + return false !== \strpos($this->name, '\\'); } /** @@ -71,7 +86,7 @@ class Name extends NodeAbstract * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -80,7 +95,7 @@ class Name extends NodeAbstract * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } @@ -90,8 +105,8 @@ class Name extends NodeAbstract * * @return string String representation */ - public function toString() : string { - return implode('\\', $this->parts); + public function toString(): string { + return $this->name; } /** @@ -100,7 +115,7 @@ class Name extends NodeAbstract * * @return string String representation */ - public function toCodeString() : string { + public function toCodeString(): string { return $this->toString(); } @@ -110,8 +125,8 @@ class Name extends NodeAbstract * * @return string Lowercased string representation */ - public function toLowerString() : string { - return strtolower(implode('\\', $this->parts)); + public function toLowerString(): string { + return strtolower($this->name); } /** @@ -119,9 +134,8 @@ class Name extends NodeAbstract * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { - return count($this->parts) === 1 - && isset(self::$specialClassNames[strtolower($this->parts[0])]); + public function isSpecialClassName(): bool { + return isset(self::$specialClassNames[strtolower($this->name)]); } /** @@ -130,8 +144,8 @@ class Name extends NodeAbstract * * @return string String representation */ - public function __toString() : string { - return implode('\\', $this->parts); + public function __toString(): string { + return $this->name; } /** @@ -145,13 +159,22 @@ class Name extends NodeAbstract * * Offset and length have the same meaning as in array_slice(). * - * @param int $offset Offset to start the slice at (may be negative) + * @param int $offset Offset to start the slice at (may be negative) * @param int|null $length Length of the slice (may be negative) * * @return static|null Sliced name */ - public function slice(int $offset, int $length = null) { - $numParts = count($this->parts); + public function slice(int $offset, ?int $length = null) { + if ($offset === 1 && $length === null) { + // Short-circuit the common case. + if (false !== $pos = \strpos($this->name, '\\')) { + return new static(\substr($this->name, $pos + 1)); + } + return null; + } + + $parts = \explode('\\', $this->name); + $numParts = \count($parts); $realOffset = $offset < 0 ? $offset + $numParts : $offset; if ($realOffset < 0 || $realOffset > $numParts) { @@ -162,7 +185,7 @@ class Name extends NodeAbstract $realLength = $numParts - $realOffset; } else { $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts) { + if ($realLength < 0 || $realLength > $numParts - $realOffset) { throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); } } @@ -172,7 +195,7 @@ class Name extends NodeAbstract return null; } - return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes); + return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); } /** @@ -186,49 +209,53 @@ class Name extends NodeAbstract * Name::concat($namespace, $shortName) * where $namespace is a Name node or null will work as expected. * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name + * @param string|string[]|self|null $name1 The first name + * @param string|string[]|self|null $name2 The second name + * @param array $attributes Attributes to assign to concatenated name * * @return static|null Concatenated name */ public static function concat($name1, $name2, array $attributes = []) { if (null === $name1 && null === $name2) { return null; - } elseif (null === $name1) { - return new static(self::prepareName($name2), $attributes); - } elseif (null === $name2) { - return new static(self::prepareName($name1), $attributes); + } + if (null === $name1) { + return new static($name2, $attributes); + } + if (null === $name2) { + return new static($name1, $attributes); } else { return new static( - array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes + self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes ); } } /** * Prepares a (string, array or Name node) name for use in name changing methods by converting - * it to an array. + * it to a string. * * @param string|string[]|self $name Name to prepare * - * @return string[] Prepared name + * @return string Prepared name */ - private static function prepareName($name) : array { + private static function prepareName($name): string { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); } - return explode('\\', $name); - } elseif (\is_array($name)) { + return $name; + } + if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } - return $name; - } elseif ($name instanceof self) { - return $name->parts; + return implode('\\', $name); + } + if ($name instanceof self) { + return $name->name; } throw new \InvalidArgumentException( @@ -236,7 +263,7 @@ class Name extends NodeAbstract ); } - public function getType() : string { + public function getType(): string { return 'Name'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php index 1df93a56..21183786 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class FullyQualified extends \PhpParser\Node\Name -{ +class FullyQualified extends \PhpParser\Node\Name { /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return true; } @@ -36,15 +35,15 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } - public function toCodeString() : string { + public function toCodeString(): string { return '\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_FullyQualified'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php index 57bf7af2..0226a4e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class Relative extends \PhpParser\Node\Name -{ +class Relative extends \PhpParser\Node\Name { /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -36,15 +35,15 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return true; } - public function toCodeString() : string { + public function toCodeString(): string { return 'namespace\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_Relative'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php index d68e26a3..b99acd13 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -2,27 +2,28 @@ namespace PhpParser\Node; -class NullableType extends ComplexType -{ +use PhpParser\Node; + +class NullableType extends ComplexType { /** @var Identifier|Name Type */ - public $type; + public Node $type; /** * Constructs a nullable type (wrapping another type). * - * @param string|Identifier|Name $type Type - * @param array $attributes Additional attributes + * @param Identifier|Name $type Type + * @param array $attributes Additional attributes */ - public function __construct($type, array $attributes = []) { + public function __construct(Node $type, array $attributes = []) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type']; } - - public function getType() : string { + + public function getType(): string { return 'NullableType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index 1e90b794..0e9ff0e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -2,46 +2,47 @@ namespace PhpParser\Node; +use PhpParser\Modifiers; +use PhpParser\Node; use PhpParser\NodeAbstract; -class Param extends NodeAbstract -{ +class Param extends NodeAbstract { /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var bool Whether parameter is passed by reference */ - public $byRef; + public bool $byRef; /** @var bool Whether this is a variadic argument */ - public $variadic; + public bool $variadic; /** @var Expr\Variable|Expr\Error Parameter variable */ - public $var; + public Expr $var; /** @var null|Expr Default value */ - public $default; - /** @var int */ - public $flags; + public ?Expr $default; + /** @var int Optional visibility flags */ + public int $flags; /** @var AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value - * @param null|string|Identifier|Name|ComplexType $type Type declaration - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes - * @param int $flags Optional visibility flags - * @param AttributeGroup[] $attrGroups PHP attribute groups + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value + * @param null|Identifier|Name|ComplexType $type Type declaration + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument + * @param array $attributes Additional attributes + * @param int $flags Optional visibility flags + * @param list $attrGroups PHP attribute groups */ public function __construct( - $var, Expr $default = null, $type = null, + Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [] ) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->byRef = $byRef; $this->variadic = $variadic; $this->var = $var; @@ -50,11 +51,34 @@ class Param extends NodeAbstract $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; } - public function getType() : string { + public function getType(): string { return 'Param'; } + + /** + * Whether this parameter uses constructor property promotion. + */ + public function isPromoted(): bool { + return $this->flags !== 0; + } + + public function isPublic(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC); + } + + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php index 8117909b..3df25721 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php @@ -2,6 +2,5 @@ namespace PhpParser\Node; -abstract class Scalar extends Expr -{ +abstract class Scalar extends Expr { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php index 29ce0dd4..ad3937a5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php @@ -1,70 +1,3 @@ attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * @internal - * - * Parses a DNUMBER token like PHP would. - * - * @param string $str A string number - * - * @return float The parsed number - */ - public static function parse(string $str) : float { - $str = str_replace('_', '', $str); - - // if string contains any of .eE just cast it to float - if (false !== strpbrk($str, '.eE')) { - return (float) $str; - } - - // otherwise it's an integer notation that overflowed into a float - // if it starts with 0 it's one of the special integer notations - if ('0' === $str[0]) { - // hex - if ('x' === $str[1] || 'X' === $str[1]) { - return hexdec($str); - } - - // bin - if ('b' === $str[1] || 'B' === $str[1]) { - return bindec($str); - } - - // oct - // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9) - // so that only the digits before that are used - return octdec(substr($str, 0, strcspn($str, '89'))); - } - - // dec - return (float) $str; - } - - public function getType() : string { - return 'Scalar_DNumber'; - } -} +require __DIR__ . '/Float_.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php index fa5d2e26..c5aaf5b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php @@ -1,31 +1,3 @@ attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames() : array { - return ['parts']; - } - - public function getType() : string { - return 'Scalar_Encapsed'; - } -} +require __DIR__ . '/InterpolatedString.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php index bb3194c1..990e9801 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -1,30 +1,3 @@ attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - public function getType() : string { - return 'Scalar_EncapsedStringPart'; - } -} +require __DIR__ . '/../InterpolatedStringPart.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php index f17dd1f8..cfe8c8c1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -1,78 +1,3 @@ attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * Constructs an LNumber node from a string number literal. - * - * @param string $str String number literal (decimal, octal, hex or binary) - * @param array $attributes Additional attributes - * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) - * - * @return LNumber The constructed LNumber, including kind attribute - */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { - $str = str_replace('_', '', $str); - - if ('0' !== $str[0] || '0' === $str) { - $attributes['kind'] = LNumber::KIND_DEC; - return new LNumber((int) $str, $attributes); - } - - if ('x' === $str[1] || 'X' === $str[1]) { - $attributes['kind'] = LNumber::KIND_HEX; - return new LNumber(hexdec($str), $attributes); - } - - if ('b' === $str[1] || 'B' === $str[1]) { - $attributes['kind'] = LNumber::KIND_BIN; - return new LNumber(bindec($str), $attributes); - } - - if (!$allowInvalidOctal && strpbrk($str, '89')) { - throw new Error('Invalid numeric literal', $attributes); - } - - // Strip optional explicit octal prefix. - if ('o' === $str[1] || 'O' === $str[1]) { - $str = substr($str, 2); - } - - // use intval instead of octdec to get proper cutting behavior with malformed numbers - $attributes['kind'] = LNumber::KIND_OCT; - return new LNumber(intval($str, 8), $attributes); - } - - public function getType() : string { - return 'Scalar_LNumber'; - } -} +require __DIR__ . '/Int_.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php index 941f0c76..1da9b391 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php @@ -4,18 +4,17 @@ namespace PhpParser\Node\Scalar; use PhpParser\Node\Scalar; -abstract class MagicConst extends Scalar -{ +abstract class MagicConst extends Scalar { /** * Constructs a magic constant node. * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } @@ -24,5 +23,5 @@ abstract class MagicConst extends Scalar * * @return string Name of magic constant */ - abstract public function getName() : string; + abstract public function getName(): string; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php index 24432847..732ed140 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Class_ extends MagicConst -{ - public function getName() : string { +class Class_ extends MagicConst { + public function getName(): string { return '__CLASS__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Class'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php index 2b618473..64daa713 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Dir extends MagicConst -{ - public function getName() : string { +class Dir extends MagicConst { + public function getName(): string { return '__DIR__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Dir'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php index 3422db06..91041f0f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class File extends MagicConst -{ - public function getName() : string { +class File extends MagicConst { + public function getName(): string { return '__FILE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_File'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php index 1db65a15..c242d2d9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Function_ extends MagicConst -{ - public function getName() : string { +class Function_ extends MagicConst { + public function getName(): string { return '__FUNCTION__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Function'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php index 25d3de57..58d8ce39 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Line extends MagicConst -{ - public function getName() : string { +class Line extends MagicConst { + public function getName(): string { return '__LINE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Line'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php index d168d56f..47f341f1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Method extends MagicConst -{ - public function getName() : string { +class Method extends MagicConst { + public function getName(): string { return '__METHOD__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Method'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php index 4fabb751..e9f8c0ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Namespace_ extends MagicConst -{ - public function getName() : string { +class Namespace_ extends MagicConst { + public function getName(): string { return '__NAMESPACE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Namespace'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php index 5ee7e40a..25f49731 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Trait_ extends MagicConst -{ - public function getName() : string { +class Trait_ extends MagicConst { + public function getName(): string { return '__TRAIT__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Trait'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php index 8a6d93a4..c965366d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php @@ -5,18 +5,18 @@ namespace PhpParser\Node\Scalar; use PhpParser\Error; use PhpParser\Node\Scalar; -class String_ extends Scalar -{ +class String_ extends Scalar { /* For use in "kind" attribute */ - const KIND_SINGLE_QUOTED = 1; - const KIND_DOUBLE_QUOTED = 2; - const KIND_HEREDOC = 3; - const KIND_NOWDOC = 4; + public const KIND_SINGLE_QUOTED = 1; + public const KIND_DOUBLE_QUOTED = 2; + public const KIND_HEREDOC = 3; + public const KIND_NOWDOC = 4; /** @var string String value */ - public $value; + public string $value; - protected static $replacements = [ + /** @var array Escaped character to its decoded value */ + protected static array $replacements = [ '\\' => '\\', '$' => '$', 'n' => "\n", @@ -30,18 +30,34 @@ class String_ extends Scalar /** * Constructs a string scalar node. * - * @param string $value Value of the string - * @param array $attributes Additional attributes + * @param string $value Value of the string + * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } + /** + * @param array $attributes + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + */ + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { + $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) + ? Scalar\String_::KIND_SINGLE_QUOTED + : Scalar\String_::KIND_DOUBLE_QUOTED; + + $attributes['rawValue'] = $str; + + $string = self::parse($str, $parseUnicodeEscape); + + return new self($string, $attributes); + } + /** * @internal * @@ -52,7 +68,7 @@ class String_ extends Scalar * * @return string The parsed string */ - public static function parse(string $str, bool $parseUnicodeEscape = true) : string { + public static function parse(string $str, bool $parseUnicodeEscape = true): string { $bLength = 0; if ('b' === $str[0] || 'B' === $str[0]) { $bLength = 1; @@ -76,13 +92,13 @@ class String_ extends Scalar * * Parses escape sequences in strings (all string types apart from single quoted). * - * @param string $str String without quotes + * @param string $str String without quotes * @param null|string $quote Quote type * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes * * @return string String with escape sequences parsed */ - public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string { + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { if (null !== $quote) { $str = str_replace('\\' . $quote, $quote, $str); } @@ -94,15 +110,19 @@ class String_ extends Scalar return preg_replace_callback( '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function($matches) { + function ($matches) { $str = $matches[1]; if (isset(self::$replacements[$str])) { return self::$replacements[$str]; - } elseif ('x' === $str[0] || 'X' === $str[0]) { + } + if ('x' === $str[0] || 'X' === $str[0]) { return chr(hexdec(substr($str, 1))); - } elseif ('u' === $str[0]) { - return self::codePointToUtf8(hexdec($matches[2])); + } + if ('u' === $str[0]) { + $dec = hexdec($matches[2]); + // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. + return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); } else { return chr(octdec($str)); } @@ -118,24 +138,24 @@ class String_ extends Scalar * * @return string UTF-8 representation of code point */ - private static function codePointToUtf8(int $num) : string { + private static function codePointToUtf8(int $num): string { if ($num <= 0x7F) { return chr($num); } if ($num <= 0x7FF) { - return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80); + return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); } if ($num <= 0xFFFF) { - return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } if ($num <= 0x1FFFFF) { - return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80) - . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) + . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); } - public function getType() : string { + public function getType(): string { return 'Scalar_String'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php index 69d33e57..481d31a9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php @@ -4,6 +4,5 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -abstract class Stmt extends NodeAbstract -{ +abstract class Stmt extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php index 6adc5a6c..d2bcc5eb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Break_ extends Node\Stmt -{ +class Break_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to break */ - public $num; + public ?Node\Expr $num; /** * Constructs a break node. * - * @param null|Node\Expr $num Number of loops to break - * @param array $attributes Additional attributes + * @param null|Node\Expr $num Number of loops to break + * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Break'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index 2bf044c9..a06ca183 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Case_ extends Node\Stmt -{ +class Case_ extends Node\Stmt { /** @var null|Node\Expr Condition (null for default) */ - public $cond; + public ?Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a case node. * - * @param null|Node\Expr $cond Condition (null for default) - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param null|Node\Expr $cond Condition (null for default) + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ - public function __construct($cond, array $stmts = [], array $attributes = []) { + public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Case'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php index 9b9c0947..e8d39c9c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -5,25 +5,24 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\Expr; -class Catch_ extends Node\Stmt -{ +class Catch_ extends Node\Stmt { /** @var Node\Name[] Types of exceptions to catch */ - public $types; + public array $types; /** @var Expr\Variable|null Variable for exception */ - public $var; + public ?Expr\Variable $var; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a catch node. * - * @param Node\Name[] $types Types of exceptions to catch - * @param Expr\Variable|null $var Variable for exception - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Name[] $types Types of exceptions to catch + * @param Expr\Variable|null $var Variable for exception + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct( - array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = [] + array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] ) { $this->attributes = $attributes; $this->types = $types; @@ -31,11 +30,11 @@ class Catch_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types', 'var', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Catch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php index 1fc7f336..9bdce1f1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -2,79 +2,76 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; -class ClassConst extends Node\Stmt -{ +class ClassConst extends Node\Stmt { /** @var int Modifiers */ - public $flags; + public int $flags; /** @var Node\Const_[] Constant declarations */ - public $consts; - /** @var Node\AttributeGroup[] */ - public $attrGroups; + public array $consts; + /** @var Node\AttributeGroup[] PHP attribute groups */ + public array $attrGroups; + /** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */ + public ?Node $type; /** * Constructs a class const list node. * - * @param Node\Const_[] $consts Constant declarations - * @param int $flags Modifiers - * @param array $attributes Additional attributes - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param Node\Const_[] $consts Constant declarations + * @param int $flags Modifiers + * @param array $attributes Additional attributes + * @param list $attrGroups PHP attribute groups + * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ public function __construct( array $consts, int $flags = 0, array $attributes = [], - array $attrGroups = [] + array $attrGroups = [], + ?Node $type = null ) { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; + $this->type = $type; } - public function getSubNodeNames() : array { - return ['attrGroups', 'flags', 'consts']; + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'type', 'consts']; } /** * Whether constant is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether constant is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether constant is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether constant is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassConst'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php index 6c336917..fb9ba4f5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -3,23 +3,23 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\PropertyItem; -abstract class ClassLike extends Node\Stmt -{ +abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ - public $name; + public ?Node\Identifier $name; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ - public $namespacedName; + /** @var Node\Name|null Namespaced name (if using NameResolver) */ + public ?Node\Name $namespacedName; /** * @return TraitUse[] */ - public function getTraitUses() : array { + public function getTraitUses(): array { $traitUses = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof TraitUse) { @@ -32,7 +32,7 @@ abstract class ClassLike extends Node\Stmt /** * @return ClassConst[] */ - public function getConstants() : array { + public function getConstants(): array { $constants = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassConst) { @@ -45,7 +45,7 @@ abstract class ClassLike extends Node\Stmt /** * @return Property[] */ - public function getProperties() : array { + public function getProperties(): array { $properties = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { @@ -62,11 +62,11 @@ abstract class ClassLike extends Node\Stmt * * @return Property|null Property node or null if the property does not exist */ - public function getProperty(string $name) { + public function getProperty(string $name): ?Property { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) { + if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { return $stmt; } } @@ -80,7 +80,7 @@ abstract class ClassLike extends Node\Stmt * * @return ClassMethod[] */ - public function getMethods() : array { + public function getMethods(): array { $methods = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod) { @@ -97,7 +97,7 @@ abstract class ClassLike extends Node\Stmt * * @return ClassMethod|null Method node or null if the method does not exist */ - public function getMethod(string $name) { + public function getMethod(string $name): ?ClassMethod { $lowerName = strtolower($name); foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 09b877a9..59c0519e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -2,56 +2,66 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\FunctionLike; -class ClassMethod extends Node\Stmt implements FunctionLike -{ +class ClassMethod extends Node\Stmt implements FunctionLike { /** @var int Flags */ - public $flags; + public int $flags; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; - private static $magicNames = [ - '__construct' => true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, + /** @var array */ + private static array $magicNames = [ + '__construct' => true, + '__destruct' => true, + '__call' => true, + '__callstatic' => true, + '__get' => true, + '__set' => true, + '__isset' => true, + '__unset' => true, + '__sleep' => true, + '__wakeup' => true, + '__tostring' => true, + '__set_state' => true, + '__clone' => true, + '__invoke' => true, + '__debuginfo' => true, + '__serialize' => true, + '__unserialize' => true, ]; /** * Constructs a class method node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags => MODIFIER_PUBLIC: Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * flags?: int, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[]|null, + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags => 0 : Flags + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -59,21 +69,20 @@ class ClassMethod extends Node\Stmt implements FunctionLike $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -81,79 +90,65 @@ class ClassMethod extends Node\Stmt implements FunctionLike return $this->returnType; } - public function getStmts() { + public function getStmts(): ?array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** * Whether the method is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the method is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the method is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the method is abstract. - * - * @return bool */ - public function isAbstract() : bool { - return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT); + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the method is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); } /** * Whether the method is static. - * - * @return bool */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the method is magic. - * - * @return bool */ - public function isMagic() : bool { + public function isMagic(): bool { return isset(self::$magicNames[$this->name->toLowerString()]); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassMethod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php index b290aaf6..3f492b7b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -2,39 +2,52 @@ namespace PhpParser\Node\Stmt; -use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; -class Class_ extends ClassLike -{ - const MODIFIER_PUBLIC = 1; - const MODIFIER_PROTECTED = 2; - const MODIFIER_PRIVATE = 4; - const MODIFIER_STATIC = 8; - const MODIFIER_ABSTRACT = 16; - const MODIFIER_FINAL = 32; - const MODIFIER_READONLY = 64; +class Class_ extends ClassLike { + /** @deprecated Use Modifiers::PUBLIC instead */ + public const MODIFIER_PUBLIC = 1; + /** @deprecated Use Modifiers::PROTECTED instead */ + public const MODIFIER_PROTECTED = 2; + /** @deprecated Use Modifiers::PRIVATE instead */ + public const MODIFIER_PRIVATE = 4; + /** @deprecated Use Modifiers::STATIC instead */ + public const MODIFIER_STATIC = 8; + /** @deprecated Use Modifiers::ABSTRACT instead */ + public const MODIFIER_ABSTRACT = 16; + /** @deprecated Use Modifiers::FINAL instead */ + public const MODIFIER_FINAL = 32; + /** @deprecated Use Modifiers::READONLY instead */ + public const MODIFIER_READONLY = 64; - const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 + /** @deprecated Use Modifiers::VISIBILITY_MASK instead */ + public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 - /** @var int Type */ - public $flags; + /** @var int Modifiers */ + public int $flags; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** * Constructs a class node. * * @param string|Node\Identifier|null $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags' => 0 : Flags - * 'extends' => null : Name of extended class - * 'implements' => array(): Names of implemented interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * flags?: int, + * extends?: Node\Name|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags' => 0 : Flags + * 'extends' => null : Name of extended class + * 'implements' => array(): Names of implemented interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -46,67 +59,36 @@ class Class_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; } /** * Whether the class is explicitly abstract. - * - * @return bool */ - public function isAbstract() : bool { - return (bool) ($this->flags & self::MODIFIER_ABSTRACT); + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the class is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & self::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); } /** * Whether the class is anonymous. - * - * @return bool */ - public function isAnonymous() : bool { + public function isAnonymous(): bool { return null === $this->name; } - /** - * @internal - */ - public static function verifyModifier($a, $b) { - if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) { - throw new Error('Multiple static modifiers are not allowed'); - } - - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } - - public function getType() : string { + public function getType(): string { return 'Stmt_Class'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php index e6316345..f1165fd0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Const_ extends Node\Stmt -{ +class Const_ extends Node\Stmt { /** @var Node\Const_[] Constant declarations */ - public $consts; + public array $consts; /** * Constructs a const list node. * - * @param Node\Const_[] $consts Constant declarations - * @param array $attributes Additional attributes + * @param Node\Const_[] $consts Constant declarations + * @param array $attributes Additional attributes */ public function __construct(array $consts, array $attributes = []) { $this->attributes = $attributes; $this->consts = $consts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['consts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php index 24882683..54e979dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Continue_ extends Node\Stmt -{ +class Continue_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to continue */ - public $num; + public ?Node\Expr $num; /** * Constructs a continue node. * - * @param null|Node\Expr $num Number of loops to continue - * @param array $attributes Additional attributes + * @param null|Node\Expr $num Number of loops to continue + * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Continue'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php index ac07f30c..cb9e8376 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -1,34 +1,3 @@ value pair node. - * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value - * @param array $attributes Additional attributes - */ - public function __construct($key, Node\Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->key = \is_string($key) ? new Node\Identifier($key) : $key; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['key', 'value']; - } - - public function getType() : string { - return 'Stmt_DeclareDeclare'; - } -} +require __DIR__ . '/../DeclareItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php index f46ff0ba..3c0547bd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php @@ -3,32 +3,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\DeclareItem; -class Declare_ extends Node\Stmt -{ - /** @var DeclareDeclare[] List of declares */ - public $declares; +class Declare_ extends Node\Stmt { + /** @var DeclareItem[] List of declares */ + public array $declares; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** * Constructs a declare node. * - * @param DeclareDeclare[] $declares List of declares - * @param Node\Stmt[]|null $stmts Statements - * @param array $attributes Additional attributes + * @param DeclareItem[] $declares List of declares + * @param Node\Stmt[]|null $stmts Statements + * @param array $attributes Additional attributes */ - public function __construct(array $declares, array $stmts = null, array $attributes = []) { + public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['declares', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Declare'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php index 78e90da0..61244428 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Do_ extends Node\Stmt -{ +class Do_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** * Constructs a do while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Do_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'cond']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Do'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php index 7cc50d5d..4d424523 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Echo_ extends Node\Stmt -{ +class Echo_ extends Node\Stmt { /** @var Node\Expr[] Expressions */ - public $exprs; + public array $exprs; /** * Constructs an echo node. * - * @param Node\Expr[] $exprs Expressions - * @param array $attributes Additional attributes + * @param Node\Expr[] $exprs Expressions + * @param array $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { $this->attributes = $attributes; $this->exprs = $exprs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['exprs']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Echo'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php index eef1ece3..b26d59ce 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class ElseIf_ extends Node\Stmt -{ +class ElseIf_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an elseif node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class ElseIf_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_ElseIf'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php index 0e61778e..3d2b066e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Else_ extends Node\Stmt -{ +class Else_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an else node. * - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Else'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php index 5beff8b3..c071a0af 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php @@ -5,33 +5,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\AttributeGroup; -class EnumCase extends Node\Stmt -{ +class EnumCase extends Node\Stmt { /** @var Node\Identifier Enum case name */ - public $name; + public Node\Identifier $name; /** @var Node\Expr|null Enum case expression */ - public $expr; + public ?Node\Expr $expr; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** - * @param string|Node\Identifier $name Enum case name - * @param Node\Expr|null $expr Enum case expression - * @param AttributeGroup[] $attrGroups PHP attribute groups - * @param array $attributes Additional attributes + * @param string|Node\Identifier $name Enum case name + * @param Node\Expr|null $expr Enum case expression + * @param list $attrGroups PHP attribute groups + * @param array $attributes Additional attributes */ - public function __construct($name, Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { + public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { parent::__construct($attributes); $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->expr = $expr; $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'expr']; } - public function getType() : string { + public function getType(): string { return 'Stmt_EnumCase'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php index 3a50c225..7eea6a69 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php @@ -4,21 +4,25 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Enum_ extends ClassLike -{ +class Enum_ extends ClassLike { /** @var null|Node\Identifier Scalar Type */ - public $scalarType; + public ?Node $scalarType; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** - * @param string|Node\Identifier|null $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'scalarType' => null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param string|Node\Identifier|null $name Name + * @param array{ + * scalarType?: Node\Identifier|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'scalarType' => null : Scalar type + * 'implements' => array() : Names of implemented interfaces + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->name = \is_string($name) ? new Node\Identifier($name) : $name; @@ -30,11 +34,11 @@ class Enum_ extends ClassLike parent::__construct($attributes); } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Enum'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php index 99d1687d..89751fa2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php @@ -7,27 +7,26 @@ use PhpParser\Node; /** * Represents statements of type "expr;" */ -class Expression extends Node\Stmt -{ +class Expression extends Node\Stmt { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs an expression statement. * - * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Expression'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php index d55b8b68..69ecf253 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Finally_ extends Node\Stmt -{ +class Finally_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a finally node. * - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Finally'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php index 1323d37c..6f2fbb9e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -4,26 +4,30 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class For_ extends Node\Stmt -{ +class For_ extends Node\Stmt { /** @var Node\Expr[] Init expressions */ - public $init; + public array $init; /** @var Node\Expr[] Loop conditions */ - public $cond; + public array $cond; /** @var Node\Expr[] Loop expressions */ - public $loop; + public array $loop; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a for loop node. * - * @param array $subNodes Array of the following optional subnodes: - * 'init' => array(): Init expressions - * 'cond' => array(): Loop conditions - * 'loop' => array(): Loop expressions - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param array{ + * init?: Node\Expr[], + * cond?: Node\Expr[], + * loop?: Node\Expr[], + * stmts?: Node\Stmt[], + * } $subNodes Array of the following optional subnodes: + * 'init' => array(): Init expressions + * 'cond' => array(): Loop conditions + * 'loop' => array(): Loop expressions + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -33,11 +37,11 @@ class For_ extends Node\Stmt $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['init', 'cond', 'loop', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_For'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php index 0556a7ce..c5d9a8b1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -4,29 +4,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Foreach_ extends Node\Stmt -{ +class Foreach_ extends Node\Stmt { /** @var Node\Expr Expression to iterate */ - public $expr; + public Node\Expr $expr; /** @var null|Node\Expr Variable to assign key to */ - public $keyVar; + public ?Node\Expr $keyVar; /** @var bool Whether to assign value by reference */ - public $byRef; + public bool $byRef; /** @var Node\Expr Variable to assign value to */ - public $valueVar; + public Node\Expr $valueVar; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a foreach node. * - * @param Node\Expr $expr Expression to iterate - * @param Node\Expr $valueVar Variable to assign value to - * @param array $subNodes Array of the following optional subnodes: - * 'keyVar' => null : Variable to assign key to - * 'byRef' => false : Whether to assign value by reference - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression to iterate + * @param Node\Expr $valueVar Variable to assign value to + * @param array{ + * keyVar?: Node\Expr|null, + * byRef?: bool, + * stmts?: Node\Stmt[], + * } $subNodes Array of the following optional subnodes: + * 'keyVar' => null : Variable to assign key to + * 'byRef' => false : Whether to assign value by reference + * 'stmts' => array(): Statements + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -37,11 +40,11 @@ class Foreach_ extends Node\Stmt $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Foreach'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index abb7ee5c..2111bab7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -5,56 +5,60 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\FunctionLike; -class Function_ extends Node\Stmt implements FunctionLike -{ +class Function_ extends Node\Stmt implements FunctionLike { /** @var bool Whether function returns by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ - public $namespacedName; + /** @var Node\Name|null Namespaced name (if using NameResolver) */ + public ?Node\Name $namespacedName; /** * Constructs a function node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,16 +66,16 @@ class Function_ extends Node\Stmt implements FunctionLike return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getType() : string { + public function getType(): string { return 'Stmt_Function'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php index a0022ad9..d3ab12fc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Global_ extends Node\Stmt -{ +class Global_ extends Node\Stmt { /** @var Node\Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs a global variables list node. * - * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param Node\Expr[] $vars Variables to unset + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Global'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php index 24a57f78..26a0d01e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Goto_ extends Stmt -{ +class Goto_ extends Stmt { /** @var Identifier Name of label to jump to */ - public $name; + public Identifier $name; /** * Constructs a goto node. * - * @param string|Identifier $name Name of label to jump to - * @param array $attributes Additional attributes + * @param string|Identifier $name Name of label to jump to + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Goto'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php index 24520d22..0ec8e9d4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -4,23 +4,25 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Name; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; -class GroupUse extends Stmt -{ - /** @var int Type of group use */ - public $type; +class GroupUse extends Stmt { + /** + * @var Use_::TYPE_* Type of group use + */ + public int $type; /** @var Name Prefix for uses */ - public $prefix; - /** @var UseUse[] Uses */ - public $uses; + public Name $prefix; + /** @var UseItem[] Uses */ + public array $uses; /** * Constructs a group use node. * - * @param Name $prefix Prefix for uses - * @param UseUse[] $uses Uses - * @param int $type Type of group use - * @param array $attributes Additional attributes + * @param Name $prefix Prefix for uses + * @param UseItem[] $uses Uses + * @param Use_::TYPE_* $type Type of group use + * @param array $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; @@ -29,11 +31,11 @@ class GroupUse extends Stmt $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'prefix', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_GroupUse'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php index 8e624e0f..665bacde 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; -class HaltCompiler extends Stmt -{ +class HaltCompiler extends Stmt { /** @var string Remaining text after halt compiler statement. */ - public $remaining; + public string $remaining; /** * Constructs a __halt_compiler node. * - * @param string $remaining Remaining text after halt compiler statement. - * @param array $attributes Additional attributes + * @param string $remaining Remaining text after halt compiler statement. + * @param array $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { $this->attributes = $attributes; $this->remaining = $remaining; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['remaining']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_HaltCompiler'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php index a1bae4bf..544390ff 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -4,26 +4,29 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class If_ extends Node\Stmt -{ +class If_ extends Node\Stmt { /** @var Node\Expr Condition expression */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var ElseIf_[] Elseif clauses */ - public $elseifs; + public array $elseifs; /** @var null|Else_ Else clause */ - public $else; + public ?Else_ $else; /** * Constructs an if node. * - * @param Node\Expr $cond Condition - * @param array $subNodes Array of the following optional subnodes: - * 'stmts' => array(): Statements - * 'elseifs' => array(): Elseif clauses - * 'else' => null : Else clause - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param array{ + * stmts?: Node\Stmt[], + * elseifs?: ElseIf_[], + * else?: Else_|null, + * } $subNodes Array of the following optional subnodes: + * 'stmts' => array(): Statements + * 'elseifs' => array(): Elseif clauses + * 'else' => null : Else clause + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -33,11 +36,11 @@ class If_ extends Node\Stmt $this->else = $subNodes['else'] ?? null; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts', 'elseifs', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_If'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php index 0711d284..0515d020 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; -class InlineHTML extends Stmt -{ +class InlineHTML extends Stmt { /** @var string String */ - public $value; + public string $value; /** * Constructs an inline HTML node. * - * @param string $value String - * @param array $attributes Additional attributes + * @param string $value String + * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_InlineHTML'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php index 4d587dd4..9359064f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -4,20 +4,23 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Interface_ extends ClassLike -{ +class Interface_ extends ClassLike { /** @var Node\Name[] Extended interfaces */ - public $extends; + public array $extends; /** * Constructs a class node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'extends' => array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * extends?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'extends' => array(): Name of extended interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -27,11 +30,11 @@ class Interface_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'extends', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Interface'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php index 3edcb3be..658468d2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Label extends Stmt -{ +class Label extends Stmt { /** @var Identifier Name */ - public $name; + public Identifier $name; /** * Constructs a label node. * - * @param string|Identifier $name Name - * @param array $attributes Additional attributes + * @param string|Identifier $name Name + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Label'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php index c6320457..f5b59ad6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Namespace_ extends Node\Stmt -{ +class Namespace_ extends Node\Stmt { /* For use in the "kind" attribute */ - const KIND_SEMICOLON = 1; - const KIND_BRACED = 2; + public const KIND_SEMICOLON = 1; + public const KIND_BRACED = 2; /** @var null|Node\Name Name */ - public $name; + public ?Node\Name $name; /** @var Node\Stmt[] Statements */ public $stmts; /** * Constructs a namespace node. * - * @param null|Node\Name $name Name - * @param null|Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param null|Node\Name $name Name + * @param null|Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ - public function __construct(Node\Name $name = null, $stmts = [], array $attributes = []) { + public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Namespace'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php index f86f8df7..3acfa46f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php @@ -5,13 +5,12 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; /** Nop/empty statement (;). */ -class Nop extends Node\Stmt -{ - public function getSubNodeNames() : array { +class Nop extends Node\Stmt { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Nop'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index bc781bbf..872ea6b7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -2,90 +2,81 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\PropertyItem; -class Property extends Node\Stmt -{ +class Property extends Node\Stmt { /** @var int Modifiers */ - public $flags; - /** @var PropertyProperty[] Properties */ - public $props; + public int $flags; + /** @var PropertyItem[] Properties */ + public array $props; /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes - * @param null|string|Identifier|Name|ComplexType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param int $flags Modifiers + * @param PropertyItem[] $props Properties + * @param array $attributes Additional attributes + * @param null|Identifier|Name|ComplexType $type Type declaration + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ - public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = []) { + public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'props']; } /** * Whether the property is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the property is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the property is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the property is static. - * - * @return bool */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the property is readonly. - * - * @return bool */ - public function isReadonly() : bool { - return (bool) ($this->flags & Class_::MODIFIER_READONLY); + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); } - public function getType() : string { + public function getType(): string { return 'Stmt_Property'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php index 205731e2..4a21a880 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -1,34 +1,3 @@ attributes = $attributes; - $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['name', 'default']; - } - - public function getType() : string { - return 'Stmt_PropertyProperty'; - } -} +require __DIR__ . '/../PropertyItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php index efc578c5..9c44cca8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Return_ extends Node\Stmt -{ +class Return_ extends Node\Stmt { /** @var null|Node\Expr Expression */ - public $expr; + public ?Node\Expr $expr; /** * Constructs a return node. * - * @param null|Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param null|Node\Expr $expr Expression + * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $expr = null, array $attributes = []) { + public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Return'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php index 29584560..88452e7f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -1,37 +1,3 @@ attributes = $attributes; - $this->var = $var; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['var', 'default']; - } - - public function getType() : string { - return 'Stmt_StaticVar'; - } -} +require __DIR__ . '/../StaticVar.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php index 464898ff..a84de106 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php @@ -2,29 +2,29 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Node\StaticVar; use PhpParser\Node\Stmt; -class Static_ extends Stmt -{ +class Static_ extends Stmt { /** @var StaticVar[] Variable definitions */ - public $vars; + public array $vars; /** * Constructs a static variables list node. * - * @param StaticVar[] $vars Variable definitions - * @param array $attributes Additional attributes + * @param StaticVar[] $vars Variable definitions + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Static'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php index 2c8dae02..21e5efa5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Switch_ extends Node\Stmt -{ +class Switch_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Case_[] Case list */ - public $cases; + public array $cases; /** * Constructs a case node. * - * @param Node\Expr $cond Condition - * @param Case_[] $cases Case list - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Case_[] $cases Case list + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Switch_ extends Node\Stmt $this->cases = $cases; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'cases']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Switch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php deleted file mode 100644 index a34e2b36..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +++ /dev/null @@ -1,30 +0,0 @@ -attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Stmt_Throw'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php index 9e97053b..7705a570 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class TraitUse extends Node\Stmt -{ +class TraitUse extends Node\Stmt { /** @var Node\Name[] Traits */ - public $traits; + public array $traits; /** @var TraitUseAdaptation[] Adaptations */ - public $adaptations; + public array $adaptations; /** * Constructs a trait use node. * - * @param Node\Name[] $traits Traits + * @param Node\Name[] $traits Traits * @param TraitUseAdaptation[] $adaptations Adaptations - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class TraitUse extends Node\Stmt $this->adaptations = $adaptations; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['traits', 'adaptations']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUse'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php index 8bdd2c04..987bc88e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -4,10 +4,9 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -abstract class TraitUseAdaptation extends Node\Stmt -{ +abstract class TraitUseAdaptation extends Node\Stmt { /** @var Node\Name|null Trait name */ - public $trait; + public ?Node\Name $trait; /** @var Node\Identifier Method name */ - public $method; + public Node\Identifier $method; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index a3bccbd1..449671e7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -4,23 +4,22 @@ namespace PhpParser\Node\Stmt\TraitUseAdaptation; use PhpParser\Node; -class Alias extends Node\Stmt\TraitUseAdaptation -{ +class Alias extends Node\Stmt\TraitUseAdaptation { /** @var null|int New modifier */ - public $newModifier; + public ?int $newModifier; /** @var null|Node\Identifier New name */ - public $newName; + public ?Node\Identifier $newName; /** * Constructs a trait use precedence adaptation node. * - * @param null|Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param null|int $newModifier New modifier - * @param null|string|Node\Identifier $newName New name - * @param array $attributes Additional attributes + * @param null|Node\Name $trait Trait name + * @param string|Node\Identifier $method Method name + * @param null|int $newModifier New modifier + * @param null|string|Node\Identifier $newName New name + * @param array $attributes Additional attributes */ - public function __construct($trait, $method, $newModifier, $newName, array $attributes = []) { + public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; @@ -28,11 +27,11 @@ class Alias extends Node\Stmt\TraitUseAdaptation $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'newModifier', 'newName']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Alias'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 80385f64..7bc40837 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -4,18 +4,17 @@ namespace PhpParser\Node\Stmt\TraitUseAdaptation; use PhpParser\Node; -class Precedence extends Node\Stmt\TraitUseAdaptation -{ +class Precedence extends Node\Stmt\TraitUseAdaptation { /** @var Node\Name[] Overwritten traits */ - public $insteadof; + public array $insteadof; /** * Constructs a trait use precedence adaptation node. * - * @param Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param Node\Name[] $insteadof Overwritten traits - * @param array $attributes Additional attributes + * @param Node\Name $trait Trait name + * @param string|Node\Identifier $method Method name + * @param Node\Name[] $insteadof Overwritten traits + * @param array $attributes Additional attributes */ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Precedence extends Node\Stmt\TraitUseAdaptation $this->insteadof = $insteadof; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'insteadof']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Precedence'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php index 0cec203a..5f2b3307 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -4,16 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Trait_ extends ClassLike -{ +class Trait_ extends ClassLike { /** * Constructs a trait node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -22,11 +24,11 @@ class Trait_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Trait'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php index 7fc158c5..6414c46c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class TryCatch extends Node\Stmt -{ +class TryCatch extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Catch_[] Catches */ - public $catches; + public array $catches; /** @var null|Finally_ Optional finally node */ - public $finally; + public ?Finally_ $finally; /** * Constructs a try catch node. * - * @param Node\Stmt[] $stmts Statements - * @param Catch_[] $catches Catches - * @param null|Finally_ $finally Optional finally node - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param Catch_[] $catches Catches + * @param null|Finally_ $finally Optional finally node + * @param array $attributes Additional attributes */ - public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) { + public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; $this->finally = $finally; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'catches', 'finally']; } - public function getType() : string { + public function getType(): string { return 'Stmt_TryCatch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php index 310e427a..c211beb0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Unset_ extends Node\Stmt -{ +class Unset_ extends Node\Stmt { /** @var Node\Expr[] Variables to unset */ - public $vars; + public array $vars; /** * Constructs an unset node. * - * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param Node\Expr[] $vars Variables to unset + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Unset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php index 32bd7847..85830edc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -1,52 +1,3 @@ attributes = $attributes; - $this->type = $type; - $this->name = $name; - $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; - } - - public function getSubNodeNames() : array { - return ['type', 'name', 'alias']; - } - - /** - * Get alias. If not explicitly given this is the last component of the used name. - * - * @return Identifier - */ - public function getAlias() : Identifier { - if (null !== $this->alias) { - return $this->alias; - } - - return new Identifier($this->name->getLast()); - } - - public function getType() : string { - return 'Stmt_UseUse'; - } -} +require __DIR__ . '/../UseItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php index 8753da31..5b2d8648 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php @@ -3,33 +3,33 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; -class Use_ extends Stmt -{ +class Use_ extends Stmt { /** * Unknown type. Both Stmt\Use_ / Stmt\GroupUse and Stmt\UseUse have a $type property, one of them will always be * TYPE_UNKNOWN while the other has one of the three other possible types. For normal use statements the type on the * Stmt\UseUse is unknown. It's only the other way around for mixed group use declarations. */ - const TYPE_UNKNOWN = 0; + public const TYPE_UNKNOWN = 0; /** Class or namespace import */ - const TYPE_NORMAL = 1; + public const TYPE_NORMAL = 1; /** Function import */ - const TYPE_FUNCTION = 2; + public const TYPE_FUNCTION = 2; /** Constant import */ - const TYPE_CONSTANT = 3; + public const TYPE_CONSTANT = 3; - /** @var int Type of alias */ - public $type; - /** @var UseUse[] Aliases */ - public $uses; + /** @var self::TYPE_* Type of alias */ + public int $type; + /** @var UseItem[] Aliases */ + public array $uses; /** * Constructs an alias (use) list node. * - * @param UseUse[] $uses Aliases - * @param int $type Type of alias - * @param array $attributes Additional attributes + * @param UseItem[] $uses Aliases + * @param Stmt\Use_::TYPE_* $type Type of alias + * @param array $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; @@ -37,11 +37,11 @@ class Use_ extends Stmt $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Use'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php index f41034f8..2f7aed23 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class While_ extends Node\Stmt -{ +class While_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class While_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_While'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php index 61c2d810..bad88d2b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -2,27 +2,26 @@ namespace PhpParser\Node; -class UnionType extends ComplexType -{ - /** @var (Identifier|Name)[] Types */ - public $types; +class UnionType extends ComplexType { + /** @var (Identifier|Name|IntersectionType)[] Types */ + public array $types; /** * Constructs a union type. * - * @param (Identifier|Name)[] $types Types - * @param array $attributes Additional attributes + * @param (Identifier|Name|IntersectionType)[] $types Types + * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - - public function getType() : string { + + public function getType(): string { return 'UnionType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php index a30807a6..9baa6fe0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php @@ -9,9 +9,8 @@ namespace PhpParser\Node; * Examples: Names in property declarations are formatted as variables. Names in static property * lookups are also formatted as variables. */ -class VarLikeIdentifier extends Identifier -{ - public function getType() : string { +class VarLikeIdentifier extends Identifier { + public function getType(): string { return 'VarLikeIdentifier'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php index 403a24df..48c4f338 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php @@ -11,7 +11,7 @@ class VariadicPlaceholder extends NodeAbstract { /** * Create a variadic argument placeholder (first-class callable syntax). * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; @@ -24,4 +24,4 @@ class VariadicPlaceholder extends NodeAbstract { public function getSubNodeNames(): array { return []; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php index 04514da1..7c3a3607 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -2,14 +2,14 @@ namespace PhpParser; -abstract class NodeAbstract implements Node, \JsonSerializable -{ - protected $attributes; +abstract class NodeAbstract implements Node, \JsonSerializable { + /** @var array Attributes */ + protected array $attributes; /** * Creates a Node. * - * @param array $attributes Array of attributes + * @param array $attributes Array of attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; @@ -20,7 +20,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Start line (or -1 if not available) */ - public function getLine() : int { + public function getLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -31,7 +31,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -42,7 +42,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int End line (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } @@ -55,7 +55,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->attributes['startTokenPos'] ?? -1; } @@ -68,7 +68,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->attributes['endTokenPos'] ?? -1; } @@ -79,7 +79,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->attributes['startFilePos'] ?? -1; } @@ -90,7 +90,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->attributes['endFilePos'] ?? -1; } @@ -101,7 +101,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return Comment[] */ - public function getComments() : array { + public function getComments(): array { return $this->attributes['comments'] ?? []; } @@ -110,7 +110,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment() { + public function getDocComment(): ?Comment\Doc { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { $comment = $comments[$i]; @@ -129,7 +129,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment) { + public function setDocComment(Comment\Doc $docComment): void { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { if ($comments[$i] instanceof Comment\Doc) { @@ -145,11 +145,11 @@ abstract class NodeAbstract implements Node, \JsonSerializable $this->setAttribute('comments', $comments); } - public function setAttribute(string $key, $value) { + public function setAttribute(string $key, $value): void { $this->attributes[$key] = $value; } - public function hasAttribute(string $key) : bool { + public function hasAttribute(string $key): bool { return array_key_exists($key, $this->attributes); } @@ -161,18 +161,18 @@ abstract class NodeAbstract implements Node, \JsonSerializable return $default; } - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; } /** - * @return array + * @return array */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { return ['nodeType' => $this->getType()] + get_object_vars($this); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php index ba622efd..a2535de7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php @@ -2,17 +2,33 @@ namespace PhpParser; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Include_; -use PhpParser\Node\Stmt\Class_; +use PhpParser\Node\Expr\List_; +use PhpParser\Node\Scalar\Int_; +use PhpParser\Node\Scalar\InterpolatedString; +use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Use_; -use PhpParser\Node\Stmt\UseUse; +use PhpParser\Node\UseItem; -class NodeDumper -{ - private $dumpComments; - private $dumpPositions; - private $code; +class NodeDumper { + private bool $dumpComments; + private bool $dumpPositions; + private bool $dumpOtherAttributes; + private ?string $code; + private string $res; + private string $nl; + + private const IGNORE_ATTRIBUTES = [ + 'comments' => true, + 'startLine' => true, + 'endLine' => true, + 'startFilePos' => true, + 'endFilePos' => true, + 'startTokenPos' => true, + 'endTokenPos' => true, + ]; /** * Constructs a NodeDumper. @@ -21,150 +37,218 @@ class NodeDumper * * bool dumpComments: Whether comments should be dumped. * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset * information, the code needs to be passed to dump(). + * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. * * @param array $options Options (see description) */ public function __construct(array $options = []) { $this->dumpComments = !empty($options['dumpComments']); $this->dumpPositions = !empty($options['dumpPositions']); + $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); } /** * Dumps a node or array. * - * @param array|Node $node Node or array to dump + * @param array|Node $node Node or array to dump * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if * the dumpPositions option is enabled and the dumping of node offsets * is desired. * * @return string Dumped value */ - public function dump($node, string $code = null) : string { + public function dump($node, ?string $code = null): string { $this->code = $code; - return $this->dumpRecursive($node); + $this->res = ''; + $this->nl = "\n"; + $this->dumpRecursive($node, false); + return $this->res; } - protected function dumpRecursive($node) { + /** @param mixed $node */ + protected function dumpRecursive($node, bool $indent = true): void { + if ($indent) { + $this->nl .= " "; + } if ($node instanceof Node) { - $r = $node->getType(); + $this->res .= $node->getType(); if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $r .= $p; + $this->res .= $p; } - $r .= '('; + $this->res .= '('; foreach ($node->getSubNodeNames() as $key) { - $r .= "\n " . $key . ': '; + $this->res .= "$this->nl " . $key . ': '; $value = $node->$key; - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { + if (\is_int($value)) { if ('flags' === $key || 'newModifier' === $key) { - $r .= $this->dumpFlags($value); - } elseif ('type' === $key && $node instanceof Include_) { - $r .= $this->dumpIncludeType($value); - } elseif ('type' === $key - && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) { - $r .= $this->dumpUseType($value); - } else { - $r .= $value; + $this->res .= $this->dumpFlags($value); + continue; + } + if ('type' === $key && $node instanceof Include_) { + $this->res .= $this->dumpIncludeType($value); + continue; + } + if ('type' === $key + && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { + $this->res .= $this->dumpUseType($value); + continue; } - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); } + $this->dumpRecursive($value); } if ($this->dumpComments && $comments = $node->getComments()) { - $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments)); + $this->res .= "$this->nl comments: "; + $this->dumpRecursive($comments); } - } elseif (is_array($node)) { - $r = 'array('; - foreach ($node as $key => $value) { - $r .= "\n " . $key . ': '; + if ($this->dumpOtherAttributes) { + foreach ($node->getAttributes() as $key => $value) { + if (isset(self::IGNORE_ATTRIBUTES[$key])) { + continue; + } - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { - $r .= $value; - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); + $this->res .= "$this->nl $key: "; + if (\is_int($value)) { + if ('kind' === $key) { + if ($node instanceof Int_) { + $this->res .= $this->dumpIntKind($value); + continue; + } + if ($node instanceof String_ || $node instanceof InterpolatedString) { + $this->res .= $this->dumpStringKind($value); + continue; + } + if ($node instanceof Array_) { + $this->res .= $this->dumpArrayKind($value); + continue; + } + if ($node instanceof List_) { + $this->res .= $this->dumpListKind($value); + continue; + } + } + } + $this->dumpRecursive($value); } } + $this->res .= "$this->nl)"; + } elseif (\is_array($node)) { + $this->res .= 'array('; + foreach ($node as $key => $value) { + $this->res .= "$this->nl " . $key . ': '; + $this->dumpRecursive($value); + } + $this->res .= "$this->nl)"; } elseif ($node instanceof Comment) { - return $node->getReformattedText(); + $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); + } elseif (\is_string($node)) { + $this->res .= \str_replace("\n", $this->nl, (string)$node); + } elseif (\is_int($node) || \is_float($node)) { + $this->res .= $node; + } elseif (null === $node) { + $this->res .= 'null'; + } elseif (false === $node) { + $this->res .= 'false'; + } elseif (true === $node) { + $this->res .= 'true'; } else { throw new \InvalidArgumentException('Can only dump nodes and arrays.'); } - - return $r . "\n)"; + if ($indent) { + $this->nl = \substr($this->nl, 0, -4); + } } - protected function dumpFlags($flags) { + protected function dumpFlags(int $flags): string { $strs = []; - if ($flags & Class_::MODIFIER_PUBLIC) { - $strs[] = 'MODIFIER_PUBLIC'; + if ($flags & Modifiers::PUBLIC) { + $strs[] = 'PUBLIC'; } - if ($flags & Class_::MODIFIER_PROTECTED) { - $strs[] = 'MODIFIER_PROTECTED'; + if ($flags & Modifiers::PROTECTED) { + $strs[] = 'PROTECTED'; } - if ($flags & Class_::MODIFIER_PRIVATE) { - $strs[] = 'MODIFIER_PRIVATE'; + if ($flags & Modifiers::PRIVATE) { + $strs[] = 'PRIVATE'; } - if ($flags & Class_::MODIFIER_ABSTRACT) { - $strs[] = 'MODIFIER_ABSTRACT'; + if ($flags & Modifiers::ABSTRACT) { + $strs[] = 'ABSTRACT'; } - if ($flags & Class_::MODIFIER_STATIC) { - $strs[] = 'MODIFIER_STATIC'; + if ($flags & Modifiers::STATIC) { + $strs[] = 'STATIC'; } - if ($flags & Class_::MODIFIER_FINAL) { - $strs[] = 'MODIFIER_FINAL'; + if ($flags & Modifiers::FINAL) { + $strs[] = 'FINAL'; } - if ($flags & Class_::MODIFIER_READONLY) { - $strs[] = 'MODIFIER_READONLY'; + if ($flags & Modifiers::READONLY) { + $strs[] = 'READONLY'; } if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; } else { - return $flags; + return (string) $flags; } } - protected function dumpIncludeType($type) { - $map = [ + /** @param array $map */ + private function dumpEnum(int $value, array $map): string { + if (!isset($map[$value])) { + return (string) $value; + } + return $map[$value] . ' (' . $value . ')'; + } + + private function dumpIncludeType(int $type): string { + return $this->dumpEnum($type, [ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]; - - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; + ]); } - protected function dumpUseType($type) { - $map = [ + private function dumpUseType(int $type): string { + return $this->dumpEnum($type, [ Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]; + ]); + } - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; + private function dumpIntKind(int $kind): string { + return $this->dumpEnum($kind, [ + Int_::KIND_BIN => 'KIND_BIN', + Int_::KIND_OCT => 'KIND_OCT', + Int_::KIND_DEC => 'KIND_DEC', + Int_::KIND_HEX => 'KIND_HEX', + ]); + } + + private function dumpStringKind(int $kind): string { + return $this->dumpEnum($kind, [ + String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', + String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', + String_::KIND_HEREDOC => 'KIND_HEREDOC', + String_::KIND_NOWDOC => 'KIND_NOWDOC', + ]); + } + + private function dumpArrayKind(int $kind): string { + return $this->dumpEnum($kind, [ + Array_::KIND_LONG => 'KIND_LONG', + Array_::KIND_SHORT => 'KIND_SHORT', + ]); + } + + private function dumpListKind(int $kind): string { + return $this->dumpEnum($kind, [ + List_::KIND_LIST => 'KIND_LIST', + List_::KIND_ARRAY => 'KIND_ARRAY', + ]); } /** @@ -174,7 +258,7 @@ class NodeDumper * * @return string|null Dump of position, or null if position information not available */ - protected function dumpPosition(Node $node) { + protected function dumpPosition(Node $node): ?string { if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { return null; } @@ -191,7 +275,7 @@ class NodeDumper } // Copied from Error class - private function toColumn($code, $pos) { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php index 2e7cfdad..96c84526 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php @@ -5,25 +5,27 @@ namespace PhpParser; use PhpParser\NodeVisitor\FindingVisitor; use PhpParser\NodeVisitor\FirstFindingVisitor; -class NodeFinder -{ +class NodeFinder { /** * Find all nodes satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return Node[] Found nodes satisfying the filter callback */ - public function find($nodes, callable $filter) : array { + public function find($nodes, callable $filter): array { + if ($nodes === []) { + return []; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } $visitor = new FindingVisitor($filter); - $traverser = new NodeTraverser; - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNodes(); @@ -31,13 +33,15 @@ class NodeFinder /** * Find all nodes that are instances of a certain class. + + * @template TNode as Node * * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @param class-string $class Class name * - * @return Node[] Found nodes (all instances of $class) + * @return TNode[] Found nodes (all instances of $class) */ - public function findInstanceOf($nodes, string $class) : array { + public function findInstanceOf($nodes, string $class): array { return $this->find($nodes, function ($node) use ($class) { return $node instanceof $class; }); @@ -46,20 +50,23 @@ class NodeFinder /** * Find first node satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return null|Node Found node (or null if none found) */ - public function findFirst($nodes, callable $filter) { + public function findFirst($nodes, callable $filter): ?Node { + if ($nodes === []) { + return null; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } $visitor = new FirstFindingVisitor($filter); - $traverser = new NodeTraverser; - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNode(); @@ -68,12 +75,14 @@ class NodeFinder /** * Find first node that is an instance of a certain class. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @template TNode as Node * - * @return null|Node Found node, which is an instance of $class (or null if none found) + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param class-string $class Class name + * + * @return null|TNode Found node, which is an instance of $class (or null if none found) */ - public function findFirstInstanceOf($nodes, string $class) { + public function findFirstInstanceOf($nodes, string $class): ?Node { return $this->findFirst($nodes, function ($node) use ($class) { return $node instanceof $class; }); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php index 97d45bda..f5b868a1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php @@ -2,51 +2,40 @@ namespace PhpParser; -class NodeTraverser implements NodeTraverserInterface -{ +class NodeTraverser implements NodeTraverserInterface { /** - * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes - * of the current node will not be traversed for any visitors. - * - * For subsequent visitors enterNode() will still be called on the current - * node and leaveNode() will also be invoked for the current node. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CHILDREN instead. */ - const DONT_TRAVERSE_CHILDREN = 1; + public const DONT_TRAVERSE_CHILDREN = NodeVisitor::DONT_TRAVERSE_CHILDREN; /** - * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns - * STOP_TRAVERSAL, traversal is aborted. - * - * The afterTraverse() method will still be invoked. + * @deprecated Use NodeVisitor::STOP_TRAVERSAL instead. */ - const STOP_TRAVERSAL = 2; + public const STOP_TRAVERSAL = NodeVisitor::STOP_TRAVERSAL; /** - * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs - * in an array, it will be removed from the array. - * - * For subsequent visitors leaveNode() will still be invoked for the - * removed node. + * @deprecated Use NodeVisitor::REMOVE_NODE instead. */ - const REMOVE_NODE = 3; + public const REMOVE_NODE = NodeVisitor::REMOVE_NODE; /** - * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes - * of the current node will not be traversed for any visitors. - * - * For subsequent visitors enterNode() will not be called as well. - * leaveNode() will be invoked for visitors that has enterNode() method invoked. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN instead. */ - const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN; - /** @var NodeVisitor[] Visitors */ - protected $visitors = []; + /** @var list Visitors */ + protected array $visitors = []; /** @var bool Whether traversal should be stopped */ - protected $stopTraversal; + protected bool $stopTraversal; - public function __construct() { - // for BC + /** + * Create a traverser with the given visitors. + * + * @param NodeVisitor ...$visitors Node visitors + */ + public function __construct(NodeVisitor ...$visitors) { + $this->visitors = $visitors; } /** @@ -54,21 +43,17 @@ class NodeTraverser implements NodeTraverserInterface * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor) { + public function addVisitor(NodeVisitor $visitor): void { $this->visitors[] = $visitor; } /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor) { - foreach ($this->visitors as $index => $storedVisitor) { - if ($storedVisitor === $visitor) { - unset($this->visitors[$index]); - break; - } + public function removeVisitor(NodeVisitor $visitor): void { + $index = array_search($visitor, $this->visitors); + if ($index !== false) { + array_splice($this->visitors, $index, 1, []); } } @@ -79,7 +64,7 @@ class NodeTraverser implements NodeTraverserInterface * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array { + public function traverse(array $nodes): array { $this->stopTraversal = false; foreach ($this->visitors as $visitor) { @@ -90,7 +75,8 @@ class NodeTraverser implements NodeTraverserInterface $nodes = $this->traverseArray($nodes); - foreach ($this->visitors as $visitor) { + for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { + $visitor = $this->visitors[$i]; if (null !== $return = $visitor->afterTraverse($nodes)) { $nodes = $return; } @@ -103,37 +89,37 @@ class NodeTraverser implements NodeTraverserInterface * Recursively traverse a node. * * @param Node $node Node to traverse. - * - * @return Node Result of traversal (may be original node or new one) */ - protected function traverseNode(Node $node) : Node { + protected function traverseNode(Node $node): void { foreach ($node->getSubNodeNames() as $name) { - $subNode =& $node->$name; + $subNode = $node->$name; if (\is_array($subNode)) { - $subNode = $this->traverseArray($subNode); + $node->$name = $this->traverseArray($subNode); if ($this->stopTraversal) { break; } } elseif ($subNode instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($subNode); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + $subNode = $node->$name = $return; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + continue 2; } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -143,22 +129,26 @@ class NodeTraverser implements NodeTraverserInterface } if ($traverseChildren) { - $subNode = $this->traverseNode($subNode); + $this->traverseNode($subNode); if ($this->stopTraversal) { break; } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($subNode); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::STOP_TRAVERSAL === $return) { + $subNode = $node->$name = $return; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + break; } elseif (\is_array($return)) { throw new \LogicException( 'leaveNode() may only return an array ' . @@ -170,15 +160,9 @@ class NodeTraverser implements NodeTraverserInterface ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } } - - return $node; } /** @@ -188,29 +172,37 @@ class NodeTraverser implements NodeTraverserInterface * * @return array Result of traversal (may be original array or changed one) */ - protected function traverseArray(array $nodes) : array { + protected function traverseArray(array $nodes): array { $doNodes = []; - foreach ($nodes as $i => &$node) { + foreach ($nodes as $i => $node) { if ($node instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($node); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + continue 2; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + continue 2; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -220,43 +212,38 @@ class NodeTraverser implements NodeTraverserInterface } if ($traverseChildren) { - $node = $this->traverseNode($node); + $this->traverseNode($node); if ($this->stopTraversal) { break; } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($node); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; + $nodes[$i] = $node = $return; } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; break; - } elseif (self::REMOVE_NODE === $return) { + } elseif (NodeVisitor::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; - } elseif (false === $return) { + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { throw new \LogicException( - 'bool(false) return from leaveNode() no longer supported. ' . - 'Return NodeTraverser::REMOVE_NODE instead' - ); + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'leaveNode() returned invalid value of type ' . gettype($return) ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } elseif (\is_array($node)) { throw new \LogicException('Invalid node structure: Contains nested arrays'); @@ -272,7 +259,7 @@ class NodeTraverser implements NodeTraverserInterface return $nodes; } - private function ensureReplacementReasonable($old, $new) { + private function ensureReplacementReasonable(Node $old, Node $new): void { if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { throw new \LogicException( "Trying to replace statement ({$old->getType()}) " . diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php index 77ff3d27..c3992b3d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php @@ -2,21 +2,18 @@ namespace PhpParser; -interface NodeTraverserInterface -{ +interface NodeTraverserInterface { /** * Adds a visitor. * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor); + public function addVisitor(NodeVisitor $visitor): void; /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor); + public function removeVisitor(NodeVisitor $visitor): void; /** * Traverses an array of nodes using the registered visitors. @@ -25,5 +22,5 @@ interface NodeTraverserInterface * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array; + public function traverse(array $nodes): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php index f1f7f3e3..0ec4f7be 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php @@ -2,8 +2,49 @@ namespace PhpParser; -interface NodeVisitor -{ +interface NodeVisitor { + /** + * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes + * of the current node will not be traversed for any visitors. + * + * For subsequent visitors enterNode() will still be called on the current + * node and leaveNode() will also be invoked for the current node. + */ + public const DONT_TRAVERSE_CHILDREN = 1; + + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns + * STOP_TRAVERSAL, traversal is aborted. + * + * The afterTraverse() method will still be invoked. + */ + public const STOP_TRAVERSAL = 2; + + /** + * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs + * in an array, it will be removed from the array. + * + * For subsequent visitors leaveNode() will still be invoked for the + * removed node. + */ + public const REMOVE_NODE = 3; + + /** + * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes + * of the current node will not be traversed for any visitors. + * + * For subsequent visitors enterNode() will not be called as well. + * leaveNode() will be invoked for visitors that has enterNode() method invoked. + */ + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns REPLACE_WITH_NULL, + * the node will be replaced with null. This is not a legal return value if the node is part + * of an array, rather than another node. + */ + public const REPLACE_WITH_NULL = 5; + /** * Called once before traversal. * @@ -23,16 +64,25 @@ interface NodeVisitor * Return value semantics: * * null * => $node stays as-is - * * NodeTraverser::DONT_TRAVERSE_CHILDREN + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) + * * NodeVisitor::REMOVE_NODE + * => $node is removed from the parent array + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::DONT_TRAVERSE_CHILDREN * => Children of $node are not traversed. $node stays as-is - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN + * => Further visitors for the current node are skipped, and its children are not + * traversed. $node stays as-is. + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * otherwise * => $node is set to the return value * * @param Node $node Node * - * @return null|int|Node Replacement node (or special return value) + * @return null|int|Node|Node[] Replacement node (or special return value) */ public function enterNode(Node $node); @@ -42,9 +92,11 @@ interface NodeVisitor * Return value semantics: * * null * => $node stays as-is - * * NodeTraverser::REMOVE_NODE + * * NodeVisitor::REMOVE_NODE * => $node is removed from the parent array - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * array (of Nodes) * => The return value is merged into the parent array (at the position of the $node) diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php index a85fa493..cba92499 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php @@ -10,8 +10,7 @@ use PhpParser\NodeVisitorAbstract; * * This visitor is required to perform format-preserving pretty prints. */ -class CloningVisitor extends NodeVisitorAbstract -{ +class CloningVisitor extends NodeVisitorAbstract { public function enterNode(Node $origNode) { $node = clone $origNode; $node->setAttribute('origNode', $origNode); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php index 9531edbc..1f3f4bae 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -9,12 +9,11 @@ use PhpParser\NodeVisitorAbstract; * This visitor can be used to find and collect all nodes satisfying some criterion determined by * a filter callback. */ -class FindingVisitor extends NodeVisitorAbstract -{ +class FindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var Node[] Found nodes */ - protected $foundNodes; + protected array $foundNodes; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; @@ -27,11 +26,11 @@ class FindingVisitor extends NodeVisitorAbstract * * @return Node[] Found nodes */ - public function getFoundNodes() : array { + public function getFoundNodes(): array { return $this->foundNodes; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNodes = []; return null; diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 596a7d7f..05deed59 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -3,19 +3,18 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; -use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor; use PhpParser\NodeVisitorAbstract; /** * This visitor can be used to find the first node satisfying some criterion determined by * a filter callback. */ -class FirstFindingVisitor extends NodeVisitorAbstract -{ +class FirstFindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var null|Node Found node */ - protected $foundNode; + protected ?Node $foundNode; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; @@ -28,11 +27,11 @@ class FirstFindingVisitor extends NodeVisitorAbstract * * @return null|Node Found node (or null if not found) */ - public function getFoundNode() { + public function getFoundNode(): ?Node { return $this->foundNode; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNode = null; return null; @@ -42,7 +41,7 @@ class FirstFindingVisitor extends NodeVisitorAbstract $filterCallback = $this->filterCallback; if ($filterCallback($node)) { $this->foundNode = $node; - return NodeTraverser::STOP_TRAVERSAL; + return NodeVisitor::STOP_TRAVERSAL; } return null; diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 8e259c57..ccd014eb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -11,16 +11,15 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt; use PhpParser\NodeVisitorAbstract; -class NameResolver extends NodeVisitorAbstract -{ +class NameResolver extends NodeVisitorAbstract { /** @var NameContext Naming context */ - protected $nameContext; + protected NameContext $nameContext; /** @var bool Whether to preserve original names */ - protected $preserveOriginalNames; + protected bool $preserveOriginalNames; /** @var bool Whether to replace resolved nodes in place, or to add resolvedNode attributes */ - protected $replaceNodes; + protected bool $replaceNodes; /** * Constructs a name resolution visitor. @@ -33,24 +32,22 @@ class NameResolver extends NodeVisitorAbstract * namespacedName attribute, as usual.) * * @param ErrorHandler|null $errorHandler Error handler - * @param array $options Options + * @param array{preserveOriginalNames?: bool, replaceNodes?: bool} $options Options */ - public function __construct(ErrorHandler $errorHandler = null, array $options = []) { - $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing); + public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { + $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; $this->replaceNodes = $options['replaceNodes'] ?? true; } /** * Get name resolution context. - * - * @return NameContext */ - public function getNameContext() : NameContext { + public function getNameContext(): NameContext { return $this->nameContext; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->nameContext->startNamespace(); return null; } @@ -78,6 +75,8 @@ class NameResolver extends NodeVisitorAbstract $this->resolveAttrGroups($node); if (null !== $node->name) { $this->addNamespacedName($node); + } else { + $node->namespacedName = null; } } elseif ($node instanceof Stmt\Interface_) { foreach ($node->extends as &$interface) { @@ -86,15 +85,13 @@ class NameResolver extends NodeVisitorAbstract $this->resolveAttrGroups($node); $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { + } elseif ($node instanceof Stmt\Enum_) { foreach ($node->implements as &$interface) { $interface = $this->resolveClassName($interface); } $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } + $this->addNamespacedName($node); } elseif ($node instanceof Stmt\Trait_) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); @@ -117,9 +114,12 @@ class NameResolver extends NodeVisitorAbstract foreach ($node->consts as $const) { $this->addNamespacedName($const); } - } else if ($node instanceof Stmt\ClassConst) { + } elseif ($node instanceof Stmt\ClassConst) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } $this->resolveAttrGroups($node); - } else if ($node instanceof Stmt\EnumCase) { + } elseif ($node instanceof Stmt\EnumCase) { $this->resolveAttrGroups($node); } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch @@ -161,7 +161,8 @@ class NameResolver extends NodeVisitorAbstract return null; } - private function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { + /** @param Stmt\Use_::TYPE_* $type */ + private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { // Add prefix for group uses $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; // Type is determined either by individual element or whole use declaration @@ -172,8 +173,8 @@ class NameResolver extends NodeVisitorAbstract ); } - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ - private function resolveSignature($node) { + /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ + private function resolveSignature($node): void { foreach ($node->params as $param) { $param->type = $this->resolveType($param->type); $this->resolveAttrGroups($param); @@ -181,7 +182,12 @@ class NameResolver extends NodeVisitorAbstract $node->returnType = $this->resolveType($node->returnType); } - private function resolveType($node) { + /** + * @template T of Node\Identifier|Name|Node\ComplexType|null + * @param T $node + * @return T + */ + private function resolveType(?Node $node): ?Node { if ($node instanceof Name) { return $this->resolveClassName($node); } @@ -202,11 +208,11 @@ class NameResolver extends NodeVisitorAbstract * Resolve name, according to name resolver options. * * @param Name $name Function or constant name to resolve - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Resolved name, or original name with attribute */ - protected function resolveName(Name $name, int $type) : Name { + protected function resolveName(Name $name, int $type): Name { if (!$this->replaceNodes) { $resolvedName = $this->nameContext->getResolvedName($name, $type); if (null !== $resolvedName) { @@ -237,17 +243,16 @@ class NameResolver extends NodeVisitorAbstract return $name; } - protected function resolveClassName(Name $name) { + protected function resolveClassName(Name $name): Name { return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); } - protected function addNamespacedName(Node $node) { + protected function addNamespacedName(Node $node): void { $node->namespacedName = Name::concat( $this->nameContext->getNamespace(), (string) $node->name); } - protected function resolveAttrGroups(Node $node) - { + protected function resolveAttrGroups(Node $node): void { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { $attr->name = $this->resolveClassName($attr->name); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index ea372e5b..38fedfd5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -14,12 +14,11 @@ use PhpParser\NodeVisitorAbstract; * node can be accessed through $node->getAttribute('previous'), * and the next node can be accessed through $node->getAttribute('next'). */ -final class NodeConnectingVisitor extends NodeVisitorAbstract -{ +final class NodeConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; /** * @var ?Node diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index b98d2bfa..1e7e9e8b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -2,31 +2,29 @@ namespace PhpParser\NodeVisitor; -use function array_pop; -use function count; use PhpParser\Node; use PhpParser\NodeVisitorAbstract; +use function array_pop; +use function count; + /** * Visitor that connects a child node to its parent node. * * On the child node, the parent node can be accessed through * $node->getAttribute('parent'). */ -final class ParentConnectingVisitor extends NodeVisitorAbstract -{ +final class ParentConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; - public function beforeTraverse(array $nodes) - { + public function beforeTraverse(array $nodes) { $this->stack = []; } - public function enterNode(Node $node) - { + public function enterNode(Node $node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); } @@ -34,8 +32,7 @@ final class ParentConnectingVisitor extends NodeVisitorAbstract $this->stack[] = $node; } - public function leaveNode(Node $node) - { + public function leaveNode(Node $node) { array_pop($this->stack); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php index d378d670..6fb15cca 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -5,8 +5,7 @@ namespace PhpParser; /** * @codeCoverageIgnore */ -class NodeVisitorAbstract implements NodeVisitor -{ +abstract class NodeVisitorAbstract implements NodeVisitor { public function beforeTraverse(array $nodes) { return null; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser.php b/vendor/nikic/php-parser/lib/PhpParser/Parser.php index 8956c767..68954afe 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface Parser -{ +interface Parser { /** * Parses PHP code into a node tree. * @@ -14,5 +13,12 @@ interface Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null); + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array; + + /** + * Return tokens for the last parse. + * + * @return Token[] + */ + public function getTokens(): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php deleted file mode 100644 index 77fd1f3f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +++ /dev/null @@ -1,55 +0,0 @@ -parsers = $parsers; - } - - public function parse(string $code, ErrorHandler $errorHandler = null) { - if (null === $errorHandler) { - $errorHandler = new ErrorHandler\Throwing; - } - - list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code); - if ($firstError === null) { - return $firstStmts; - } - - for ($i = 1, $c = count($this->parsers); $i < $c; ++$i) { - list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code); - if ($error === null) { - return $stmts; - } - } - - throw $firstError; - } - - private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code) { - $stmts = null; - $error = null; - try { - $stmts = $parser->parse($code, $errorHandler); - } catch (Error $error) {} - return [$stmts, $error]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php deleted file mode 100644 index c62adfd2..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ /dev/null @@ -1,2674 +0,0 @@ -'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "';'", - "'{'", - "'}'", - "'('", - "')'", - "'$'", - "'`'", - "']'", - "'\"'", - "T_READONLY", - "T_ENUM", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_ATTRIBUTE" - ); - - protected $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, - 158, 159, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 155, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 156, 35, 157, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 164, - 122, 123, 124, 125, 126, 127, 128, 129, 165, 130, - 131, 132, 166, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 167 - ); - - protected $action = array( - 699, 669, 670, 671, 672, 673, 286, 674, 675, 676, - 712, 713, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, - 242, 243, 244,-32766,-32766, 677,-32766, 750,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 1224, 245, 246, 1225, 678, - 679, 680, 681, 682, 683, 684,-32766, 48, 746,-32766, - -32766,-32766,-32766,-32766,-32766, 685, 686, 687, 688, 689, - 690, 691, 692, 693, 694, 695, 715, 738, 716, 717, - 718, 719, 707, 708, 709, 737, 710, 711, 696, 697, - 698, 700, 701, 702, 740, 741, 742, 743, 744, 745, - 703, 704, 705, 706, 736, 727, 725, 726, 722, 723, - 751, 714, 720, 721, 728, 729, 731, 730, 732, 733, - 55, 56, 425, 57, 58, 724, 735, 734, 1073, 59, - 60, -224, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 121,-32767,-32767,-32767,-32767, 29, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 1043, 766, 1071, 767, 580, 62, 63,-32766, - -32766,-32766,-32766, 64, 516, 65, 294, 295, 66, 67, - 68, 69, 70, 71, 72, 73, 822, 25, 302, 74, - 418, 981, 983, 1043, 1181, 1095, 1096, 1073, 748, 754, - 1075, 1074, 1076, 469,-32766,-32766,-32766, 337, 823, 54, - -32767,-32767,-32767,-32767, 98, 99, 100, 101, 102, 220, - 221, 222, 78, 361, 1107,-32766, 341,-32766,-32766,-32766, - -32766,-32766, 1107, 492, 949, 950, 951, 948, 947, 946, - 207, 477, 478, 949, 950, 951, 948, 947, 946, 1043, - 479, 480, 52, 1101, 1102, 1103, 1104, 1098, 1099, 319, - 872, 668, 667, 27, -511, 1105, 1100,-32766, 130, 1075, - 1074, 1076, 345, 668, 667, 41, 126, 341, 334, 369, - 336, 426, -128, -128, -128, 896, 897, 468, 220, 221, - 222, 811, 1195, 619, 40, 21, 427, -128, 470, -128, - 471, -128, 472, -128, 802, 428, -4, 823, 54, 207, - 33, 34, 429, 360, 317, 28, 35, 473,-32766,-32766, - -32766, 211, 356, 357, 474, 475,-32766,-32766,-32766, 754, - 476, 49, 313, 794, 843, 430, 431, 289, 125,-32766, - 813,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 769, 103, 104, 105, - 327, 307, 825, 633, -128, 1075, 1074, 1076, 221, 222, - 927, 748, 1146, 106,-32766, 129,-32766,-32766,-32766,-32766, - 426, 823, 54, 902, 873, 302, 468, 75, 207, 359, - 811, 668, 667, 40, 21, 427, 754, 470, 754, 471, - 423, 472, 1043, 127, 428, 435, 1043, 341, 1043, 33, - 34, 429, 360, 1181, 415, 35, 473, 122, 10, 315, - 128, 356, 357, 474, 475,-32766,-32766,-32766, 768, 476, - 668, 667, 758, 843, 430, 431, 754, 1043, 1147,-32766, - -32766,-32766, 754, 419, 342, 1215,-32766, 131,-32766,-32766, - -32766, 341, 363, 346, 426, 823, 54, 100, 101, 102, - 468, 825, 633, -4, 811, 442, 903, 40, 21, 427, - 754, 470, 435, 471, 341, 472, 341, 766, 428, 767, - -209, -209, -209, 33, 34, 429, 360, 479, 1196, 35, - 473, 345,-32766,-32766,-32766, 356, 357, 474, 475, 220, - 221, 222, 421, 476, 32, 297, 794, 843, 430, 431, - 754, 754, 435,-32766, 341,-32766,-32766, 9, 300, 51, - 207, 249, 324, 753, 120, 220, 221, 222, 426, 30, - 247, 941, 422, 424, 468, 825, 633, -209, 811, 1043, - 1061, 40, 21, 427, 129, 470, 207, 471, 341, 472, - 804, 20, 428, 124, -208, -208, -208, 33, 34, 429, - 360, 479, 212, 35, 473, 923, -259, 823, 54, 356, - 357, 474, 475,-32766,-32766,-32766, 1043, 476, 213, 806, - 794, 843, 430, 431,-32766,-32766, 435, 435, 341, 341, - 443, 79, 80, 81,-32766, 668, 667, 636, 344, 808, - 668, 667, 239, 240, 241, 123, 214, 538, 250, 825, - 633, -208, 36, 251, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 252, 307, - 426, 220, 221, 222, 823, 54, 468,-32766, 222, 765, - 811, 106, 134, 40, 21, 427, 571, 470, 207, 471, - 445, 472, 207,-32766, 428, 896, 897, 207, 307, 33, - 34, 429, 245, 246, 637, 35, 473, 452, 22, 809, - 922, 356, 357, 457, 588, 135, 374, 595, 596, 476, - -228, 759, 639, 938, 653, 926, 661, -86, 823, 54, - 314, 644, 647, 821, 133, 836, 43, 106, 603, 44, - 45, 46, 47, 748, 50, 53, 132, 426, 302,-32766, - 520, 825, 633, 468, -84, 607, 577, 811, 641, 362, - 40, 21, 427, -278, 470, 754, 471, 954, 472, 441, - 627, 428, 823, 54, 574, 844, 33, 34, 429, 11, - 615, 845, 35, 473, 444, 461, 285, -511, 356, 357, - 592, -419, 593, 1106, 1153, -410, 476, 368, 838, 38, - 658, 426, 645, 795, 1052, 0, 325, 468, 0,-32766, - 0, 811, 0, 0, 40, 21, 427, 0, 470, 0, - 471, 0, 472, 0, 322, 428, 823, 54, 825, 633, - 33, 34, 429, 0, 326, 0, 35, 473, 323, 0, - 316, 318, 356, 357, -512, 426, 0, 753, 531, 0, - 476, 468, 6, 0, 0, 811, 650, 7, 40, 21, - 427, 12, 470, 14, 471, 373, 472, -420, 562, 428, - 823, 54, 78, -225, 33, 34, 429, 39, 656, 657, - 35, 473, 859, 633, 764, 812, 356, 357, 820, 799, - 814, 875, 866, 867, 476, 797, 860, 857, 855, 426, - 933, 934, 931, 819, 803, 468, 805, 807, 810, 811, - 930, 762, 40, 21, 427, 763, 470, 932, 471, 335, - 472, 358, 634, 428, 638, 640, 825, 633, 33, 34, - 429, 642, 643, 646, 35, 473, 648, 649, 651, 652, - 356, 357, 635, 426, 1221, 1223, 761, 842, 476, 468, - 248, 760, 841, 811, 1222, 840, 40, 21, 427, 1057, - 470, 830, 471, 1045, 472, 839, 1046, 428, 828, 215, - 216, 939, 33, 34, 429, 217, 864, 218, 35, 473, - 825, 633, 24, 865, 356, 357, 456, 1220, 1189, 209, - 1187, 1172, 476, 1185, 215, 216, 1086, 1095, 1096, 914, - 217, 1193, 218, 1183, -224, 1097, 26, 31, 37, 42, - 76, 77, 210, 288, 209, 292, 293, 308, 309, 310, - 311, 339, 1095, 1096, 825, 633, 355, 291, 416, 1152, - 1097, 16, 17, 18, 393, 453, 460, 462, 466, 552, - 624, 1048, 1051, 904, 1111, 1047, 1023, 563, 1022, 1088, - 0, 0, -429, 558, 1041, 1101, 1102, 1103, 1104, 1098, - 1099, 398, 1054, 1053, 1056, 1055, 1070, 1105, 1100, 1186, - 1171, 1167, 1184, 1085, 1218, 1112, 1166, 219, 558, 599, - 1101, 1102, 1103, 1104, 1098, 1099, 398, 0, 0, 0, - 0, 0, 1105, 1100, 0, 0, 0, 0, 0, 0, - 0, 0, 219 - ); - - protected $actionCheck = array( - 2, 3, 4, 5, 6, 7, 14, 9, 10, 11, - 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, - 53, 54, 55, 9, 10, 57, 30, 80, 32, 33, - 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, - 72, 73, 74, 75, 76, 77, 9, 70, 80, 33, - 34, 35, 36, 37, 38, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 153, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 3, 4, 5, 6, 7, 147, 148, 149, 80, 12, - 13, 159, 15, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 156, 44, 45, 46, 47, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 13, 106, 116, 108, 85, 50, 51, 33, - 34, 35, 36, 56, 85, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, - 73, 59, 60, 13, 82, 78, 79, 80, 80, 82, - 152, 153, 154, 86, 9, 10, 11, 8, 1, 2, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, - 10, 11, 156, 106, 143, 30, 160, 32, 33, 34, - 35, 36, 143, 116, 116, 117, 118, 119, 120, 121, - 30, 124, 125, 116, 117, 118, 119, 120, 121, 13, - 133, 134, 70, 136, 137, 138, 139, 140, 141, 142, - 31, 37, 38, 8, 132, 148, 149, 116, 156, 152, - 153, 154, 160, 37, 38, 158, 8, 160, 161, 8, - 163, 74, 75, 76, 77, 134, 135, 80, 9, 10, - 11, 84, 1, 80, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 155, 98, 0, 1, 2, 30, - 103, 104, 105, 106, 132, 8, 109, 110, 9, 10, - 11, 8, 115, 116, 117, 118, 9, 10, 11, 82, - 123, 70, 8, 126, 127, 128, 129, 8, 156, 30, - 155, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 9, 10, 11, 157, 53, 54, 55, - 8, 57, 155, 156, 157, 152, 153, 154, 10, 11, - 157, 80, 162, 69, 30, 151, 32, 33, 34, 35, - 74, 1, 2, 159, 155, 71, 80, 151, 30, 8, - 84, 37, 38, 87, 88, 89, 82, 91, 82, 93, - 8, 95, 13, 156, 98, 158, 13, 160, 13, 103, - 104, 105, 106, 82, 108, 109, 110, 156, 8, 113, - 31, 115, 116, 117, 118, 9, 10, 11, 157, 123, - 37, 38, 126, 127, 128, 129, 82, 13, 159, 33, - 34, 35, 82, 127, 8, 85, 30, 156, 32, 33, - 34, 160, 8, 147, 74, 1, 2, 50, 51, 52, - 80, 155, 156, 157, 84, 31, 159, 87, 88, 89, - 82, 91, 158, 93, 160, 95, 160, 106, 98, 108, - 100, 101, 102, 103, 104, 105, 106, 133, 159, 109, - 110, 160, 9, 10, 11, 115, 116, 117, 118, 9, - 10, 11, 8, 123, 144, 145, 126, 127, 128, 129, - 82, 82, 158, 30, 160, 32, 33, 108, 8, 70, - 30, 31, 113, 152, 16, 9, 10, 11, 74, 14, - 14, 122, 8, 8, 80, 155, 156, 157, 84, 13, - 159, 87, 88, 89, 151, 91, 30, 93, 160, 95, - 155, 159, 98, 14, 100, 101, 102, 103, 104, 105, - 106, 133, 16, 109, 110, 155, 157, 1, 2, 115, - 116, 117, 118, 9, 10, 11, 13, 123, 16, 155, - 126, 127, 128, 129, 33, 34, 158, 158, 160, 160, - 156, 9, 10, 11, 30, 37, 38, 31, 70, 155, - 37, 38, 50, 51, 52, 156, 16, 81, 16, 155, - 156, 157, 30, 16, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, - 74, 9, 10, 11, 1, 2, 80, 116, 11, 155, - 84, 69, 156, 87, 88, 89, 160, 91, 30, 93, - 132, 95, 30, 33, 98, 134, 135, 30, 57, 103, - 104, 105, 69, 70, 31, 109, 110, 75, 76, 155, - 155, 115, 116, 75, 76, 101, 102, 111, 112, 123, - 159, 155, 156, 155, 156, 155, 156, 31, 1, 2, - 31, 31, 31, 31, 31, 38, 70, 69, 77, 70, - 70, 70, 70, 80, 70, 70, 70, 74, 71, 85, - 85, 155, 156, 80, 97, 96, 100, 84, 31, 106, - 87, 88, 89, 82, 91, 82, 93, 82, 95, 89, - 92, 98, 1, 2, 90, 127, 103, 104, 105, 97, - 94, 127, 109, 110, 97, 97, 97, 132, 115, 116, - 100, 146, 113, 143, 143, 146, 123, 106, 151, 155, - 157, 74, 31, 157, 162, -1, 114, 80, -1, 116, - -1, 84, -1, -1, 87, 88, 89, -1, 91, -1, - 93, -1, 95, -1, 130, 98, 1, 2, 155, 156, - 103, 104, 105, -1, 130, -1, 109, 110, 131, -1, - 132, 132, 115, 116, 132, 74, -1, 152, 150, -1, - 123, 80, 146, -1, -1, 84, 31, 146, 87, 88, - 89, 146, 91, 146, 93, 146, 95, 146, 150, 98, - 1, 2, 156, 159, 103, 104, 105, 155, 155, 155, - 109, 110, 155, 156, 155, 155, 115, 116, 155, 155, - 155, 155, 155, 155, 123, 155, 155, 155, 155, 74, - 155, 155, 155, 155, 155, 80, 155, 155, 155, 84, - 155, 155, 87, 88, 89, 155, 91, 155, 93, 156, - 95, 156, 156, 98, 156, 156, 155, 156, 103, 104, - 105, 156, 156, 156, 109, 110, 156, 156, 156, 156, - 115, 116, 156, 74, 157, 157, 157, 157, 123, 80, - 31, 157, 157, 84, 157, 157, 87, 88, 89, 157, - 91, 157, 93, 157, 95, 157, 157, 98, 157, 50, - 51, 157, 103, 104, 105, 56, 157, 58, 109, 110, - 155, 156, 158, 157, 115, 116, 157, 157, 157, 70, - 157, 157, 123, 157, 50, 51, 157, 78, 79, 157, - 56, 157, 58, 157, 159, 86, 158, 158, 158, 158, - 158, 158, 158, 158, 70, 158, 158, 158, 158, 158, - 158, 158, 78, 79, 155, 156, 158, 160, 158, 163, - 86, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - -1, -1, 161, 134, 161, 136, 137, 138, 139, 140, - 141, 142, 162, 162, 162, 162, 162, 148, 149, 162, - 162, 162, 162, 162, 162, 162, 162, 158, 134, 162, - 136, 137, 138, 139, 140, 141, 142, -1, -1, -1, - -1, -1, 148, 149, -1, -1, -1, -1, -1, -1, - -1, -1, 158 - ); - - protected $actionBase = array( - 0, 227, 326, 400, 474, 233, 132, 132, 752, -2, - -2, 138, -2, -2, -2, 663, 761, 815, 761, 586, - 717, 859, 859, 859, 244, 256, 256, 256, 413, 583, - 583, 880, 546, 169, 415, 444, 409, 200, 200, 200, - 200, 137, 137, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 249, 205, 738, 559, - 535, 739, 741, 742, 876, 679, 877, 820, 821, 693, - 823, 824, 826, 829, 832, 819, 834, 907, 836, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 67, 536, 299, 510, 230, 44, 652, 652, 652, - 652, 652, 652, 652, 337, 337, 337, 337, 337, 337, - 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, - 337, 337, 378, 584, 584, 584, 657, 909, 648, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 503, -21, -21, 436, 650, 364, 571, - 215, 426, 156, 26, 26, 329, 329, 329, 329, 329, - 46, 46, 5, 5, 5, 5, 152, 186, 186, 186, - 186, 120, 120, 120, 120, 374, 374, 429, 448, 448, - 334, 267, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 336, 427, 427, 572, 572, 408, 551, 551, - 551, 551, 671, 171, 171, 391, 311, 311, 311, 109, - 641, 856, 68, 68, 68, 68, 68, 68, 324, 324, - 324, -3, -3, -3, 655, 77, 380, 77, 380, 683, - 685, 86, 685, 654, -15, 516, 776, 281, 646, 809, - 680, 816, 560, 711, 202, 578, 857, 643, -23, 578, - 578, 578, 578, 857, 622, 628, 596, -23, 578, -23, - 639, 454, 849, 351, 249, 558, 469, 631, 743, 514, - 688, 746, 464, 544, 548, 556, 7, 412, 708, 750, - 878, 879, 349, 702, 631, 631, 631, 327, 101, 7, - -8, 623, 623, 623, 623, 219, 623, 623, 623, 623, - 291, 430, 545, 401, 745, 653, 653, 675, 839, 814, - 814, 653, 673, 653, 675, 841, 841, 841, 841, 653, - 653, 653, 653, 814, 814, 667, 814, 275, 684, 694, - 694, 841, 713, 714, 653, 653, 697, 814, 814, 814, - 697, 687, 841, 669, 637, 333, 814, 841, 689, 673, - 689, 653, 669, 689, 673, 673, 689, 22, 686, 656, - 840, 842, 860, 756, 638, 644, 847, 848, 843, 845, - 838, 692, 719, 720, 528, 659, 660, 661, 662, 696, - 664, 698, 643, 658, 658, 658, 645, 701, 645, 658, - 658, 658, 658, 658, 658, 658, 658, 632, 635, 709, - 699, 670, 723, 566, 582, 758, 640, 636, 872, 865, - 881, 883, 849, 870, 645, 890, 634, 288, 610, 850, - 633, 753, 645, 851, 645, 759, 645, 873, 777, 666, - 778, 779, 658, 874, 891, 892, 893, 894, 897, 898, - 899, 900, 665, 901, 724, 674, 866, 344, 844, 639, - 705, 677, 755, 725, 780, 372, 902, 784, 645, 645, - 765, 706, 645, 766, 726, 712, 862, 727, 867, 903, - 640, 678, 868, 645, 681, 785, 904, 372, 690, 651, - 704, 649, 728, 858, 875, 853, 767, 612, 617, 787, - 788, 792, 691, 730, 863, 864, 835, 731, 770, 642, - 771, 676, 794, 772, 852, 732, 796, 798, 871, 647, - 707, 682, 672, 668, 773, 799, 869, 733, 735, 736, - 801, 737, 804, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 137, 137, 137, 137, -2, -2, -2, - -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 602, -21, -21, -21, -21, 602, -21, - -21, -21, -21, -21, -21, -21, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, -21, 602, 602, 602, -21, 68, - -21, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 602, 0, 0, 602, -21, - 602, -21, 602, -21, -21, 602, 602, 602, 602, 602, - 602, 602, -21, -21, -21, -21, -21, -21, 0, 324, - 324, 324, 324, -21, -21, -21, -21, 68, 68, 147, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 324, 324, -3, -3, 68, - 68, 68, 68, 68, 147, 68, 68, -23, 673, 673, - 673, 380, 380, 380, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 380, -23, 0, -23, - 0, 68, -23, 673, -23, 380, 673, 673, -23, 814, - 604, 604, 604, 604, 372, 7, 0, 0, 673, 673, - 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, - 0, 0, 814, 0, 653, 0, 0, 0, 0, 658, - 288, 0, 677, 456, 0, 0, 0, 0, 0, 0, - 677, 456, 530, 530, 0, 665, 658, 658, 658, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 372 - ); - - protected $actionDefault = array( - 3,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 540, 540, 495,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 297, 297, 297, - 32767,32767,32767, 528, 528, 528, 528, 528, 528, 528, - 528, 528, 528, 528,32767,32767,32767,32767,32767,32767, - 381,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 387, - 545,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 362, - 363, 365, 366, 296, 548, 529, 245, 388, 544, 295, - 247, 325, 499,32767,32767,32767, 327, 122, 256, 201, - 498, 125, 294, 232, 380, 382, 326, 301, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 300, 454, 359, 358, 357, 456,32767, 455, 492, - 492, 495,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 323, 483, 482, 324, 452, 328, 453, - 331, 457, 460, 329, 330, 347, 348, 345, 346, 349, - 458, 459, 476, 477, 474, 475, 299, 350, 351, 352, - 353, 478, 479, 480, 481,32767,32767, 280, 539, 539, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 338, 339, 467, 468,32767, 236, 236, - 236, 236, 281, 236,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 333, 334, - 332, 462, 463, 461, 428,32767,32767,32767, 430,32767, - 32767,32767,32767,32767,32767,32767,32767, 500,32767,32767, - 32767,32767,32767, 513, 417, 171,32767, 409,32767, 171, - 171, 171, 171,32767, 220, 222, 167,32767, 171,32767, - 486,32767,32767,32767,32767,32767, 518, 343,32767,32767, - 116,32767,32767,32767, 555,32767, 513,32767, 116,32767, - 32767,32767,32767, 356, 335, 336, 337,32767,32767, 517, - 511, 470, 471, 472, 473,32767, 464, 465, 466, 469, - 32767,32767,32767,32767,32767,32767,32767,32767, 425, 431, - 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 516, 515,32767, 410, 494, 186, 184, - 184,32767, 206, 206,32767,32767, 188, 487, 506,32767, - 188, 173,32767, 398, 175, 494,32767,32767, 238,32767, - 238,32767, 398, 238,32767,32767, 238,32767, 411, 435, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 377, 378, 489, 502,32767, - 503,32767, 409, 341, 342, 344, 320,32767, 322, 367, - 368, 369, 370, 371, 372, 373, 375,32767, 415,32767, - 418,32767,32767,32767, 255,32767, 553,32767,32767, 304, - 553,32767,32767,32767, 547,32767,32767, 298,32767,32767, - 32767,32767, 251,32767, 169,32767, 537,32767, 554,32767, - 511,32767, 340,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 512,32767,32767,32767,32767, 227,32767, 448, - 32767, 116,32767,32767,32767, 187,32767,32767, 302, 246, - 32767,32767, 546,32767,32767,32767,32767,32767,32767,32767, - 32767, 114,32767, 170,32767,32767,32767, 189,32767,32767, - 511,32767,32767,32767,32767,32767,32767,32767, 293,32767, - 32767,32767,32767,32767,32767,32767, 511,32767,32767, 231, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 411, - 32767, 274,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 127, 127, 3, 127, 127, 258, 3, - 258, 127, 258, 258, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 214, 217, 206, 206, 164, 127, - 127, 266 - ); - - protected $goto = array( - 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, - 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, - 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 138, 159, 160, 161, 162, 184, 139, 185, 493, 494, - 377, 495, 499, 500, 501, 502, 503, 504, 505, 506, - 967, 164, 145, 146, 148, 171, 176, 186, 203, 253, - 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, - 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, - 395, 396, 542, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, - 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, - 158, 136, 620, 560, 756, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 1108, - 628, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 757, 888, 888, 508, 1200, - 1200, 400, 606, 508, 536, 536, 568, 532, 534, 534, - 496, 498, 524, 540, 569, 572, 583, 590, 852, 852, - 852, 852, 847, 853, 174, 585, 519, 600, 601, 177, - 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, - 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, - 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, - 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, - 497, 497, 785, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 509, 578, 582, - 626, 749, 509, 544, 545, 546, 547, 548, 549, 550, - 551, 553, 586, 338, 559, 321, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 530, 349, 655, 555, 587, 352, 414, 591, 575, 604, - 885, 611, 612, 881, 616, 617, 623, 625, 630, 632, - 298, 296, 296, 296, 298, 290, 299, 944, 610, 816, - 1170, 613, 436, 436, 375, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 1072, - 1084, 1083, 945, 1065, 1072, 895, 895, 895, 895, 1178, - 895, 895, 1212, 1212, 1178, 388, 858, 561, 755, 1072, - 1072, 1072, 1072, 1072, 1072, 3, 4, 384, 384, 384, - 1212, 874, 856, 854, 856, 654, 465, 511, 883, 878, - 1089, 541, 384, 537, 384, 567, 384, 1026, 19, 15, - 371, 384, 1226, 510, 1204, 1192, 1192, 1192, 510, 906, - 372, 522, 533, 554, 912, 514, 1068, 1069, 13, 1065, - 378, 912, 1158, 594, 23, 965, 386, 386, 386, 602, - 1066, 1169, 1066, 937, 447, 449, 631, 752, 1177, 1067, - 1109, 614, 935, 1177, 605, 1197, 391, 1211, 1211, 543, - 892, 386, 1194, 1194, 1194, 399, 518, 1016, 901, 389, - 771, 529, 752, 340, 752, 1211, 518, 518, 385, 781, - 1214, 770, 772, 1063, 910, 774, 1058, 1176, 659, 953, - 514, 782, 862, 915, 450, 573, 1155, 0, 463, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 513, 528, 0, 0, 0, 0, - 513, 0, 528, 0, 350, 351, 0, 609, 512, 515, - 438, 439, 1064, 618, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 779, 1219, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 301, 301 - ); - - protected $gotoCheck = array( - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 57, 68, 15, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 126, - 9, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 16, 76, 76, 68, 76, - 76, 51, 51, 68, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 68, 68, - 68, 68, 68, 68, 27, 66, 101, 66, 66, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, - 61, 6, 117, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 32, 71, 32, 32, 69, 69, 69, 32, 40, 40, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, - 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 124, 124, 97, 81, 57, 57, 57, 57, 57, 118, - 57, 57, 142, 142, 118, 12, 33, 12, 14, 57, - 57, 57, 57, 57, 57, 30, 30, 13, 13, 13, - 142, 14, 14, 14, 14, 14, 57, 14, 14, 14, - 34, 2, 13, 109, 13, 2, 13, 34, 34, 34, - 34, 13, 13, 122, 140, 9, 9, 9, 122, 83, - 58, 58, 58, 34, 13, 13, 81, 81, 58, 81, - 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, - 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, - 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, - 78, 123, 119, 119, 119, 123, 47, 102, 80, 17, - 23, 9, 11, 18, 11, 141, 47, 47, 11, 23, - 141, 23, 24, 115, 84, 25, 113, 119, 73, 99, - 13, 26, 70, 85, 64, 65, 130, -1, 108, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - 9, -1, 9, -1, 71, 71, -1, 13, 9, 9, - 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 5 - ); - - protected $gotoBase = array( - 0, 0, -184, 0, 0, 356, 290, 0, 488, 149, - 0, 182, 85, 118, 426, 112, 203, 179, 208, 0, - 0, 0, 0, 162, 190, 198, 120, 27, 0, 272, - -224, 0, -274, 406, 32, 0, 0, 0, 0, 0, - 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, - 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, - 0, -11, -72, 0, 104, 95, -405, 0, -94, 41, - 119, -82, 0, 164, 0, 0, -79, 0, 197, 0, - 204, 43, 0, 441, 171, 121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 100, 0, 115, - 0, 195, 210, 0, 0, 0, 0, 0, 86, 427, - 259, 0, 0, 116, 0, 174, 0, -5, 117, 196, - 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, - 91, 271, 0, 0, 0, 0, 0, 0, 216, 0, - 437, 187, 102, 0, 0 - ); - - protected $gotoDefault = array( - -32768, 467, 663, 2, 664, 834, 739, 747, 597, 481, - 629, 581, 380, 1188, 791, 792, 793, 381, 367, 482, - 379, 410, 405, 780, 773, 775, 783, 172, 411, 786, - 1, 788, 517, 824, 1017, 364, 796, 365, 589, 798, - 526, 800, 801, 137, 382, 383, 527, 483, 390, 576, - 815, 276, 387, 817, 366, 818, 827, 370, 464, 454, - 459, 556, 608, 432, 446, 570, 564, 535, 1081, 565, - 861, 348, 869, 660, 877, 880, 484, 557, 891, 451, - 899, 1094, 397, 905, 911, 916, 287, 919, 417, 412, - 584, 924, 925, 5, 929, 621, 622, 8, 312, 952, - 598, 966, 420, 1036, 1038, 485, 486, 521, 458, 507, - 525, 487, 1059, 440, 413, 1062, 488, 489, 433, 434, - 1078, 354, 1163, 353, 448, 320, 1150, 579, 1113, 455, - 1203, 1159, 347, 490, 491, 376, 1182, 392, 1198, 437, - 1205, 1213, 343, 539, 566 - ); - - protected $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, - 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, - 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, - 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, - 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, - 48, 58, 58, 59, 59, 60, 60, 15, 16, 16, - 16, 63, 63, 63, 64, 64, 67, 67, 65, 65, - 69, 69, 41, 41, 50, 50, 53, 53, 53, 52, - 52, 70, 42, 42, 42, 42, 71, 71, 72, 72, - 73, 73, 39, 39, 35, 35, 74, 37, 37, 75, - 36, 36, 38, 38, 49, 49, 49, 61, 61, 77, - 77, 78, 78, 80, 80, 80, 79, 79, 62, 62, - 81, 81, 81, 82, 82, 83, 83, 83, 44, 44, - 84, 84, 84, 45, 45, 85, 85, 86, 86, 66, - 87, 87, 87, 87, 92, 92, 93, 93, 94, 94, - 94, 94, 94, 95, 96, 96, 91, 91, 88, 88, - 90, 90, 98, 98, 97, 97, 97, 97, 97, 97, - 89, 89, 100, 99, 99, 46, 46, 40, 40, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 34, 34, 47, 47, 105, - 105, 106, 106, 106, 106, 112, 101, 101, 108, 108, - 114, 114, 115, 116, 116, 116, 116, 116, 116, 68, - 68, 57, 57, 57, 57, 102, 102, 120, 120, 117, - 117, 121, 121, 121, 121, 103, 103, 103, 107, 107, - 107, 113, 113, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 27, 27, 27, 27, - 27, 27, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 111, 111, 104, 104, - 104, 104, 127, 127, 130, 130, 129, 129, 131, 131, - 51, 51, 51, 51, 133, 133, 132, 132, 132, 132, - 132, 134, 134, 119, 119, 122, 122, 118, 118, 136, - 135, 135, 135, 135, 123, 123, 123, 123, 110, 110, - 124, 124, 124, 124, 76, 137, 137, 138, 138, 138, - 109, 109, 139, 139, 140, 140, 140, 140, 140, 125, - 125, 125, 125, 142, 143, 141, 141, 141, 141, 141, - 141, 141, 144, 144, 144 - ); - - protected $ruleToLength = array( - 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, - 3, 1, 3, 1, 1, 3, 1, 3, 1, 2, - 3, 1, 3, 3, 1, 3, 2, 0, 1, 1, - 1, 1, 1, 3, 5, 8, 3, 5, 9, 3, - 2, 3, 2, 3, 2, 3, 3, 3, 3, 1, - 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, - 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, - 3, 0, 1, 0, 1, 0, 1, 10, 7, 6, - 5, 1, 2, 2, 0, 2, 0, 2, 0, 2, - 1, 3, 1, 4, 1, 4, 1, 1, 4, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 1, 4, 0, 2, 3, 0, 2, 4, - 0, 2, 0, 3, 1, 2, 1, 1, 0, 1, - 3, 4, 6, 1, 1, 1, 0, 1, 0, 2, - 2, 3, 3, 1, 3, 1, 2, 2, 3, 1, - 1, 2, 4, 3, 1, 1, 3, 2, 0, 1, - 3, 3, 9, 3, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 3, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 3, 3, 1, 0, 1, 1, - 3, 3, 4, 4, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 3, 5, 4, 3, - 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, - 2, 1, 2, 10, 11, 3, 3, 2, 4, 4, - 3, 4, 4, 4, 4, 7, 3, 2, 0, 4, - 1, 3, 2, 2, 4, 6, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 3, 4, 4, 0, 2, 1, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 2, 1, 3, 1, 4, - 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 3, 1, 3, 1, 1, - 3, 3, 0, 2, 0, 1, 3, 1, 3, 1, - 1, 1, 1, 1, 6, 4, 3, 4, 2, 4, - 4, 1, 3, 1, 2, 1, 1, 4, 1, 1, - 3, 6, 4, 4, 4, 4, 1, 4, 0, 1, - 1, 3, 1, 1, 4, 3, 1, 1, 1, 0, - 0, 2, 3, 1, 3, 1, 4, 2, 2, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 6, 3, 1, 1, 1 - ); - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 91 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 98 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 99 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 100 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 101 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 103 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 104 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 105 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 106 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 107 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 108 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 111 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 112 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 114 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 115 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 118 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 119 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 120 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 121 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 122 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 123 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 124 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 125 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 126 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 127 => function ($stackPos) { - $this->semValue = array(); - }, - 128 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 129 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 132 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 133 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - - }, - 134 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 135 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 136 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 141 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 142 => function ($stackPos) { - $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 143 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 144 => function ($stackPos) { - $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 145 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 146 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 147 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 148 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 149 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 150 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 152 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 153 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 154 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 155 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 156 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 157 => function ($stackPos) { - $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 161 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ - }, - 162 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 163 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ - }, - 164 => function ($stackPos) { - $this->semValue = array(); - }, - 165 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 167 => function ($stackPos) { - $this->semValue = null; - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 169 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 170 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 171 => function ($stackPos) { - $this->semValue = false; - }, - 172 => function ($stackPos) { - $this->semValue = true; - }, - 173 => function ($stackPos) { - $this->semValue = false; - }, - 174 => function ($stackPos) { - $this->semValue = true; - }, - 175 => function ($stackPos) { - $this->semValue = false; - }, - 176 => function ($stackPos) { - $this->semValue = true; - }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(7-2)); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(6-2)); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 181 => function ($stackPos) { - $this->semValue = 0; - }, - 182 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 183 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 184 => function ($stackPos) { - $this->semValue = null; - }, - 185 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 186 => function ($stackPos) { - $this->semValue = array(); - }, - 187 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 188 => function ($stackPos) { - $this->semValue = array(); - }, - 189 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 190 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 191 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 192 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 193 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 194 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 195 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 196 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 197 => function ($stackPos) { - $this->semValue = null; - }, - 198 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 199 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 200 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 201 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 202 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 203 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 204 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 206 => function ($stackPos) { - $this->semValue = array(); - }, - 207 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 210 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 212 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 214 => function ($stackPos) { - $this->semValue = array(); - }, - 215 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 216 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 217 => function ($stackPos) { - $this->semValue = array(); - }, - 218 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 219 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 220 => function ($stackPos) { - $this->semValue = null; - }, - 221 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 222 => function ($stackPos) { - $this->semValue = null; - }, - 223 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 224 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 225 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 228 => function ($stackPos) { - $this->semValue = array(); - }, - 229 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 230 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 231 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 232 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 234 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 235 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 236 => function ($stackPos) { - $this->semValue = null; - }, - 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 238 => function ($stackPos) { - $this->semValue = null; - }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 240 => function ($stackPos) { - $this->semValue = array(); - }, - 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 242 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); - }, - 243 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 244 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 245 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 247 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 249 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 250 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 251 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 252 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 255 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 256 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 257 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 258 => function ($stackPos) { - $this->semValue = array(); - }, - 259 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 260 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, - 261 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 262 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(9-1)); - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = array(); - }, - 265 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 266 => function ($stackPos) { - $this->semValue = array(); - }, - 267 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 270 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 275 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 276 => function ($stackPos) { - $this->semValue = null; - }, - 277 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 279 => function ($stackPos) { - $this->semValue = 0; - }, - 280 => function ($stackPos) { - $this->semValue = 0; - }, - 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 282 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 283 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 285 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 286 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 287 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 288 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 289 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 292 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 293 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 294 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 297 => function ($stackPos) { - $this->semValue = array(); - }, - 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 300 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 301 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 302 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 303 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 305 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 313 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 317 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 321 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 322 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 334 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 335 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 336 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 341 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 342 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 343 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 354 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 355 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 357 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 358 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 360 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 361 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 362 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 363 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 364 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 365 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 369 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 370 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 371 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 372 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 373 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 374 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 379 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 380 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 386 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 390 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); - $this->checkClass($this->semValue[0], -1); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = array(); - }, - 399 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 400 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 401 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 411 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 416 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 417 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 418 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = null; - }, - 426 => function ($stackPos) { - $this->semValue = null; - }, - 427 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 428 => function ($stackPos) { - $this->semValue = array(); - }, - 429 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 430 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 431 => function ($stackPos) { - $this->semValue = array(); - }, - 432 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 433 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); - }, - 434 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 435 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)], false), $attrs); - }, - 436 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 437 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 438 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 440 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 444 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); - }, - 445 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); - }, - 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 486 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 488 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 490 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 491 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 492 => function ($stackPos) { - $this->semValue = array(); - }, - 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 496 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 497 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 498 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 504 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 506 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 507 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 508 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 510 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 512 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 513 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 514 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 519 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 520 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 521 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 522 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 523 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 524 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 527 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 528 => function ($stackPos) { - $this->semValue = null; - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 533 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 534 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 535 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semValue = null; - }, - 540 => function ($stackPos) { - $this->semValue = array(); - }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 542 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 543 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 550 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 552 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 553 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 559 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 562 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 563 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 7a0854b3..80159351 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -1,8 +1,9 @@ -reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 85 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 94 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 98 => function ($stackPos) { + 0 => null, + 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); + }, + 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + }, + 3 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, + 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); + }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, + 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 94 => null, + 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 97 => static function ($self, $stackPos) { /* nothing */ }, - 99 => function ($stackPos) { + 98 => static function ($self, $stackPos) { /* nothing */ }, - 100 => function ($stackPos) { + 99 => static function ($self, $stackPos) { /* nothing */ }, - 101 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + 101 => null, + 102 => null, + 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 105 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 107 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 108 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 110 => static function ($self, $stackPos) { + $self->semValue = []; }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 111 => null, + 112 => null, + 113 => null, + 114 => null, + 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 111 => function ($stackPos) { - $this->semValue = []; + 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); }, - 112 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 121 => null, + 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); + 123 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 119 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 125 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 121 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 127 => null, + 128 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 122 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 129 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 123 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 130 => null, + 131 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 124 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; + 132 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 125 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; + 133 => null, + 134 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + 135 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 127 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 136 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 128 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 129 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 130 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 140 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 132 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; }, - 133 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 142 => null, + 143 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 134 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 144 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 135 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 145 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 136 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 146 => null, + 147 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 148 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 149 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 151 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, - 141 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + 152 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 142 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + 153 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 143 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 154 => null, + 155 => null, + 156 => null, + 157 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 144 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 158 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 145 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 146 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 147 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 148 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 149 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 150 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 151 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 152 => function ($stackPos) { - $this->semValue = array(); + 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 153 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 154 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 155 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { + 171 => static function ($self, $stackPos) { - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + 172 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 181 => static function ($self, $stackPos) { + $self->semValue = null; /* means: no statement */ }, - 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 182 => null, + 183 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); }, - 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 184 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 171 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 185 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 172 => function ($stackPos) { - - $e = $this->semStack[$stackPos-(2-1)]; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } else { - $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } + 186 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 187 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 188 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 189 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 190 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 191 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 192 => null, + 193 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 194 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 195 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 196 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 197 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 198 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 199 => static function ($self, $stackPos) { + $self->semValue = false; + }, + 200 => static function ($self, $stackPos) { + $self->semValue = true; + }, + 201 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 202 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 203 => null, + 204 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 205 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 206 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 207 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(7-2)); + }, + 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(8-3)); + }, + 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos-(7-3)); + }, + 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + }, + 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos-(8-3)); + }, + 212 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 213 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 214 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 215 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 216 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 217 => null, + 218 => null, + 219 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 220 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 221 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 222 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 223 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 224 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 225 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 226 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 227 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 228 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 229 => null, + 230 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 231 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 232 => null, + 233 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 234 => null, + 235 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 236 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; + }, + 237 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 239 => null, + 240 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 241 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 242 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 243 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 244 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; + }, + 245 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(5-3)]; + }, + 247 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 248 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 249 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 250 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 251 => null, + 252 => null, + 253 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + }, + 254 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 255 => null, + 256 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 257 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 258 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 259 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 260 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 261 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 262 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 263 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 264 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 265 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 268 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 269 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 270 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 271 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); + }, + 272 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 273 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-2)], true); + }, + 274 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); + }, + 275 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); + }, + 276 => null, + 277 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 278 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 279 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 280 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 281 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 282 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 283 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 284 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 286 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(6-6)], null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + $self->checkParam($self->semValue); + }, + 287 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-8)], $self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(8-2)], $self->semStack[$stackPos-(8-1)]); + $self->checkParam($self->semValue); + }, + 288 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + }, + 289 => null, + 290 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 291 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 292 => null, + 293 => null, + 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 295 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); + }, + 296 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 297 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 298 => null, + 299 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 300 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 301 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 302 => null, + 303 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 304 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 305 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 306 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 307 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 308 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 309 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 310 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 311 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 312 => null, + 313 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 314 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 315 => null, + 316 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 317 => null, + 318 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 319 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; + }, + 320 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 321 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 322 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; + }, + 323 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); + }, + 324 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 325 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 326 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 327 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 328 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 329 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 330 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); + }, + 331 => null, + 332 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 333 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 334 => null, + 335 => null, + 336 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 337 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 338 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 339 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 340 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } + }, + 341 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 342 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 343 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); + $self->checkProperty($self->semValue, $stackPos-(5-2)); + }, + 344 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); + $self->checkClassConst($self->semValue, $stackPos-(5-2)); + }, + 345 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); + $self->checkClassConst($self->semValue, $stackPos-(6-2)); + }, + 346 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos-(10-2)); + }, + 347 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 348 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 349 => static function ($self, $stackPos) { + $self->semValue = null; /* will be skipped */ + }, + 350 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 351 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 352 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 353 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, + 354 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 355 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + }, + 356 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 357 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 359 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, + 360 => null, + 361 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); + }, + 362 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 363 => null, + 364 => null, + 365 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 366 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 367 => null, + 368 => null, + 369 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 370 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; + }, + 371 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; + }, + 372 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; + }, + 373 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; + }, + 374 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; + }, + 375 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 376 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 377 => null, + 378 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 379 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 380 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 381 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 382 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 383 => null, + 384 => null, + 385 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 386 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 387 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 388 => null, + 389 => null, + 390 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 391 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 392 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 393 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 394 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); + } }, - 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 395 => null, + 396 => null, + 397 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + 398 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + 399 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 400 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 401 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + 402 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 403 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 404 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 181 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ + 405 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 406 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 183 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ + 407 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 184 => function ($stackPos) { - $this->semValue = array(); + 408 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 185 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 409 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 186 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 410 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 187 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 411 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + 412 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 189 => function ($stackPos) { - $this->semValue = null; + 413 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 190 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 414 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 415 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 192 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 416 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 193 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 417 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 194 => function ($stackPos) { - $this->semValue = false; + 418 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 195 => function ($stackPos) { - $this->semValue = true; + 419 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 196 => function ($stackPos) { - $this->semValue = false; + 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 197 => function ($stackPos) { - $this->semValue = true; + 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 198 => function ($stackPos) { - $this->semValue = false; + 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 199 => function ($stackPos) { - $this->semValue = true; + 423 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 200 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 201 => function ($stackPos) { - $this->semValue = []; + 425 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 202 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 203 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 204 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(8-3)); + 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 205 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 206 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 207 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 208 => function ($stackPos) { - $this->semValue = null; + 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 210 => function ($stackPos) { - $this->semValue = null; + 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 212 => function ($stackPos) { - $this->semValue = 0; + 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 213 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 214 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 215 => function ($stackPos) { - $this->semValue = null; + 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 217 => function ($stackPos) { - $this->semValue = array(); + 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 218 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 219 => function ($stackPos) { - $this->semValue = array(); + 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 221 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 222 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 223 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 447 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 224 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 226 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 228 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 229 => function ($stackPos) { - $this->semValue = null; + 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 230 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 232 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 233 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 234 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 459 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 239 => function ($stackPos) { - $this->semValue = array(); + 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 240 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 241 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 465 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); }, - 242 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + 467 => null, + 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 245 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 246 => function ($stackPos) { - $this->semValue = []; + 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 248 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 249 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 250 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 251 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 252 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 253 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 254 => function ($stackPos) { - $this->semValue = array(); + 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 255 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 256 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 257 => function ($stackPos) { - $this->semValue = array(); + 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 258 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 483 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); + $self->checkClass($self->semValue[0], -1); }, - 259 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 260 => function ($stackPos) { - $this->semValue = null; + 485 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 261 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 486 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 262 => function ($stackPos) { - $this->semValue = null; + 487 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 488 => null, + 489 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 264 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 490 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 265 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + 491 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 266 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 492 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 267 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 268 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 269 => function ($stackPos) { - $this->semValue = array(); + 495 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 271 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 497 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 272 => function ($stackPos) { - $this->semValue = 0; + 498 => null, + 499 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 273 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 500 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 274 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + 501 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 275 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + 502 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 276 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + 503 => null, + 504 => null, + 505 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 277 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 278 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + 507 => null, + 508 => null, + 509 => static function ($self, $stackPos) { + $self->semValue = null; }, - 279 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + 510 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 280 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + 511 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 512 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 282 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 513 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 283 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 514 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 284 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 515 => null, + 516 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 285 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 517 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 286 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 518 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 287 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + 519 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 288 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 520 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 289 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 521 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 522 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 523 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 292 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 524 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 293 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 525 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 294 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 526 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 527 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 528 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 529 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); + $self->createdArrays->attach($self->semValue); }, - 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 530 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 299 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 531 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 300 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 532 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 301 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 533 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 302 => function ($stackPos) { - $this->semValue = null; + 534 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 535 => null, + 536 => null, + 537 => null, + 538 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 304 => function ($stackPos) { - $this->semValue = null; + 539 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 305 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 540 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 306 => function ($stackPos) { - $this->semValue = null; + 541 => static function ($self, $stackPos) { + $self->semValue = null; }, - 307 => function ($stackPos) { - $this->semValue = array(); + 542 => null, + 543 => null, + 544 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 545 => null, + 546 => null, + 547 => null, + 548 => null, + 549 => null, + 550 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + 551 => null, + 552 => null, + 553 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 310 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 554 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 311 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 555 => null, + 556 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 312 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 557 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 313 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 558 => static function ($self, $stackPos) { + $self->semValue = null; }, - 314 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 559 => null, + 560 => null, + 561 => null, + 562 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 315 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 563 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 316 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + 564 => null, + 565 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 566 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 318 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 567 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 319 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 568 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 320 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 569 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + 570 => null, + 571 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 322 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 572 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 573 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 324 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 574 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 325 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 575 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 326 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + 576 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 327 => function ($stackPos) { - $this->semValue = array(); + 577 => null, + 578 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 328 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 579 => null, + 580 => null, + 581 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 329 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + 582 => null, + 583 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 330 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + 584 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); }, - 331 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + 585 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 332 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 586 => null, + 587 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 333 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 588 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 334 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + 589 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 335 => function ($stackPos) { - $this->semValue = array(); + 590 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 336 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 591 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 337 => function ($stackPos) { - $this->semValue = array(); + 592 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 338 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 593 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 339 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 594 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 340 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + 595 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 341 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 596 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 342 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 597 => static function ($self, $stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 598 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 344 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 599 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 345 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 600 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 346 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + 601 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 347 => function ($stackPos) { - $this->semValue = null; + 602 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 348 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 604 => null, + 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 350 => function ($stackPos) { - $this->semValue = 0; + 606 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 351 => function ($stackPos) { - $this->semValue = 0; + 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 354 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 355 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + 611 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 356 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + 612 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 357 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + 613 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 358 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 360 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 361 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 363 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 364 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 365 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 369 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 370 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 371 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 372 => function ($stackPos) { - $this->semValue = array(); - }, - 373 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 374 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 377 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 378 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 379 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 380 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 400 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 401 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 417 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 418 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 430 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 431 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 432 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 433 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 434 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 435 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 436 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 437 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 438 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 440 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 444 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 445 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 446 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = array(); - }, - 471 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 472 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 473 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 474 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 481 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 486 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 488 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 490 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 491 => function ($stackPos) { - $this->semValue = null; - }, - 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 493 => function ($stackPos) { - $this->semValue = array(); - }, - 494 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 495 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 496 => function ($stackPos) { - $this->semValue = array(); - }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 498 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 501 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 502 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 503 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 507 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 508 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; - }, - 509 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 510 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 512 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)]), $attrs); - }, - 513 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 514 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 519 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 520 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); - }, - 521 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 522 => function ($stackPos) { - $this->semValue = null; - }, - 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 524 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 525 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 526 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 528 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 534 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semValue = null; - }, - 540 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 543 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; - }, - 549 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 550 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 564 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 565 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 568 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 569 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 570 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 573 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 574 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 578 => function ($stackPos) { - $this->semValue = null; - }, - 579 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 580 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 581 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 582 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 583 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 584 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 586 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 587 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 588 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 589 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 590 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 592 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 593 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 594 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 595 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 596 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 614 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, + 615 => null, ]; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php deleted file mode 100644 index b76a5d94..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +++ /dev/null @@ -1,148 +0,0 @@ - Map of PHP token IDs to drop */ + protected array $dropTokens; + /** @var int[] Map of external symbols (static::T_*) to internal symbols */ + protected array $tokenToSymbol; /** @var string[] Map of symbols to their names */ - protected $symbolToName; - /** @var array Names of the production rules (only necessary for debugging) */ - protected $productions; + protected array $symbolToName; + /** @var array Names of the production rules (only necessary for debugging) */ + protected array $productions; /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected $actionBase; + protected array $actionBase; /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected $action; + protected array $action; /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected $actionCheck; + protected array $actionCheck; /** @var int[] Map of states to their default action */ - protected $actionDefault; + protected array $actionDefault; /** @var callable[] Semantic action callbacks */ - protected $reduceCallbacks; + protected array $reduceCallbacks; /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ - protected $gotoBase; + protected array $gotoBase; /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected $goto; + protected array $goto; /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ - protected $gotoCheck; + protected array $gotoCheck; /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected $gotoDefault; + protected array $gotoDefault; /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for * determining the state to goto after reduction. */ - protected $ruleToNonTerminal; + protected array $ruleToNonTerminal; /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to * be popped from the stack(s) on reduction. */ - protected $ruleToLength; + protected array $ruleToLength; /* * The following members are part of the parser state: */ - /** @var Lexer Lexer that is used when parsing */ - protected $lexer; /** @var mixed Temporary value containing the result of last semantic action (reduction) */ protected $semValue; - /** @var array Semantic value stack (contains values of tokens and semantic action results) */ - protected $semStack; - /** @var array[] Start attribute stack */ - protected $startAttributeStack; - /** @var array[] End attribute stack */ - protected $endAttributeStack; - /** @var array End attributes of last *shifted* token */ - protected $endAttributes; - /** @var array Start attributes of last *read* token */ - protected $lookaheadStartAttributes; + /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ + protected array $semStack; + /** @var int[] Token start position stack */ + protected array $tokenStartStack; + /** @var int[] Token end position stack */ + protected array $tokenEndStack; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** @var int Error state, used to avoid error floods */ - protected $errorState; + protected int $errorState; + + /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ + protected ?\SplObjectStorage $createdArrays; + + /** @var Token[] Tokens for the current parse */ + protected array $tokens; + /** @var int Current position in token array */ + protected int $tokenPos; /** * Initialize $reduceCallbacks map. */ - abstract protected function initReduceCallbacks(); + abstract protected function initReduceCallbacks(): void; /** * Creates a parser instance. * - * Options: Currently none. + * Options: + * * phpVersion: ?PhpVersion, * * @param Lexer $lexer A lexer - * @param array $options Options array. + * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This + * option is best-effort: Even if specified, parsing will generally assume the latest + * supported version and only adjust behavior in minor ways, for example by omitting + * errors in older versions and interpreting type hints as a name or identifier depending + * on version. */ - public function __construct(Lexer $lexer, array $options = []) { + public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->lexer = $lexer; - - if (isset($options['throwOnError'])) { - throw new \LogicException( - '"throwOnError" is no longer supported, use "errorHandler" instead'); - } + $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); $this->initReduceCallbacks(); + $this->phpTokenToSymbol = $this->createTokenMap(); + $this->dropTokens = array_fill_keys( + [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true + ); } /** @@ -152,36 +175,55 @@ abstract class ParserAbstract implements Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null) { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); + $this->createdArrays = new \SplObjectStorage(); - $this->lexer->startLexing($code, $this->errorHandler); + $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); $result = $this->doParse(); + // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, + // because we don't know a priori whether a given array expression will be used in a destructuring context + // or not. + foreach ($this->createdArrays as $node) { + foreach ($node->items as $item) { + if ($item->value instanceof Expr\Error) { + $this->errorHandler->handleError( + new Error('Cannot use empty array elements in arrays', $item->getAttributes())); + } + } + } + // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser - $this->startAttributeStack = []; - $this->endAttributeStack = []; + $this->tokenStartStack = []; + $this->tokenEndStack = []; $this->semStack = []; $this->semValue = null; + $this->createdArrays = null; + + if ($result !== null) { + $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); + $traverser->traverse($result); + } return $result; } - protected function doParse() { + public function getTokens(): array { + return $this->tokens; + } + + /** @return Stmt[]|null */ + protected function doParse(): ?array { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; - - // The attributes for a node are taken from the first and last token of the node. - // From the first token only the startAttributes are taken and from the last only - // the endAttributes. Both are merged using the array union operator (+). - $startAttributes = []; - $endAttributes = []; - $this->endAttributes = $endAttributes; + $tokenValue = null; + $this->tokenPos = -1; // Keep stack of start and end attributes - $this->startAttributeStack = []; - $this->endAttributeStack = [$endAttributes]; + $this->tokenStartStack = []; + $this->tokenEndStack = [0]; // Start off in the initial state and keep a stack of previous states $state = 0; @@ -202,26 +244,20 @@ abstract class ParserAbstract implements Parser $rule = $this->actionDefault[$state]; } else { if ($symbol === self::SYMBOL_NONE) { - // Fetch the next token id from the lexer and fetch additional info by-ref. - // The end attributes are fetched into a temporary variable and only set once the token is really - // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is - // reduced after a token was read but not yet shifted. - $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); + do { + $token = $this->tokens[++$this->tokenPos]; + $tokenId = $token->id; + } while (isset($this->dropTokens[$tokenId])); - // map the lexer token id to the internally used symbols - $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize - ? $this->tokenToSymbol[$tokenId] - : $this->invalidSymbol; - - if ($symbol === $this->invalidSymbol) { + // Map the lexer token id to the internally used symbols. + $tokenValue = $token->text; + if (!isset($this->phpTokenToSymbol[$tokenId])) { throw new \RangeException(sprintf( 'The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue )); } - - // Allow productions to access the start attributes of the lookahead token. - $this->lookaheadStartAttributes = $startAttributes; + $symbol = $this->phpTokenToSymbol[$tokenId]; //$this->traceRead($symbol); } @@ -246,9 +282,8 @@ abstract class ParserAbstract implements Parser ++$stackPos; $stateStack[$stackPos] = $state = $action; $this->semStack[$stackPos] = $tokenValue; - $this->startAttributeStack[$stackPos] = $startAttributes; - $this->endAttributeStack[$stackPos] = $endAttributes; - $this->endAttributes = $endAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenPos; $symbol = self::SYMBOL_NONE; if ($this->errorState) { @@ -274,15 +309,22 @@ abstract class ParserAbstract implements Parser /* accept */ //$this->traceAccept(); return $this->semValue; - } elseif ($rule !== $this->unexpectedTokenRule) { + } + if ($rule !== $this->unexpectedTokenRule) { /* reduce */ //$this->traceReduce($rule); + $ruleLength = $this->ruleToLength[$rule]; try { - $this->reduceCallbacks[$rule]($stackPos); + $callback = $this->reduceCallbacks[$rule]; + if ($callback !== null) { + $callback($this, $stackPos); + } elseif ($ruleLength > 0) { + $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; + } } catch (Error $e) { - if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { - $e->setStartLine($startAttributes['startLine']); + if (-1 === $e->getStartLine()) { + $e->setStartLine($this->tokens[$this->tokenPos]->line); } $this->emitError($e); @@ -291,8 +333,7 @@ abstract class ParserAbstract implements Parser } /* Goto - shift nonterminal */ - $lastEndAttributes = $this->endAttributeStack[$stackPos]; - $ruleLength = $this->ruleToLength[$rule]; + $lastTokenEnd = $this->tokenEndStack[$stackPos]; $stackPos -= $ruleLength; $nonTerminal = $this->ruleToNonTerminal[$rule]; $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; @@ -305,18 +346,19 @@ abstract class ParserAbstract implements Parser ++$stackPos; $stateStack[$stackPos] = $state; $this->semStack[$stackPos] = $this->semValue; - $this->endAttributeStack[$stackPos] = $lastEndAttributes; + $this->tokenEndStack[$stackPos] = $lastTokenEnd; if ($ruleLength === 0) { // Empty productions use the start attributes of the lookahead token. - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; } } else { /* error */ switch ($this->errorState) { case 0: $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $startAttributes + $endAttributes)); + $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); // Break missing intentionally + // no break case 1: case 2: $this->errorState = 3; @@ -343,9 +385,8 @@ abstract class ParserAbstract implements Parser // We treat the error symbol as being empty, so we reset the end attributes // to the end attributes of the last non-error symbol - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; - $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; - $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; break; case 3: @@ -372,7 +413,7 @@ abstract class ParserAbstract implements Parser throw new \RuntimeException('Reached end of parser loop'); } - protected function emitError(Error $error) { + protected function emitError(Error $error): void { $this->errorHandler->handleError($error); } @@ -380,11 +421,11 @@ abstract class ParserAbstract implements Parser * Format error message including expected tokens. * * @param int $symbol Unexpected symbol - * @param int $state State at time of error + * @param int $state State at time of error * * @return string Formatted error message */ - protected function getErrorMessage(int $symbol, int $state) : string { + protected function getErrorMessage(int $symbol, int $state): string { $expectedString = ''; if ($expected = $this->getExpectedTokens($state)) { $expectedString = ', expecting ' . implode(' or ', $expected); @@ -400,7 +441,7 @@ abstract class ParserAbstract implements Parser * * @return string[] Expected tokens. If too many, an empty array is returned. */ - protected function getExpectedTokens(int $state) : array { + protected function getExpectedTokens(int $state): array { $expected = []; $base = $this->actionBase[$state]; @@ -428,37 +469,79 @@ abstract class ParserAbstract implements Parser return $expected; } + /** + * Get attributes for a node with the given start and end token positions. + * + * @param int $tokenStartPos Token position the node starts at + * @param int $tokenEndPos Token position the node ends at + * @return array Attributes + */ + protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { + $startToken = $this->tokens[$tokenStartPos]; + $afterEndToken = $this->tokens[$tokenEndPos + 1]; + return [ + 'startLine' => $startToken->line, + 'startTokenPos' => $tokenStartPos, + 'startFilePos' => $startToken->pos, + 'endLine' => $afterEndToken->line, + 'endTokenPos' => $tokenEndPos, + 'endFilePos' => $afterEndToken->pos - 1, + ]; + } + + /** + * Get attributes for a single token at the given token position. + * + * @return array Attributes + */ + protected function getAttributesForToken(int $tokenPos): array { + if ($tokenPos < \count($this->tokens) - 1) { + return $this->getAttributes($tokenPos, $tokenPos); + } + + // Get attributes for the sentinel token. + $token = $this->tokens[$tokenPos]; + return [ + 'startLine' => $token->line, + 'startTokenPos' => $tokenPos, + 'startFilePos' => $token->pos, + 'endLine' => $token->line, + 'endTokenPos' => $tokenPos, + 'endFilePos' => $token->pos, + ]; + } + /* * Tracing functions used for debugging the parser. */ /* - protected function traceNewState($state, $symbol) { + protected function traceNewState($state, $symbol): void { echo '% State ' . $state . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; } - protected function traceRead($symbol) { + protected function traceRead($symbol): void { echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceShift($symbol) { + protected function traceShift($symbol): void { echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceAccept() { + protected function traceAccept(): void { echo "% Accepted.\n"; } - protected function traceReduce($n) { + protected function traceReduce($n): void { echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; } - protected function tracePop($state) { + protected function tracePop($state): void { echo '% Recovering, uncovered state ' . $state . "\n"; } - protected function traceDiscard($symbol) { + protected function traceDiscard($symbol): void { echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; } */ @@ -473,13 +556,14 @@ abstract class ParserAbstract implements Parser * @param Node\Stmt[] $stmts * @return Node\Stmt[] */ - protected function handleNamespaces(array $stmts) : array { + protected function handleNamespaces(array $stmts): array { $hasErrored = false; $style = $this->getNamespacingStyle($stmts); if (null === $style) { // not namespaced, nothing to do return $stmts; - } elseif ('brace' === $style) { + } + if ('brace' === $style) { // For braced namespaces we only have to check that there are no invalid statements between the namespaces $afterFirstNamespace = false; foreach ($stmts as $stmt) { @@ -497,7 +581,7 @@ abstract class ParserAbstract implements Parser } else { // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts $resultStmts = []; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; $lastNs = null; foreach ($stmts as $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { @@ -506,12 +590,12 @@ abstract class ParserAbstract implements Parser } if ($stmt->stmts === null) { $stmt->stmts = []; - $targetStmts =& $stmt->stmts; + $targetStmts = &$stmt->stmts; $resultStmts[] = $stmt; } else { // This handles the invalid case of mixed style namespaces $resultStmts[] = $stmt; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; } $lastNs = $stmt; } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { @@ -528,7 +612,7 @@ abstract class ParserAbstract implements Parser } } - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { // We moved the statements into the namespace node, as such the end of the namespace node // needs to be extended to the end of the statements. if (empty($stmt->stmts)) { @@ -546,6 +630,22 @@ abstract class ParserAbstract implements Parser } } + /** @return array */ + private function getNamespaceErrorAttributes(Namespace_ $node): array { + $attrs = $node->getAttributes(); + // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. + if (isset($attrs['startLine'])) { + $attrs['endLine'] = $attrs['startLine']; + } + if (isset($attrs['startTokenPos'])) { + $attrs['endTokenPos'] = $attrs['startTokenPos']; + } + if (isset($attrs['startFilePos'])) { + $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; + } + return $attrs; + } + /** * Determine namespacing style (semicolon or brace) * @@ -553,7 +653,7 @@ abstract class ParserAbstract implements Parser * * @return null|string One of "semicolon", "brace" or null (no namespaces) */ - private function getNamespacingStyle(array $stmts) { + private function getNamespacingStyle(array $stmts): ?string { $style = null; $hasNotAllowedStmts = false; foreach ($stmts as $i => $stmt) { @@ -564,13 +664,13 @@ abstract class ParserAbstract implements Parser if ($hasNotAllowedStmts) { $this->emitError(new Error( 'Namespace declaration statement has to be the very first statement in the script', - $stmt->getLine() // Avoid marking the entire namespace as an error + $this->getNamespaceErrorAttributes($stmt) )); } } elseif ($style !== $currentStyle) { $this->emitError(new Error( 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $stmt->getLine() // Avoid marking the entire namespace as an error + $this->getNamespaceErrorAttributes($stmt) )); // Treat like semicolon style for namespace normalization return 'semicolon'; @@ -596,82 +696,14 @@ abstract class ParserAbstract implements Parser return $style; } - /** - * Fix up parsing of static property calls in PHP 5. - * - * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is - * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the - * latter as the former initially and this method fixes the AST into the correct form when we - * encounter the "()". - * - * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop - * @param Node\Arg[] $args - * @param array $attributes - * - * @return Expr\StaticCall - */ - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { - if ($prop instanceof Node\Expr\StaticPropertyFetch) { - $name = $prop->name instanceof VarLikeIdentifier - ? $prop->name->toString() : $prop->name; - $var = new Expr\Variable($name, $prop->name->getAttributes()); - return new Expr\StaticCall($prop->class, $var, $args, $attributes); - } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { - $tmp = $prop; - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - } - - /** @var Expr\StaticPropertyFetch $staticProp */ - $staticProp = $tmp->var; - - // Set start attributes to attributes of innermost node - $tmp = $prop; - $this->fixupStartAttributes($tmp, $staticProp->name); - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - $this->fixupStartAttributes($tmp, $staticProp->name); - } - - $name = $staticProp->name instanceof VarLikeIdentifier - ? $staticProp->name->toString() : $staticProp->name; - $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); - return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); - } else { - throw new \Exception; - } - } - - protected function fixupStartAttributes(Node $to, Node $from) { - $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; - foreach ($startAttributes as $startAttribute) { - if ($from->hasAttribute($startAttribute)) { - $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); - } - } - } - + /** @return Name|Identifier */ protected function handleBuiltinTypes(Name $name) { - $builtinTypes = [ - 'bool' => true, - 'int' => true, - 'float' => true, - 'string' => true, - 'iterable' => true, - 'void' => true, - 'object' => true, - 'null' => true, - 'false' => true, - 'mixed' => true, - 'never' => true, - ]; - if (!$name->isUnqualified()) { return $name; } $lowerName = $name->toLowerString(); - if (!isset($builtinTypes[$lowerName])) { + if (!$this->phpVersion->supportsBuiltinType($lowerName)) { return $name; } @@ -681,16 +713,15 @@ abstract class ParserAbstract implements Parser /** * Get combined start and end attributes at a stack location * - * @param int $pos Stack location + * @param int $stackPos Stack location * - * @return array Combined start and end attributes + * @return array Combined start and end attributes */ - protected function getAttributesAt(int $pos) : array { - return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; + protected function getAttributesAt(int $stackPos): array { + return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); } - protected function getFloatCastKind(string $cast): int - { + protected function getFloatCastKind(string $cast): int { $cast = strtolower($cast); if (strpos($cast, 'float') !== false) { return Double::KIND_FLOAT; @@ -703,23 +734,24 @@ abstract class ParserAbstract implements Parser return Double::KIND_DOUBLE; } - protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { + /** @param array $attributes */ + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { try { - return LNumber::fromString($str, $attributes, $allowInvalidOctal); + return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { $this->emitError($error); // Use dummy value - return new LNumber(0, $attributes); + return new Int_(0, $attributes); } } /** * Parse a T_NUM_STRING token into either an integer or string node. * - * @param string $str Number string - * @param array $attributes Attributes + * @param string $str Number string + * @param array $attributes Attributes * - * @return LNumber|String_ Integer or string node. + * @return Int_|String_ Integer or string node. */ protected function parseNumString(string $str, array $attributes) { if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { @@ -731,13 +763,14 @@ abstract class ParserAbstract implements Parser return new String_($str, $attributes); } - return new LNumber($num, $attributes); + return new Int_($num, $attributes); } + /** @param array $attributes */ protected function stripIndentation( string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ) { + ): string { if ($indentLen === 0) { return $string; } @@ -766,10 +799,15 @@ abstract class ParserAbstract implements Parser ); } + /** + * @param string|(Expr|InterpolatedStringPart)[] $contents + * @param array $attributes + * @param array $endTokenAttributes + */ protected function parseDocString( string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ) { + ): Expr { $kind = strpos($startToken, "'") === false ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; @@ -803,6 +841,7 @@ abstract class ParserAbstract implements Parser if (\is_string($contents)) { if ($contents === '') { + $attributes['rawValue'] = $contents; return new String_('', $attributes); } @@ -810,6 +849,7 @@ abstract class ParserAbstract implements Parser $contents, $indentLen, $indentChar, true, true, $attributes ); $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); + $attributes['rawValue'] = $contents; if ($kind === String_::KIND_HEREDOC) { $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); @@ -818,7 +858,7 @@ abstract class ParserAbstract implements Parser return new String_($contents, $attributes); } else { assert(count($contents) > 0); - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { + if (!$contents[0] instanceof Node\InterpolatedStringPart) { // If there is no leading encapsed string part, pretend there is an empty one $this->stripIndentation( '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() @@ -827,65 +867,175 @@ abstract class ParserAbstract implements Parser $newContents = []; foreach ($contents as $i => $part) { - if ($part instanceof Node\Scalar\EncapsedStringPart) { + if ($part instanceof Node\InterpolatedStringPart) { $isLast = $i === \count($contents) - 1; $part->value = $this->stripIndentation( $part->value, $indentLen, $indentChar, $i === 0, $isLast, $part->getAttributes() ); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ($isLast) { $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); } + $part->setAttribute('rawValue', $part->value); + $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ('' === $part->value) { continue; } } $newContents[] = $part; } - return new Encapsed($newContents, $attributes); + return new InterpolatedString($newContents, $attributes); } } + protected function createCommentFromToken(Token $token, int $tokenPos): Comment { + assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); + return \T_DOC_COMMENT === $token->id + ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) + : new Comment($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + } + /** - * Create attributes for a zero-length common-capturing nop. - * - * @param Comment[] $comments - * @return array + * Get last comment before the given token position, if any */ - protected function createCommentNopAttributes(array $comments) { - $comment = $comments[count($comments) - 1]; + protected function getCommentBeforeToken(int $tokenPos): ?Comment { + while (--$tokenPos >= 0) { + $token = $this->tokens[$tokenPos]; + if (!isset($this->dropTokens[$token->id])) { + break; + } + + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + return $this->createCommentFromToken($token, $tokenPos); + } + } + return null; + } + + /** + * Create a zero-length nop to capture preceding comments, if any. + */ + protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { + $comment = $this->getCommentBeforeToken($tokenPos); + if ($comment === null) { + return null; + } + $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); $commentEndTokenPos = $comment->getEndTokenPos(); - - $attributes = ['comments' => $comments]; - if (-1 !== $commentEndLine) { - $attributes['startLine'] = $commentEndLine; - $attributes['endLine'] = $commentEndLine; - } - if (-1 !== $commentEndFilePos) { - $attributes['startFilePos'] = $commentEndFilePos + 1; - $attributes['endFilePos'] = $commentEndFilePos; - } - if (-1 !== $commentEndTokenPos) { - $attributes['startTokenPos'] = $commentEndTokenPos + 1; - $attributes['endTokenPos'] = $commentEndTokenPos; - } - return $attributes; + $attributes = [ + 'startLine' => $commentEndLine, + 'endLine' => $commentEndLine, + 'startFilePos' => $commentEndFilePos + 1, + 'endFilePos' => $commentEndFilePos, + 'startTokenPos' => $commentEndTokenPos + 1, + 'endTokenPos' => $commentEndTokenPos, + ]; + return new Nop($attributes); } - protected function checkModifier($a, $b, $modifierPos) { - // Jumping through some hoops here because verifyModifier() is also used elsewhere + protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { + if ($this->getCommentBeforeToken($tokenStartPos) === null) { + return null; + } + return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); + } + + protected function handleHaltCompiler(): string { + // Prevent the lexer from returning any further tokens. + $nextToken = $this->tokens[$this->tokenPos + 1]; + $this->tokenPos = \count($this->tokens) - 2; + + // Return text after __halt_compiler. + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; + } + + protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { + $tokenPos = $this->tokenStartStack[$stackPos]; + $token = $this->tokens[$tokenPos]; + assert($token->id == \T_INLINE_HTML); + if ($tokenPos > 0) { + $prevToken = $this->tokens[$tokenPos - 1]; + assert($prevToken->id == \T_CLOSE_TAG); + return false !== strpos($prevToken->text, "\n") + || false !== strpos($prevToken->text, "\r"); + } + return true; + } + + /** + * @return array + */ + protected function createEmptyElemAttributes(int $tokenPos): array { + return $this->getAttributesForToken($tokenPos); + } + + protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { + $this->createdArrays->detach($node); + return new Expr\List_(array_map(function (Node\ArrayItem $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + return null; + } + if ($item->value instanceof Array_) { + return new Node\ArrayItem( + $this->fixupArrayDestructuring($item->value), + $item->key, $item->byRef, $item->getAttributes()); + } + return $item; + }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); + } + + protected function postprocessList(Expr\List_ $node): void { + foreach ($node->items as $i => $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + $node->items[$i] = null; + } + } + } + + /** @param ElseIf_|Else_ $node */ + protected function fixupAlternativeElse($node): void { + // Make sure a trailing nop statement carrying comments is part of the node. + $numStmts = \count($node->stmts); + if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { + $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); + if (isset($nopAttrs['endLine'])) { + $node->setAttribute('endLine', $nopAttrs['endLine']); + } + if (isset($nopAttrs['endFilePos'])) { + $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); + } + if (isset($nopAttrs['endTokenPos'])) { + $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); + } + } + } + + protected function checkClassModifier(int $a, int $b, int $modifierPos): void { try { - Class_::verifyModifier($a, $b); + Modifiers::verifyClassModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); } } - protected function checkParam(Param $node) { + protected function checkModifier(int $a, int $b, int $modifierPos): void { + // Jumping through some hoops here because verifyModifier() is also used elsewhere + try { + Modifiers::verifyModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + + protected function checkParam(Param $node): void { if ($node->variadic && null !== $node->default) { $this->emitError(new Error( 'Variadic parameter cannot have a default value', @@ -894,7 +1044,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkTryCatch(TryCatch $node) { + protected function checkTryCatch(TryCatch $node): void { if (empty($node->catches) && null === $node->finally) { $this->emitError(new Error( 'Cannot use try without catch or finally', $node->getAttributes() @@ -902,7 +1052,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkNamespace(Namespace_ $node) { + protected function checkNamespace(Namespace_ $node): void { if (null !== $node->stmts) { foreach ($node->stmts as $stmt) { if ($stmt instanceof Namespace_) { @@ -914,7 +1064,7 @@ abstract class ParserAbstract implements Parser } } - private function checkClassName($name, $namePos) { + private function checkClassName(?Identifier $name, int $namePos): void { if (null !== $name && $name->isSpecialClassName()) { $this->emitError(new Error( sprintf('Cannot use \'%s\' as class name as it is reserved', $name), @@ -923,7 +1073,8 @@ abstract class ParserAbstract implements Parser } } - private function checkImplementedInterfaces(array $interfaces) { + /** @param Name[] $interfaces */ + private function checkImplementedInterfaces(array $interfaces): void { foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { $this->emitError(new Error( @@ -934,7 +1085,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkClass(Class_ $node, $namePos) { + protected function checkClass(Class_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); if ($node->extends && $node->extends->isSpecialClassName()) { @@ -947,18 +1098,18 @@ abstract class ParserAbstract implements Parser $this->checkImplementedInterfaces($node->implements); } - protected function checkInterface(Interface_ $node, $namePos) { + protected function checkInterface(Interface_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - protected function checkEnum(Enum_ $node, $namePos) { + protected function checkEnum(Enum_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - protected function checkClassMethod(ClassMethod $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { + if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': $this->emitError(new Error( @@ -978,44 +1129,44 @@ abstract class ParserAbstract implements Parser } } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos))); } } - protected function checkClassConst(ClassConst $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + protected function checkClassConst(ClassConst $node, int $modifierPos): void { + if ($node->flags & Modifiers::STATIC) { $this->emitError(new Error( "Cannot use 'static' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error( "Cannot use 'abstract' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( "Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos))); } } - protected function checkProperty(Property $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + protected function checkProperty(Property $node, int $modifierPos): void { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_FINAL) { + if ($node->flags & Modifiers::FINAL) { $this->emitError(new Error('Properties cannot be declared final', $this->getAttributesAt($modifierPos))); } } - protected function checkUseUse(UseUse $node, $namePos) { + protected function checkUseUse(UseItem $node, int $namePos): void { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( sprintf( @@ -1026,4 +1177,65 @@ abstract class ParserAbstract implements Parser )); } } + + /** + * Creates the token map. + * + * The token map maps the PHP internal token identifiers + * to the identifiers used by the Parser. Additionally it + * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. + * + * @return array The token map + */ + protected function createTokenMap(): array { + $tokenMap = []; + + for ($i = 0; $i < 1000; ++$i) { + if ($i < 256) { + // Single-char tokens use an identity mapping. + $tokenMap[$i] = $i; + } elseif (\T_DOUBLE_COLON === $i) { + // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM + $tokenMap[$i] = static::T_PAAMAYIM_NEKUDOTAYIM; + } elseif (\T_OPEN_TAG_WITH_ECHO === $i) { + // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO + $tokenMap[$i] = static::T_ECHO; + } elseif (\T_CLOSE_TAG === $i) { + // T_CLOSE_TAG is equivalent to ';' + $tokenMap[$i] = ord(';'); + } elseif ('UNKNOWN' !== $name = token_name($i)) { + if (defined($name = static::class . '::' . $name)) { + // Other tokens can be mapped directly + $tokenMap[$i] = constant($name); + } + } + } + + // Assign tokens for which we define compatibility constants, as token_name() does not know them. + $tokenMap[\T_FN] = static::T_FN; + $tokenMap[\T_COALESCE_EQUAL] = static::T_COALESCE_EQUAL; + $tokenMap[\T_NAME_QUALIFIED] = static::T_NAME_QUALIFIED; + $tokenMap[\T_NAME_FULLY_QUALIFIED] = static::T_NAME_FULLY_QUALIFIED; + $tokenMap[\T_NAME_RELATIVE] = static::T_NAME_RELATIVE; + $tokenMap[\T_MATCH] = static::T_MATCH; + $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = static::T_NULLSAFE_OBJECT_OPERATOR; + $tokenMap[\T_ATTRIBUTE] = static::T_ATTRIBUTE; + $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_ENUM] = static::T_ENUM; + $tokenMap[\T_READONLY] = static::T_READONLY; + + // We have create a map from PHP token IDs to external symbol IDs. + // Now map them to the internal symbol ID. + $fullTokenMap = []; + foreach ($tokenMap as $phpToken => $extSymbol) { + $intSymbol = $this->tokenToSymbol[$extSymbol]; + if ($intSymbol === $this->invalidSymbol) { + continue; + } + $fullTokenMap[$phpToken] = $intSymbol; + } + + return $fullTokenMap; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php index f041e7ff..3a7586ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php @@ -2,43 +2,41 @@ namespace PhpParser; -class ParserFactory -{ - const PREFER_PHP7 = 1; - const PREFER_PHP5 = 2; - const ONLY_PHP7 = 3; - const ONLY_PHP5 = 4; +use PhpParser\Parser\Php7; +use PhpParser\Parser\Php8; + +class ParserFactory { + /** + * Create a parser targeting the given version on a best-effort basis. The parser will generally + * accept code for the newest supported version, but will try to accommodate code that becomes + * invalid in newer versions or changes in interpretation. + */ + public function createForVersion(PhpVersion $version): Parser { + if ($version->isHostVersion()) { + $lexer = new Lexer(); + } else { + $lexer = new Lexer\Emulative($version); + } + if ($version->id >= 80000) { + return new Php8($lexer, $version); + } + return new Php7($lexer, $version); + } /** - * Creates a Parser instance, according to the provided kind. - * - * @param int $kind One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5 - * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified - * @param array $parserOptions Parser options. See ParserAbstract::__construct() argument - * - * @return Parser The parser instance + * Create a parser targeting the newest version supported by this library. Code for older + * versions will be accepted if there have been no relevant backwards-compatibility breaks in + * PHP. */ - public function create(int $kind, Lexer $lexer = null, array $parserOptions = []) : Parser { - if (null === $lexer) { - $lexer = new Lexer\Emulative(); - } - switch ($kind) { - case self::PREFER_PHP7: - return new Parser\Multiple([ - new Parser\Php7($lexer, $parserOptions), new Parser\Php5($lexer, $parserOptions) - ]); - case self::PREFER_PHP5: - return new Parser\Multiple([ - new Parser\Php5($lexer, $parserOptions), new Parser\Php7($lexer, $parserOptions) - ]); - case self::ONLY_PHP7: - return new Parser\Php7($lexer, $parserOptions); - case self::ONLY_PHP5: - return new Parser\Php5($lexer, $parserOptions); - default: - throw new \LogicException( - 'Kind must be one of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5' - ); - } + public function createForNewestSupportedVersion(): Parser { + return $this->createForVersion(PhpVersion::getNewestSupported()); + } + + /** + * Create a parser targeting the host PHP version, that is the PHP version we're currently + * running on. This parser will not use any token emulation. + */ + public function createForHostVersion(): Parser { + return $this->createForVersion(PhpVersion::getHostVersion()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index bb70de65..6a0349c7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -13,11 +13,10 @@ use PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Stmt; use PhpParser\PrettyPrinterAbstract; -class Standard extends PrettyPrinterAbstract -{ +class Standard extends PrettyPrinterAbstract { // Special nodes - protected function pParam(Node\Param $node) { + protected function pParam(Node\Param $node): string { return $this->pAttrGroups($node->attrGroups, true) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') @@ -27,160 +26,180 @@ class Standard extends PrettyPrinterAbstract . ($node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pArg(Node\Arg $node) { + protected function pArg(Node\Arg $node): string { return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) { + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { return '...'; } - protected function pConst(Node\Const_ $node) { + protected function pConst(Node\Const_ $node): string { return $node->name . ' = ' . $this->p($node->value); } - protected function pNullableType(Node\NullableType $node) { + protected function pNullableType(Node\NullableType $node): string { return '?' . $this->p($node->type); } - protected function pUnionType(Node\UnionType $node) { - return $this->pImplode($node->types, '|'); + protected function pUnionType(Node\UnionType $node): string { + $types = []; + foreach ($node->types as $typeNode) { + if ($typeNode instanceof Node\IntersectionType) { + $types[] = '('. $this->p($typeNode) . ')'; + continue; + } + $types[] = $this->p($typeNode); + } + return implode('|', $types); } - protected function pIntersectionType(Node\IntersectionType $node) { + protected function pIntersectionType(Node\IntersectionType $node): string { return $this->pImplode($node->types, '&'); } - protected function pIdentifier(Node\Identifier $node) { + protected function pIdentifier(Node\Identifier $node): string { return $node->name; } - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) { + protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { return '$' . $node->name; } - protected function pAttribute(Node\Attribute $node) { + protected function pAttribute(Node\Attribute $node): string { return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); } - protected function pAttributeGroup(Node\AttributeGroup $node) { + protected function pAttributeGroup(Node\AttributeGroup $node): string { return '#[' . $this->pCommaSeparated($node->attrs) . ']'; } // Names - protected function pName(Name $node) { - return implode('\\', $node->parts); + protected function pName(Name $node): string { + return $node->name; } - protected function pName_FullyQualified(Name\FullyQualified $node) { - return '\\' . implode('\\', $node->parts); + protected function pName_FullyQualified(Name\FullyQualified $node): string { + return '\\' . $node->name; } - protected function pName_Relative(Name\Relative $node) { - return 'namespace\\' . implode('\\', $node->parts); + protected function pName_Relative(Name\Relative $node): string { + return 'namespace\\' . $node->name; } // Magic Constants - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) { + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { return '__CLASS__'; } - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) { + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { return '__DIR__'; } - protected function pScalar_MagicConst_File(MagicConst\File $node) { + protected function pScalar_MagicConst_File(MagicConst\File $node): string { return '__FILE__'; } - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) { + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { return '__FUNCTION__'; } - protected function pScalar_MagicConst_Line(MagicConst\Line $node) { + protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { return '__LINE__'; } - protected function pScalar_MagicConst_Method(MagicConst\Method $node) { + protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { return '__METHOD__'; } - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) { + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { return '__NAMESPACE__'; } - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) { + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { return '__TRAIT__'; } // Scalars - protected function pScalar_String(Scalar\String_ $node) { + private function indentString(string $str): string { + return str_replace("\n", $this->nl, $str); + } + + protected function pScalar_String(Scalar\String_ $node): string { $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); switch ($kind) { case Scalar\String_::KIND_NOWDOC: $label = $node->getAttribute('docLabel'); if ($label && !$this->containsEndLabel($node->value, $label)) { + $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); + $nl = $shouldIdent ? $this->nl : $this->newline; if ($node->value === '') { - return "<<<'$label'\n$label" . $this->docStringEndToken; + return "<<<'$label'$nl$label{$this->docStringEndToken}"; } - return "<<<'$label'\n$node->value\n$label" - . $this->docStringEndToken; + // Make sure trailing \r is not combined with following \n into CRLF. + if ($node->value[strlen($node->value) - 1] !== "\r") { + $value = $shouldIdent ? $this->indentString($node->value) : $node->value; + return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; + } } /* break missing intentionally */ + // no break case Scalar\String_::KIND_SINGLE_QUOTED: return $this->pSingleQuotedString($node->value); case Scalar\String_::KIND_HEREDOC: $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - if ($node->value === '') { - return "<<<$label\n$label" . $this->docStringEndToken; + $escaped = $this->escapeString($node->value, null); + if ($label && !$this->containsEndLabel($escaped, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; + if ($escaped === '') { + return "<<<$label$nl$label{$this->docStringEndToken}"; } - $escaped = $this->escapeString($node->value, null); - return "<<<$label\n" . $escaped . "\n$label" - . $this->docStringEndToken; + return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; } - /* break missing intentionally */ + /* break missing intentionally */ + // no break case Scalar\String_::KIND_DOUBLE_QUOTED: return '"' . $this->escapeString($node->value, '"') . '"'; } throw new \Exception('Invalid string kind'); } - protected function pScalar_Encapsed(Scalar\Encapsed $node) { + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; if (count($node->parts) === 1 - && $node->parts[0] instanceof Scalar\EncapsedStringPart + && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { - return "<<<$label\n$label" . $this->docStringEndToken; + return "<<<$label$nl$label{$this->docStringEndToken}"; } - return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label" - . $this->docStringEndToken; + return "<<<$label$nl" . $this->pEncapsList($node->parts, null) + . "$nl$label{$this->docStringEndToken}"; } } return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - protected function pScalar_LNumber(Scalar\LNumber $node) { - if ($node->value === -\PHP_INT_MAX-1) { + protected function pScalar_Int(Scalar\Int_ $node): string { + if ($node->value === -\PHP_INT_MAX - 1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal return '(-' . \PHP_INT_MAX . '-1)'; } - $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); - if (Scalar\LNumber::KIND_DEC === $kind) { + $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); + if (Scalar\Int_::KIND_DEC === $kind) { return (string) $node->value; } @@ -192,22 +211,23 @@ class Standard extends PrettyPrinterAbstract $str = (string) $node->value; } switch ($kind) { - case Scalar\LNumber::KIND_BIN: + case Scalar\Int_::KIND_BIN: return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\LNumber::KIND_OCT: + case Scalar\Int_::KIND_OCT: return $sign . '0' . base_convert($str, 10, 8); - case Scalar\LNumber::KIND_HEX: + case Scalar\Int_::KIND_HEX: return $sign . '0x' . base_convert($str, 10, 16); } throw new \Exception('Invalid number kind'); } - protected function pScalar_DNumber(Scalar\DNumber $node) { + protected function pScalar_Float(Scalar\Float_ $node): string { if (!is_finite($node->value)) { if ($node->value === \INF) { - return '\INF'; - } elseif ($node->value === -\INF) { - return '-\INF'; + return '1.0E+1000'; + } + if ($node->value === -\INF) { + return '-1.0E+1000'; } else { return '\NAN'; } @@ -215,7 +235,7 @@ class Standard extends PrettyPrinterAbstract // Try to find a short full-precision representation $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (double) $stringValue) { + if ($node->value !== (float) $stringValue) { $stringValue = sprintf('%.17G', $node->value); } @@ -228,300 +248,289 @@ class Standard extends PrettyPrinterAbstract return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { - throw new \LogicException('Cannot directly print EncapsedStringPart'); - } - // Assignments - protected function pExpr_Assign(Expr\Assign $node) { - return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr); + protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignRef(Expr\AssignRef $node) { - return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr); + protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { - return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr); + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { - return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr); + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { - return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr); + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Div(AssignOp\Div $node) { - return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr); + protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { - return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr); + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { - return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr); + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { - return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr); + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { - return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr); + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { - return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr); + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { - return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr); + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { - return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr); + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { - return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { - return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); } // Binary expressions - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right); + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right); + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right); + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right); + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right); + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right); + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right); + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right); + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right); + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right); + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right); + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_Instanceof(Expr\Instanceof_ $node) { - list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; - return $this->pPrec($node->expr, $precedence, $associativity, -1) - . ' instanceof ' - . $this->pNewVariable($node->class); + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPostfixOp( + Expr\Instanceof_::class, $node->expr, + ' instanceof ' . $this->pNewOperand($node->class), + $precedence, $lhsPrecedence); } // Unary expressions - protected function pExpr_BooleanNot(Expr\BooleanNot $node) { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr); + protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr); + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { - if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { - // Enforce -(-$expr) instead of --$expr - return '-(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr); + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { - if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { - // Enforce +(+$expr) instead of ++$expr - return '+(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr); + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_PreInc(Expr\PreInc $node) { - return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var); + protected function pExpr_PreInc(Expr\PreInc $node): string { + return '++' . $this->p($node->var); } - protected function pExpr_PreDec(Expr\PreDec $node) { - return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var); + protected function pExpr_PreDec(Expr\PreDec $node): string { + return '--' . $this->p($node->var); } - protected function pExpr_PostInc(Expr\PostInc $node) { - return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++'); + protected function pExpr_PostInc(Expr\PostInc $node): string { + return $this->p($node->var) . '++'; } - protected function pExpr_PostDec(Expr\PostDec $node) { - return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--'); + protected function pExpr_PostDec(Expr\PostDec $node): string { + return $this->p($node->var) . '--'; } - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr); + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_YieldFrom(Expr\YieldFrom $node) { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr); + protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Print(Expr\Print_ $node) { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr); + protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); } // Casts - protected function pExpr_Cast_Int(Cast\Int_ $node) { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr); + protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Double(Cast\Double $node) { + protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); if ($kind === Cast\Double::KIND_DOUBLE) { $cast = '(double)'; } elseif ($kind === Cast\Double::KIND_FLOAT) { $cast = '(float)'; - } elseif ($kind === Cast\Double::KIND_REAL) { + } else { + assert($kind === Cast\Double::KIND_REAL); $cast = '(real)'; } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_String(Cast\String_ $node) { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr); + protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Array(Cast\Array_ $node) { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr); + protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Object(Cast\Object_ $node) { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr); + protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Bool(Cast\Bool_ $node) { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr); + protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Unset(Cast\Unset_ $node) { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr); + protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); } // Function calls and similar constructs - protected function pExpr_FuncCall(Expr\FuncCall $node) { + protected function pExpr_FuncCall(Expr\FuncCall $node): string { return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_MethodCall(Expr\MethodCall $node) { + protected function pExpr_MethodCall(Expr\MethodCall $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) { + protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_StaticCall(Expr\StaticCall $node) { - return $this->pDereferenceLhs($node->class) . '::' + protected function pExpr_StaticCall(Expr\StaticCall $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? ($node->name instanceof Expr\Variable ? $this->p($node->name) @@ -530,19 +539,19 @@ class Standard extends PrettyPrinterAbstract . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Empty(Expr\Empty_ $node) { + protected function pExpr_Empty(Expr\Empty_ $node): string { return 'empty(' . $this->p($node->expr) . ')'; } - protected function pExpr_Isset(Expr\Isset_ $node) { + protected function pExpr_Isset(Expr\Isset_ $node): string { return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; } - protected function pExpr_Eval(Expr\Eval_ $node) { + protected function pExpr_Eval(Expr\Eval_ $node): string { return 'eval(' . $this->p($node->expr) . ')'; } - protected function pExpr_Include(Expr\Include_ $node) { + protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { static $map = [ Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', @@ -550,20 +559,26 @@ class Standard extends PrettyPrinterAbstract Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', ]; - return $map[$node->type] . ' ' . $this->p($node->expr); + return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_List(Expr\List_ $node) { - return 'list(' . $this->pCommaSeparated($node->items) . ')'; + protected function pExpr_List(Expr\List_ $node): string { + $syntax = $node->getAttribute('kind', + $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); + if ($syntax === Expr\List_::KIND_ARRAY) { + return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + } else { + return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; + } } // Other - protected function pExpr_Error(Expr\Error $node) { + protected function pExpr_Error(Expr\Error $node): string { throw new \LogicException('Cannot pretty-print AST with Error nodes'); } - protected function pExpr_Variable(Expr\Variable $node) { + protected function pExpr_Variable(Expr\Variable $node): string { if ($node->name instanceof Expr) { return '${' . $this->p($node->name) . '}'; } else { @@ -571,9 +586,9 @@ class Standard extends PrettyPrinterAbstract } } - protected function pExpr_Array(Expr\Array_ $node) { + protected function pExpr_Array(Expr\Array_ $node): string { $syntax = $node->getAttribute('kind', - $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); if ($syntax === Expr\Array_::KIND_SHORT) { return '[' . $this->pMaybeMultiline($node->items, true) . ']'; } else { @@ -581,124 +596,152 @@ class Standard extends PrettyPrinterAbstract } } - protected function pExpr_ArrayItem(Expr\ArrayItem $node) { - return (null !== $node->key ? $this->p($node->key) . ' => ' : '') + protected function pKey(?Node $node): string { + if ($node === null) { + return ''; + } + + // => is not really an operator and does not typically participate in precedence resolution. + // However, there is an exception if yield expressions with keys are involved: + // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that + // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS + // precedence to that of yield (which will also print unnecessary parentheses for rare low + // precedence unary operators like include). + $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; + } + + protected function pArrayItem(Node\ArrayItem $node): string { + return $this->pKey($node->key) . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; } - protected function pExpr_ConstFetch(Expr\ConstFetch $node) { + protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { return $this->p($node->name); } - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) { - return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name); + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); } - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) { + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); } - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) { + protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); } - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) { - return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { + return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } - protected function pExpr_ShellExec(Expr\ShellExec $node) { + protected function pExpr_ShellExec(Expr\ShellExec $node): string { return '`' . $this->pEncapsList($node->parts, '`') . '`'; } - protected function pExpr_Closure(Expr\Closure $node) { + protected function pExpr_Closure(Expr\Closure $node): string { return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' - . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pExpr_Match(Expr\Match_ $node) { + protected function pExpr_Match(Expr\Match_ $node): string { return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, true) . $this->nl . '}'; } - protected function pMatchArm(Node\MatchArm $node) { - return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') - . ' => ' . $this->p($node->body); + protected function pMatchArm(Node\MatchArm $node): string { + $result = ''; + if ($node->conds) { + for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { + $result .= $this->p($node->conds[$i]) . ', '; + } + $result .= $this->pKey($node->conds[$i]); + } else { + $result = 'default => '; + } + return $result . $this->p($node->body); } - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { - return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp( + Expr\ArrowFunction::class, + $this->pAttrGroups($node->attrGroups, true) + . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ' - . $this->p($node->expr); + . ' => ', + $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_ClosureUse(Expr\ClosureUse $node) { + protected function pClosureUse(Node\ClosureUse $node): string { return ($node->byRef ? '&' : '') . $this->p($node->var); } - protected function pExpr_New(Expr\New_ $node) { + protected function pExpr_New(Expr\New_ $node): string { if ($node->class instanceof Stmt\Class_) { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; return 'new ' . $this->pClassCommon($node->class, $args); } - return 'new ' . $this->pNewVariable($node->class) + return 'new ' . $this->pNewOperand($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Clone(Expr\Clone_ $node) { - return 'clone ' . $this->p($node->expr); + protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Ternary(Expr\Ternary $node) { + protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. // this is okay because the part between ? and : never needs parentheses. return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else + $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, + $precedence, $lhsPrecedence ); } - protected function pExpr_Exit(Expr\Exit_ $node) { + protected function pExpr_Exit(Expr\Exit_ $node): string { $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } - protected function pExpr_Throw(Expr\Throw_ $node) { - return 'throw ' . $this->p($node->expr); + protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Yield(Expr\Yield_ $node) { + protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { if ($node->value === null) { - return 'yield'; + $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; } else { - // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary - return '(yield ' - . ($node->key !== null ? $this->p($node->key) . ' => ' : '') - . $this->p($node->value) - . ')'; + if (!$this->phpVersion->supportsYieldWithoutParentheses()) { + return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; + } + return $this->pPrefixOp( + Expr\Yield_::class, 'yield ' . $this->pKey($node->key), + $node->value, $precedence, $lhsPrecedence); } } // Declarations - protected function pStmt_Namespace(Stmt\Namespace_ $node) { + protected function pStmt_Namespace(Stmt\Namespace_ $node): string { if ($this->canUseSemicolonNamespaces) { return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, false); @@ -708,147 +751,153 @@ class Standard extends PrettyPrinterAbstract } } - protected function pStmt_Use(Stmt\Use_ $node) { + protected function pStmt_Use(Stmt\Use_ $node): string { return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';'; } - protected function pStmt_GroupUse(Stmt\GroupUse $node) { + protected function pStmt_GroupUse(Stmt\GroupUse $node): string { return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\{' . $this->pCommaSeparated($node->uses) . '};'; } - protected function pStmt_UseUse(Stmt\UseUse $node) { + protected function pUseItem(Node\UseItem $node): string { return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } - protected function pUseType($type) { + protected function pUseType(int $type): string { return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } - protected function pStmt_Interface(Stmt\Interface_ $node) { + protected function pStmt_Interface(Stmt\Interface_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Enum(Stmt\Enum_ $node) { + protected function pStmt_Enum(Stmt\Enum_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name - . ($node->scalarType ? " : $node->scalarType" : '') + . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Class(Stmt\Class_ $node) { + protected function pStmt_Class(Stmt\Class_ $node): string { return $this->pClassCommon($node, ' ' . $node->name); } - protected function pStmt_Trait(Stmt\Trait_ $node) { + protected function pStmt_Trait(Stmt\Trait_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_EnumCase(Stmt\EnumCase $node) { + protected function pStmt_EnumCase(Stmt\EnumCase $node): string { return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_TraitUse(Stmt\TraitUse $node) { + protected function pStmt_TraitUse(Stmt\TraitUse $node): string { return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); } - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) { + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; } - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) { + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') + . (null !== $node->newName ? ' ' . $node->newName : '') . ';'; } - protected function pStmt_Property(Stmt\Property $node) { + protected function pStmt_Property(Stmt\Property $node): string { return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ';'; } - protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { + protected function pPropertyItem(Node\PropertyItem $node): string { return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { + protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_ClassConst(Stmt\ClassConst $node) { + protected function pStmt_ClassConst(Stmt\ClassConst $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) - . 'const ' . $this->pCommaSeparated($node->consts) . ';'; + . 'const ' + . (null !== $node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Function(Stmt\Function_ $node) { + protected function pStmt_Function(Stmt\Function_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pCommaSeparated($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Const(Stmt\Const_ $node) { + protected function pStmt_Const(Stmt\Const_ $node): string { return 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Declare(Stmt\Declare_ $node) { + protected function pStmt_Declare(Stmt\Declare_ $node): string { return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) { + protected function pDeclareItem(Node\DeclareItem $node): string { return $node->key . '=' . $this->p($node->value); } // Control flow - protected function pStmt_If(Stmt\If_ $node) { + protected function pStmt_If(Stmt\If_ $node): string { return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : ''); } - protected function pStmt_ElseIf(Stmt\ElseIf_ $node) { + protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Else(Stmt\Else_ $node) { + protected function pStmt_Else(Stmt\Else_ $node): string { + if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { + // Print as "else if" rather than "else { if }" + return 'else ' . $this->p($node->stmts[0]); + } return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_For(Stmt\For_ $node) { + protected function pStmt_For(Stmt\For_ $node): string { return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') @@ -856,116 +905,116 @@ class Standard extends PrettyPrinterAbstract . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Foreach(Stmt\Foreach_ $node) { + protected function pStmt_Foreach(Stmt\Foreach_ $node): string { return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_While(Stmt\While_ $node) { + protected function pStmt_While(Stmt\While_ $node): string { return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Do(Stmt\Do_ $node) { + protected function pStmt_Do(Stmt\Do_ $node): string { return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');'; } - protected function pStmt_Switch(Stmt\Switch_ $node) { + protected function pStmt_Switch(Stmt\Switch_ $node): string { return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}'; } - protected function pStmt_Case(Stmt\Case_ $node) { + protected function pStmt_Case(Stmt\Case_ $node): string { return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts); } - protected function pStmt_TryCatch(Stmt\TryCatch $node) { + protected function pStmt_TryCatch(Stmt\TryCatch $node): string { return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); } - protected function pStmt_Catch(Stmt\Catch_ $node) { + protected function pStmt_Catch(Stmt\Catch_ $node): string { return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Finally(Stmt\Finally_ $node) { + protected function pStmt_Finally(Stmt\Finally_ $node): string { return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Break(Stmt\Break_ $node) { + protected function pStmt_Break(Stmt\Break_ $node): string { return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Continue(Stmt\Continue_ $node) { + protected function pStmt_Continue(Stmt\Continue_ $node): string { return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Return(Stmt\Return_ $node) { + protected function pStmt_Return(Stmt\Return_ $node): string { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_Throw(Stmt\Throw_ $node) { - return 'throw ' . $this->p($node->expr) . ';'; - } - - protected function pStmt_Label(Stmt\Label $node) { + protected function pStmt_Label(Stmt\Label $node): string { return $node->name . ':'; } - protected function pStmt_Goto(Stmt\Goto_ $node) { + protected function pStmt_Goto(Stmt\Goto_ $node): string { return 'goto ' . $node->name . ';'; } // Other - protected function pStmt_Expression(Stmt\Expression $node) { + protected function pStmt_Expression(Stmt\Expression $node): string { return $this->p($node->expr) . ';'; } - protected function pStmt_Echo(Stmt\Echo_ $node) { + protected function pStmt_Echo(Stmt\Echo_ $node): string { return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; } - protected function pStmt_Static(Stmt\Static_ $node) { + protected function pStmt_Static(Stmt\Static_ $node): string { return 'static ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_Global(Stmt\Global_ $node) { + protected function pStmt_Global(Stmt\Global_ $node): string { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_StaticVar(Stmt\StaticVar $node) { + protected function pStaticVar(Node\StaticVar $node): string { return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_Unset(Stmt\Unset_ $node) { + protected function pStmt_Unset(Stmt\Unset_ $node): string { return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; } - protected function pStmt_InlineHTML(Stmt\InlineHTML $node) { - $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; + protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { + $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; return '?>' . $newline . $node->value . 'remaining; } - protected function pStmt_Nop(Stmt\Nop $node) { + protected function pStmt_Nop(Stmt\Nop $node): string { return ''; } + protected function pStmt_Block(Stmt\Block $node): string { + return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + // Helpers - protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken @@ -974,18 +1023,20 @@ class Standard extends PrettyPrinterAbstract . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pObjectProperty($node) { + protected function pObjectProperty(Node $node): string { if ($node instanceof Expr) { return '{' . $this->p($node) . '}'; } else { - return $node; + assert($node instanceof Node\Identifier); + return $node->name; } } - protected function pEncapsList(array $encapsList, $quote) { + /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ + protected function pEncapsList(array $encapsList, ?string $quote): string { $return = ''; foreach ($encapsList as $element) { - if ($element instanceof Scalar\EncapsedStringPart) { + if ($element instanceof Node\InterpolatedStringPart) { $return .= $this->escapeString($element->value, $quote); } else { $return .= '{' . $this->p($element) . '}'; @@ -995,14 +1046,25 @@ class Standard extends PrettyPrinterAbstract return $return; } - protected function pSingleQuotedString(string $string) { - return '\'' . addcslashes($string, '\'\\') . '\''; + protected function pSingleQuotedString(string $string): string { + // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or + // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to + // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even + // though that would be legal. + $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; + return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } - protected function escapeString($string, $quote) { + protected function escapeString(string $string, ?string $quote): string { if (null === $quote) { // For doc strings, don't escape newlines $escaped = addcslashes($string, "\t\f\v$\\"); + // But do escape isolated \r. Combined with the terminating newline, it might get + // interpreted as \r\n and dropped from the string contents. + $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); + if ($this->phpVersion->supportsFlexibleHeredoc()) { + $escaped = $this->indentString($escaped); + } } else { $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); } @@ -1024,26 +1086,24 @@ class Standard extends PrettyPrinterAbstract | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2) )/x'; - return preg_replace_callback($regex, function ($matches) { + return preg_replace_callback($regex, function ($matches): string { assert(strlen($matches[0]) === 1); - $hex = dechex(ord($matches[0]));; + $hex = dechex(ord($matches[0])); return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); } - protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) { - $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; - $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]'; + protected function containsEndLabel(string $string, string $label, bool $atStart = true): bool { + $start = $atStart ? '(?:^|[\r\n])[ \t]*' : '[\r\n][ \t]*'; return false !== strpos($string, $label) - && preg_match('/' . $start . $label . $end . '/', $string); + && preg_match('/' . $start . $label . '(?:$|[^_A-Za-z0-9\x80-\xff])/', $string); } - protected function encapsedContainsEndLabel(array $parts, $label) { + /** @param (Expr|Node\InterpolatedStringPart)[] $parts */ + protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { - $atStart = $i === 0; - $atEnd = $i === count($parts) - 1; - if ($part instanceof Scalar\EncapsedStringPart - && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) + if ($part instanceof Node\InterpolatedStringPart + && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) ) { return true; } @@ -1051,32 +1111,42 @@ class Standard extends PrettyPrinterAbstract return false; } - protected function pDereferenceLhs(Node $node) { + protected function pDereferenceLhs(Node $node): string { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } - protected function pCallLhs(Node $node) { + protected function pStaticDereferenceLhs(Node $node): string { + if (!$this->staticDereferenceLhsRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + + protected function pCallLhs(Node $node): string { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } - protected function pNewVariable(Node $node) { - // TODO: This is not fully accurate. - return $this->pDereferenceLhs($node); + protected function pNewOperand(Node $node): string { + if (!$this->newOperandRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } } /** * @param Node[] $nodes - * @return bool */ - protected function hasNodeWithComments(array $nodes) { + protected function hasNodeWithComments(array $nodes): bool { foreach ($nodes as $node) { if ($node && $node->getComments()) { return true; @@ -1085,7 +1155,8 @@ class Standard extends PrettyPrinterAbstract return false; } - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) { + /** @param Node[] $nodes */ + protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); } else { @@ -1093,6 +1164,7 @@ class Standard extends PrettyPrinterAbstract } } + /** @param Node\AttributeGroup[] $nodes */ protected function pAttrGroups(array $nodes, bool $inline = false): string { $result = ''; $sep = $inline ? ' ' : $this->nl; diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 2c7fc307..8303c427 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -3,160 +3,200 @@ namespace PhpParser; use PhpParser\Internal\DiffElem; +use PhpParser\Internal\Differ; use PhpParser\Internal\PrintableNewAnonClassNode; use PhpParser\Internal\TokenStream; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr; use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; +use PhpParser\Node\IntersectionType; +use PhpParser\Node\MatchArm; +use PhpParser\Node\Param; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; +use PhpParser\Node\UnionType; -abstract class PrettyPrinterAbstract -{ - const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence - const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence - const FIXUP_CALL_LHS = 2; // LHS of call - const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation - const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing - const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing - const FIXUP_ENCAPSED = 6; // Encapsed string part +abstract class PrettyPrinterAbstract implements PrettyPrinter { + protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence + protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence + protected const FIXUP_PREC_UNARY = 2; // Only operand affected by precedence + protected const FIXUP_CALL_LHS = 3; // LHS of call + protected const FIXUP_DEREF_LHS = 4; // LHS of dereferencing operation + protected const FIXUP_STATIC_DEREF_LHS = 5; // LHS of static dereferencing operation + protected const FIXUP_BRACED_NAME = 6; // Name operand that may require bracing + protected const FIXUP_VAR_BRACED_NAME = 7; // Name operand that may require ${} bracing + protected const FIXUP_ENCAPSED = 8; // Encapsed string part + protected const FIXUP_NEW = 9; // New/instanceof operand - protected $precedenceMap = [ - // [precedence, associativity] - // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right - BinaryOp\Pow::class => [ 0, 1], - Expr\BitwiseNot::class => [ 10, 1], - Expr\PreInc::class => [ 10, 1], - Expr\PreDec::class => [ 10, 1], - Expr\PostInc::class => [ 10, -1], - Expr\PostDec::class => [ 10, -1], - Expr\UnaryPlus::class => [ 10, 1], - Expr\UnaryMinus::class => [ 10, 1], - Cast\Int_::class => [ 10, 1], - Cast\Double::class => [ 10, 1], - Cast\String_::class => [ 10, 1], - Cast\Array_::class => [ 10, 1], - Cast\Object_::class => [ 10, 1], - Cast\Bool_::class => [ 10, 1], - Cast\Unset_::class => [ 10, 1], - Expr\ErrorSuppress::class => [ 10, 1], - Expr\Instanceof_::class => [ 20, 0], - Expr\BooleanNot::class => [ 30, 1], - BinaryOp\Mul::class => [ 40, -1], - BinaryOp\Div::class => [ 40, -1], - BinaryOp\Mod::class => [ 40, -1], - BinaryOp\Plus::class => [ 50, -1], - BinaryOp\Minus::class => [ 50, -1], - BinaryOp\Concat::class => [ 50, -1], - BinaryOp\ShiftLeft::class => [ 60, -1], - BinaryOp\ShiftRight::class => [ 60, -1], - BinaryOp\Smaller::class => [ 70, 0], - BinaryOp\SmallerOrEqual::class => [ 70, 0], - BinaryOp\Greater::class => [ 70, 0], - BinaryOp\GreaterOrEqual::class => [ 70, 0], - BinaryOp\Equal::class => [ 80, 0], - BinaryOp\NotEqual::class => [ 80, 0], - BinaryOp\Identical::class => [ 80, 0], - BinaryOp\NotIdentical::class => [ 80, 0], - BinaryOp\Spaceship::class => [ 80, 0], - BinaryOp\BitwiseAnd::class => [ 90, -1], - BinaryOp\BitwiseXor::class => [100, -1], - BinaryOp\BitwiseOr::class => [110, -1], - BinaryOp\BooleanAnd::class => [120, -1], - BinaryOp\BooleanOr::class => [130, -1], - BinaryOp\Coalesce::class => [140, 1], - Expr\Ternary::class => [150, 0], - // parser uses %left for assignments, but they really behave as %right - Expr\Assign::class => [160, 1], - Expr\AssignRef::class => [160, 1], - AssignOp\Plus::class => [160, 1], - AssignOp\Minus::class => [160, 1], - AssignOp\Mul::class => [160, 1], - AssignOp\Div::class => [160, 1], - AssignOp\Concat::class => [160, 1], - AssignOp\Mod::class => [160, 1], - AssignOp\BitwiseAnd::class => [160, 1], - AssignOp\BitwiseOr::class => [160, 1], - AssignOp\BitwiseXor::class => [160, 1], - AssignOp\ShiftLeft::class => [160, 1], - AssignOp\ShiftRight::class => [160, 1], - AssignOp\Pow::class => [160, 1], - AssignOp\Coalesce::class => [160, 1], - Expr\YieldFrom::class => [165, 1], - Expr\Print_::class => [168, 1], - BinaryOp\LogicalAnd::class => [170, -1], - BinaryOp\LogicalXor::class => [180, -1], - BinaryOp\LogicalOr::class => [190, -1], - Expr\Include_::class => [200, -1], + protected const MAX_PRECEDENCE = 1000; + + /** @var array */ + protected array $precedenceMap = [ + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, -1, -1], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], ]; /** @var int Current indentation level. */ - protected $indentLevel; + protected int $indentLevel; + /** @var string Newline style. Does not include current indentation. */ + protected string $newline; /** @var string Newline including current indentation. */ - protected $nl; - /** @var string Token placed at end of doc string to ensure it is followed by a newline. */ - protected $docStringEndToken; + protected string $nl; + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ + protected ?string $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; - /** @var array Pretty printer options */ - protected $options; + protected bool $canUseSemicolonNamespaces; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected bool $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected PhpVersion $phpVersion; - /** @var TokenStream Original tokens for use in format-preserving pretty print */ - protected $origTokens; - /** @var Internal\Differ Differ for node lists */ - protected $nodeListDiffer; - /** @var bool[] Map determining whether a certain character is a label character */ - protected $labelCharMap; + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ + protected ?TokenStream $origTokens; + /** @var Internal\Differ Differ for node lists */ + protected Differ $nodeListDiffer; + /** @var array Map determining whether a certain character is a label character */ + protected array $labelCharMap; /** - * @var int[][] Map from token classes and subnode names to FIXUP_* constants. This is used - * during format-preserving prints to place additional parens/braces if necessary. + * @var array> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. */ - protected $fixupMap; + protected array $fixupMap; /** - * @var int[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], - * where $l and $r specify the token type that needs to be stripped when removing - * this node. + * @var array Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. */ - protected $removalMap; + protected array $removalMap; /** - * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. + * @var array Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. */ - protected $insertionMap; + protected array $insertionMap; /** - * @var string[] Map From "{$node->getType()}->{$subNode}" to string that should be inserted - * between elements of this list subnode. + * @var array Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. */ - protected $listInsertionMap; - protected $emptyListInsertionMap; - /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers - * should be reprinted. */ - protected $modifierChangeMap; + protected array $listInsertionMap; + + /** + * @var array + */ + protected array $emptyListInsertionMap; + /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] + * where $printFn is the function to print the modifiers and $token is the token before which + * the modifiers should be reprinted. */ + protected array $modifierChangeMap; /** * Creates a pretty printer instance using the given options. * * Supported options: - * * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. * - * @param array $options Dictionary of formatting options + * @param array{ + * phpVersion?: PhpVersion, newline?: string, shortArraySyntax?: bool + * } $options Dictionary of formatting options */ public function __construct(array $options = []) { - $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); - $defaultOptions = ['shortArraySyntax' => false]; - $this->options = $options + $defaultOptions; + $this->newline = $options['newline'] ?? "\n"; + if ($this->newline !== "\n" && $this->newline != "\r\n") { + throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); + } + + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); } /** * Reset pretty printing state. */ - protected function resetState() { + protected function resetState(): void { $this->indentLevel = 0; - $this->nl = "\n"; + $this->nl = $this->newline; $this->origTokens = null; } @@ -165,15 +205,15 @@ abstract class PrettyPrinterAbstract * * @param int $level Level in number of spaces */ - protected function setIndentLevel(int $level) { + protected function setIndentLevel(int $level): void { $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); + $this->nl = $this->newline . \str_repeat(' ', $level); } /** * Increase indentation level. */ - protected function indent() { + protected function indent(): void { $this->indentLevel += 4; $this->nl .= ' '; } @@ -181,10 +221,10 @@ abstract class PrettyPrinterAbstract /** * Decrease indentation level. */ - protected function outdent() { + protected function outdent(): void { assert($this->indentLevel >= 4); $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); + $this->nl = $this->newline . str_repeat(' ', $this->indentLevel); } /** @@ -194,7 +234,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrint(array $stmts) : string { + public function prettyPrint(array $stmts): string { $this->resetState(); $this->preprocessNodes($stmts); @@ -208,7 +248,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed node */ - public function prettyPrintExpr(Expr $node) : string { + public function prettyPrintExpr(Expr $node): string { $this->resetState(); return $this->handleMagicTokens($this->p($node)); } @@ -220,15 +260,15 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrintFile(array $stmts) : string { + public function prettyPrintFile(array $stmts): string { if (!$stmts) { - return "newline . $this->newline; } - $p = "prettyPrint($stmts); + $p = "newline . $this->newline . $this->prettyPrint($stmts); if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p); + $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); } if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { $p = preg_replace('/<\?php$/', '', rtrim($p)); @@ -242,7 +282,7 @@ abstract class PrettyPrinterAbstract * * @param Node[] $nodes Array of nodes */ - protected function preprocessNodes(array $nodes) { + protected function preprocessNodes(array $nodes): void { /* We can use semicolon-namespaces unless there is a global namespace declaration */ $this->canUseSemicolonNamespaces = true; foreach ($nodes as $node) { @@ -254,15 +294,17 @@ abstract class PrettyPrinterAbstract } /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string + * Handles (and removes) doc-string-end tokens. */ - protected function handleMagicTokens(string $str) : string { - // Replace doc-string-end tokens with nothing or a newline - $str = str_replace($this->docStringEndToken . ";\n", ";\n", $str); - $str = str_replace($this->docStringEndToken, "\n", $str); + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // Replace doc-string-end tokens with nothing or a newline + $str = str_replace( + $this->docStringEndToken . ';' . $this->newline, + ';' . $this->newline, + $str); + $str = str_replace($this->docStringEndToken, $this->newline, $str); + } return $str; } @@ -270,12 +312,12 @@ abstract class PrettyPrinterAbstract /** * Pretty prints an array of nodes (statements) and indents them optionally. * - * @param Node[] $nodes Array of nodes - * @param bool $indent Whether to indent the printed nodes + * @param Node[] $nodes Array of nodes + * @param bool $indent Whether to indent the printed nodes * * @return string Pretty printed statements */ - protected function pStmts(array $nodes, bool $indent = true) : string { + protected function pStmts(array $nodes, bool $indent = true): string { if ($indent) { $this->indent(); } @@ -303,84 +345,96 @@ abstract class PrettyPrinterAbstract /** * Pretty-print an infix operation while taking precedence into account. * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed infix operation */ - protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - - return $this->pPrec($leftNode, $precedence, $associativity, -1) - . $operatorString - . $this->pPrec($rightNode, $precedence, $associativity, 1); + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; } /** * Pretty-print a prefix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, Node $node) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; } /** * Pretty-print a postfix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed postfix operation */ - protected function pPostfixOp(string $class, Node $node, string $operatorString) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; - } - - /** - * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. - * - * @param Node $node Node to pretty print - * @param int $parentPrecedence Precedence of the parent operator - * @param int $parentAssociativity Associativity of parent operator - * (-1 is left, 0 is nonassoc, 1 is right) - * @param int $childPosition Position of the node relative to the operator - * (-1 is left, 1 is right) - * - * @return string The pretty printed node - */ - protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string { - $class = \get_class($node); - if (isset($this->precedenceMap[$class])) { - $childPrecedence = $this->precedenceMap[$class][0]; - if ($childPrecedence > $parentPrecedence - || ($parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition) - ) { - return '(' . $this->p($node) . ')'; - } + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; } - - return $this->p($node); + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; } /** * Pretty prints an array of nodes and implodes the printed values. * * @param Node[] $nodes Array of Nodes to be printed - * @param string $glue Character to implode with + * @param string $glue Character to implode with * - * @return string Imploded pretty printed nodes + * @return string Imploded pretty printed nodes> $pre */ - protected function pImplode(array $nodes, string $glue = '') : string { + protected function pImplode(array $nodes, string $glue = ''): string { $pNodes = []; foreach ($nodes as $node) { if (null === $node) { @@ -400,7 +454,7 @@ abstract class PrettyPrinterAbstract * * @return string Comma separated pretty printed nodes */ - protected function pCommaSeparated(array $nodes) : string { + protected function pCommaSeparated(array $nodes): string { return $this->pImplode($nodes, ', '); } @@ -409,12 +463,12 @@ abstract class PrettyPrinterAbstract * * The result includes a leading newline and one level of indentation (same as pStmts). * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma * * @return string Comma separated pretty printed nodes in multiline style */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string { + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { $this->indent(); $result = ''; @@ -446,7 +500,7 @@ abstract class PrettyPrinterAbstract * * @return string Reformatted text of comments */ - protected function pComments(array $comments) : string { + protected function pComments(array $comments): string { $formattedComments = []; foreach ($comments as $comment) { @@ -467,13 +521,11 @@ abstract class PrettyPrinterAbstract * * The CloningVisitor must be run on the AST prior to modification. * * The original tokens must be provided, using the getTokens() method on the lexer. * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param array $origTokens Tokens of the original code - * - * @return string + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string { + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { $this->initializeNodeListDiffer(); $this->initializeLabelCharMap(); $this->initializeFixupMap(); @@ -491,18 +543,18 @@ abstract class PrettyPrinterAbstract $pos = 0; $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0); + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); } else { // Fallback // TODO Add pStmts($stmts, false); + $result = "newline . $this->pStmts($stmts, false); } - return ltrim($this->handleMagicTokens($result)); + return $this->handleMagicTokens($result); } - protected function pFallback(Node $node) { - return $this->{'p' . $node->getType()}($node); + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } /** @@ -511,20 +563,25 @@ abstract class PrettyPrinterAbstract * This method also handles formatting preservation for nodes. * * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * @param bool $parentFormatPreserved Whether parent node has preserved formatting * * @return string Pretty printed node */ - protected function p(Node $node, $parentFormatPreserved = false) : string { + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node); + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } - /** @var Node $origNode */ + /** @var Node|null $origNode */ $origNode = $node->getAttribute('origNode'); if (null === $origNode) { - return $this->pFallback($node); + return $this->pFallback($node, $precedence, $lhsPrecedence); } $class = \get_class($node); @@ -537,15 +594,17 @@ abstract class PrettyPrinterAbstract $fallbackNode = $node; if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); $node = PrintableNewAnonClassNode::fromNewNode($node); $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; } // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting // is not preserved, then we need to use the fallback code to make sure the tags are // printed. if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); @@ -570,34 +629,27 @@ abstract class PrettyPrinterAbstract if (is_array($subNode) && is_array($origSubNode)) { // Array subnode changed, we might be able to reconstruct it $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, $fixupInfo[$subNodeName] ?? null ); if (null === $listResult) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $result .= $listResult; continue; } - if (is_int($subNode) && is_int($origSubNode)) { - // Check if this is a modifier change - $key = $type . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode); - } - - $findToken = $this->modifierChangeMap[$key]; - $result .= $this->pModifiers($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - // If a non-node, non-array subnode changed, we don't be able to do a partial - // reconstructions, as we don't have enough offset information. Pretty print the - // whole node instead. - return $this->pFallback($fallbackNode); + [$printFn, $findToken] = $this->modifierChangeMap[$key]; + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($pos, $findToken); + continue; } $extraLeft = ''; @@ -615,7 +667,7 @@ abstract class PrettyPrinterAbstract // A node has been inserted, check if we have insertion information for it $key = $type . '->' . $subNodeName; if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; @@ -637,7 +689,7 @@ abstract class PrettyPrinterAbstract // A node has been removed, check if we have removal information for it $key = $type . '->' . $subNodeName; if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } // Adjust positions to account for additional tokens that must be skipped @@ -667,7 +719,7 @@ abstract class PrettyPrinterAbstract $fixup = $fixupInfo[$subNodeName]; $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); } else { - $res = $this->p($subNode, true); + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -686,23 +738,23 @@ abstract class PrettyPrinterAbstract /** * Perform a format-preserving pretty print of an array. * - * @param array $nodes New nodes - * @param array $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeType Type of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes * * @return null|string Result of pretty print or null if cannot preserve formatting */ protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeType, string $subNodeName, $fixup - ) { + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup + ): ?string { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - $mapKey = $parentNodeType . '->' . $subNodeName; + $mapKey = $parentNodeClass . '->' . $subNodeName; $insertStr = $this->listInsertionMap[$mapKey] ?? null; $isStmtList = $subNodeName === 'stmts'; @@ -733,9 +785,9 @@ abstract class PrettyPrinterAbstract $result = ''; foreach ($diff as $i => $diffElem) { $diffType = $diffElem->type; - /** @var Node|null $arrItem */ + /** @var Node|string|null $arrItem */ $arrItem = $diffElem->new; - /** @var Node|null $origArrItem */ + /** @var Node|string|null $origArrItem */ $origArrItem = $diffElem->old; if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { @@ -774,8 +826,8 @@ abstract class PrettyPrinterAbstract } if ($skipRemovedNode) { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. $this->setIndentLevel($origIndentLevel); return null; @@ -795,7 +847,7 @@ abstract class PrettyPrinterAbstract } } - $this->safeAppend($result, $this->p($delayedAddNode, true)); + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); if ($insertNewline) { $result .= $insertStr . $this->nl; @@ -824,10 +876,17 @@ abstract class PrettyPrinterAbstract return null; } + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. + // Match always uses multiline formatting. if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments()) + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) ) { $insertStr = ','; $insertNewline = true; @@ -877,8 +936,8 @@ abstract class PrettyPrinterAbstract $pos, $itemStartPos, $indentAdjustment); $skipRemovedNode = true; } else { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. return null; } @@ -893,7 +952,7 @@ abstract class PrettyPrinterAbstract if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); } else { - $res = $this->p($arrItem, true); + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -923,11 +982,14 @@ abstract class PrettyPrinterAbstract foreach ($delayedAdd as $delayedAddNode) { if (!$first) { $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } } - $result .= $this->p($delayedAddNode, true); + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); $first = false; } - $result .= $extraRight; + $result .= $extraRight === "\n" ? $this->nl : $extraRight; } return $result; @@ -940,22 +1002,33 @@ abstract class PrettyPrinterAbstract * are required to preserve program semantics in a certain context (e.g. to maintain precedence * or because only certain expressions are allowed in certain places). * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string { + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { switch ($fixup) { case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; case self::FIXUP_PREC_RIGHT: if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - list($precedence, $associativity) = $this->precedenceMap[$parentClass]; - return $this->pPrec($subNode, $precedence, $associativity, - $fixup === self::FIXUP_PREC_LEFT ? -1 : 1); + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); } break; case self::FIXUP_CALL_LHS: @@ -972,6 +1045,19 @@ abstract class PrettyPrinterAbstract return '(' . $this->p($subNode) . ')'; } break; + case self::FIXUP_STATIC_DEREF_LHS: + if ($this->staticDereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_NEW: + if ($this->newOperandRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + return '(' . $this->p($subNode) . ')'; + } + break; case self::FIXUP_BRACED_NAME: case self::FIXUP_VAR_BRACED_NAME: if ($subNode instanceof Expr @@ -982,7 +1068,7 @@ abstract class PrettyPrinterAbstract } break; case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Scalar\EncapsedStringPart + if (!$subNode instanceof Node\InterpolatedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos) ) { return '{' . $this->p($subNode) . '}'; @@ -1001,11 +1087,8 @@ abstract class PrettyPrinterAbstract * * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append */ - protected function safeAppend(string &$str, string $append) { + protected function safeAppend(string &$str, string $append): void { if ($str === "") { $str = $append; return; @@ -1030,7 +1113,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether parentheses are required */ - protected function callLhsRequiresParens(Node $node) : bool { + protected function callLhsRequiresParens(Node $node): bool { return !($node instanceof Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch @@ -1042,13 +1125,26 @@ abstract class PrettyPrinterAbstract } /** - * Determines whether the LHS of a dereferencing operation must be wrapped in parenthesis. + * Determines whether the LHS of an array/object operation must be wrapped in parentheses. * * @param Node $node LHS of dereferencing operation * * @return bool Whether parentheses are required */ - protected function dereferenceLhsRequiresParens(Node $node) : bool { + protected function dereferenceLhsRequiresParens(Node $node): bool { + // A constant can occur on the LHS of an array/object deref, but not a static deref. + return $this->staticDereferenceLhsRequiresParens($node) + && !$node instanceof Expr\ConstFetch; + } + + /** + * Determines whether the LHS of a static operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function staticDereferenceLhsRequiresParens(Node $node): bool { return !($node instanceof Expr\Variable || $node instanceof Node\Name || $node instanceof Expr\ArrayDimFetch @@ -1061,10 +1157,31 @@ abstract class PrettyPrinterAbstract || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_ || $node instanceof Scalar\String_ - || $node instanceof Expr\ConstFetch || $node instanceof Expr\ClassConstFetch); } + /** + * Determines whether an expression used in "new" or "instanceof" requires parentheses. + * + * @param Node $node New or instanceof operand + * + * @return bool Whether parentheses are required + */ + protected function newOperandRequiresParens(Node $node): bool { + if ($node instanceof Node\Name || $node instanceof Expr\Variable) { + return false; + } + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || + $node instanceof Expr\NullsafePropertyFetch + ) { + return $this->newOperandRequiresParens($node->var); + } + if ($node instanceof Expr\StaticPropertyFetch) { + return $this->newOperandRequiresParens($node->class); + } + return true; + } + /** * Print modifiers, including trailing whitespace. * @@ -1072,14 +1189,18 @@ abstract class PrettyPrinterAbstract * * @return string Printed modifiers */ - protected function pModifiers(int $modifiers) { - return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); + protected function pModifiers(int $modifiers): string { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + } + + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; } /** @@ -1089,7 +1210,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether multiline formatting is used */ - protected function isMultiline(array $nodes) : bool { + protected function isMultiline(array $nodes): bool { if (\count($nodes) < 2) { return false; } @@ -1121,15 +1242,19 @@ abstract class PrettyPrinterAbstract * * The label char map determines whether a certain character may occur in a label. */ - protected function initializeLabelCharMap() { - if ($this->labelCharMap) return; + protected function initializeLabelCharMap(): void { + if (isset($this->labelCharMap)) { + return; + } $this->labelCharMap = []; for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); + $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); + } + + if ($this->phpVersion->allowsDelInIdentifiers()) { + $this->labelCharMap["\x7f"] = true; } } @@ -1138,8 +1263,10 @@ abstract class PrettyPrinterAbstract * * The node list differ is used to determine differences between two array subnodes. */ - protected function initializeNodeListDiffer() { - if ($this->nodeListDiffer) return; + protected function initializeNodeListDiffer(): void { + if (isset($this->nodeListDiffer)) { + return; + } $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { if ($a instanceof Node && $b instanceof Node) { @@ -1156,28 +1283,30 @@ abstract class PrettyPrinterAbstract * The fixup map is used to determine whether a certain subnode of a certain node may require * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ - protected function initializeFixupMap() { - if ($this->fixupMap) return; + protected function initializeFixupMap(): void { + if (isset($this->fixupMap)) { + return; + } $this->fixupMap = [ - Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT], - Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT], Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_LEFT, - 'class' => self::FIXUP_PREC_RIGHT, // TODO: FIXUP_NEW_VARIABLE + 'expr' => self::FIXUP_PREC_UNARY, + 'class' => self::FIXUP_NEW, ], Expr\Ternary::class => [ 'cond' => self::FIXUP_PREC_LEFT, 'else' => self::FIXUP_PREC_RIGHT, ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_DEREF_LHS], + Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\New_::class => ['class' => self::FIXUP_DEREF_LHS], // TODO: FIXUP_NEW_VARIABLE + Expr\ClassConstFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\New_::class => ['class' => self::FIXUP_NEW], Expr\MethodCall::class => [ 'var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME, @@ -1187,7 +1316,7 @@ abstract class PrettyPrinterAbstract 'name' => self::FIXUP_BRACED_NAME, ], Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_DEREF_LHS, + 'class' => self::FIXUP_STATIC_DEREF_LHS, 'name' => self::FIXUP_VAR_BRACED_NAME, ], Expr\PropertyFetch::class => [ @@ -1198,7 +1327,7 @@ abstract class PrettyPrinterAbstract 'var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME, ], - Scalar\Encapsed::class => [ + Scalar\InterpolatedString::class => [ 'parts' => self::FIXUP_ENCAPSED, ], ]; @@ -1221,27 +1350,19 @@ abstract class PrettyPrinterAbstract ]; } - $assignOps = [ - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class - ]; - foreach ($assignOps as $assignOp) { - $this->fixupMap[$assignOp] = [ - 'var' => self::FIXUP_PREC_LEFT, - 'expr' => self::FIXUP_PREC_RIGHT, - ]; - } - $prefixOps = [ - Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, + AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, + AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, + Expr\ArrowFunction::class, Expr\Throw_::class, ]; foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT]; + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; } } @@ -1251,8 +1372,10 @@ abstract class PrettyPrinterAbstract * The removal map is used to determine which additional tokens should be removed when a * certain node is replaced by null. */ - protected function initializeRemovalMap() { - if ($this->removalMap) return; + protected function initializeRemovalMap(): void { + if (isset($this->removalMap)) { + return; + } $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; $stripLeft = ['left' => \T_WHITESPACE]; @@ -1262,7 +1385,7 @@ abstract class PrettyPrinterAbstract $stripEquals = ['left' => '=']; $this->removalMap = [ 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'Expr_ArrayItem->key' => $stripDoubleArrow, + 'ArrayItem->key' => $stripDoubleArrow, 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, @@ -1273,6 +1396,7 @@ abstract class PrettyPrinterAbstract 'Param->default' => $stripEquals, 'Stmt_Break->num' => $stripBoth, 'Stmt_Catch->var' => $stripLeft, + 'Stmt_ClassConst->type' => $stripRight, 'Stmt_ClassMethod->returnType' => $stripColon, 'Stmt_Class->extends' => ['left' => \T_EXTENDS], 'Stmt_Enum->scalarType' => $stripColon, @@ -1284,7 +1408,7 @@ abstract class PrettyPrinterAbstract 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, 'Stmt_Property->type' => $stripRight, - 'Stmt_PropertyProperty->default' => $stripEquals, + 'PropertyItem->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, @@ -1296,16 +1420,18 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeInsertionMap() { - if ($this->insertionMap) return; + protected function initializeInsertionMap(): void { + if (isset($this->insertionMap)) { + return; + } // TODO: "yield" where both key and value are inserted doesn't work // [$find, $beforeToken, $extraLeft, $extraRight] $this->insertionMap = [ 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'Expr_ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ' : ', null], - 'Expr_Closure->returnType' => [')', false, ' : ', null], + 'ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], + 'Expr_Closure->returnType' => [')', false, ': ', null], 'Expr_Ternary->if' => ['?', false, ' ', ' '], 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], @@ -1313,18 +1439,19 @@ abstract class PrettyPrinterAbstract 'Param->default' => [null, false, ' = ', null], 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], + 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Stmt_Enum->scalarType' => [null, false, ' : ', null], 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ' : ', null], + 'Stmt_Function->returnType' => [')', false, ': ', null], 'Stmt_If->else' => [null, false, ' ', null], 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], + 'PropertyItem->default' => [null, false, ' = ', null], 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], 'Stmt_StaticVar->default' => [null, false, ' = ', null], //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO @@ -1338,122 +1465,139 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeListInsertionMap() { - if ($this->listInsertionMap) return; + protected function initializeListInsertionMap(): void { + if (isset($this->listInsertionMap)) { + return; + } $this->listInsertionMap = [ // special //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_Encapsed->parts' => '', - 'Stmt_Catch->types' => '|', - 'UnionType->types' => '|', - 'IntersectionType->types' => '&', - 'Stmt_If->elseifs' => ' ', - 'Stmt_TryCatch->catches' => ' ', + //'Scalar_InterpolatedString->parts' => '', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', // comma-separated lists - 'Expr_Array->items' => ', ', - 'Expr_ArrowFunction->params' => ', ', - 'Expr_Closure->params' => ', ', - 'Expr_Closure->uses' => ', ', - 'Expr_FuncCall->args' => ', ', - 'Expr_Isset->vars' => ', ', - 'Expr_List->items' => ', ', - 'Expr_MethodCall->args' => ', ', - 'Expr_NullsafeMethodCall->args' => ', ', - 'Expr_New->args' => ', ', - 'Expr_PrintableNewAnonClass->args' => ', ', - 'Expr_StaticCall->args' => ', ', - 'Stmt_ClassConst->consts' => ', ', - 'Stmt_ClassMethod->params' => ', ', - 'Stmt_Class->implements' => ', ', - 'Stmt_Enum->implements' => ', ', - 'Expr_PrintableNewAnonClass->implements' => ', ', - 'Stmt_Const->consts' => ', ', - 'Stmt_Declare->declares' => ', ', - 'Stmt_Echo->exprs' => ', ', - 'Stmt_For->init' => ', ', - 'Stmt_For->cond' => ', ', - 'Stmt_For->loop' => ', ', - 'Stmt_Function->params' => ', ', - 'Stmt_Global->vars' => ', ', - 'Stmt_GroupUse->uses' => ', ', - 'Stmt_Interface->extends' => ', ', - 'Stmt_Match->arms' => ', ', - 'Stmt_Property->props' => ', ', - 'Stmt_StaticVar->vars' => ', ', - 'Stmt_TraitUse->traits' => ', ', - 'Stmt_TraitUseAdaptation_Precedence->insteadof' => ', ', - 'Stmt_Unset->vars' => ', ', - 'Stmt_Use->uses' => ', ', - 'MatchArm->conds' => ', ', - 'AttributeGroup->attrs' => ', ', + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', // statement lists - 'Expr_Closure->stmts' => "\n", - 'Stmt_Case->stmts' => "\n", - 'Stmt_Catch->stmts' => "\n", - 'Stmt_Class->stmts' => "\n", - 'Stmt_Enum->stmts' => "\n", - 'Expr_PrintableNewAnonClass->stmts' => "\n", - 'Stmt_Interface->stmts' => "\n", - 'Stmt_Trait->stmts' => "\n", - 'Stmt_ClassMethod->stmts' => "\n", - 'Stmt_Declare->stmts' => "\n", - 'Stmt_Do->stmts' => "\n", - 'Stmt_ElseIf->stmts' => "\n", - 'Stmt_Else->stmts' => "\n", - 'Stmt_Finally->stmts' => "\n", - 'Stmt_Foreach->stmts' => "\n", - 'Stmt_For->stmts' => "\n", - 'Stmt_Function->stmts' => "\n", - 'Stmt_If->stmts' => "\n", - 'Stmt_Namespace->stmts' => "\n", - 'Stmt_Class->attrGroups' => "\n", - 'Stmt_Enum->attrGroups' => "\n", - 'Stmt_EnumCase->attrGroups' => "\n", - 'Stmt_Interface->attrGroups' => "\n", - 'Stmt_Trait->attrGroups' => "\n", - 'Stmt_Function->attrGroups' => "\n", - 'Stmt_ClassMethod->attrGroups' => "\n", - 'Stmt_ClassConst->attrGroups' => "\n", - 'Stmt_Property->attrGroups' => "\n", - 'Expr_PrintableNewAnonClass->attrGroups' => ' ', - 'Expr_Closure->attrGroups' => ' ', - 'Expr_ArrowFunction->attrGroups' => ' ', - 'Param->attrGroups' => ' ', - 'Stmt_Switch->cases' => "\n", - 'Stmt_TraitUse->adaptations' => "\n", - 'Stmt_TryCatch->stmts' => "\n", - 'Stmt_While->stmts' => "\n", + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + Stmt\Block::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", // dummy for top-level context 'File->stmts' => "\n", ]; } - protected function initializeEmptyListInsertionMap() { - if ($this->emptyListInsertionMap) return; + protected function initializeEmptyListInsertionMap(): void { + if (isset($this->emptyListInsertionMap)) { + return; + } // TODO Insertion into empty statement lists. // [$find, $extraLeft, $extraRight] $this->emptyListInsertionMap = [ - 'Expr_ArrowFunction->params' => ['(', '', ''], - 'Expr_Closure->uses' => [')', ' use(', ')'], - 'Expr_Closure->params' => ['(', '', ''], - 'Expr_FuncCall->args' => ['(', '', ''], - 'Expr_MethodCall->args' => ['(', '', ''], - 'Expr_NullsafeMethodCall->args' => ['(', '', ''], - 'Expr_New->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], - 'Expr_StaticCall->args' => ['(', '', ''], - 'Stmt_Class->implements' => [null, ' implements ', ''], - 'Stmt_Enum->implements' => [null, ' implements ', ''], - 'Stmt_ClassMethod->params' => ['(', '', ''], - 'Stmt_Interface->extends' => [null, ' extends ', ''], - 'Stmt_Function->params' => ['(', '', ''], + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: * Expr_Isset->vars @@ -1485,22 +1629,27 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeModifierChangeMap() { - if ($this->modifierChangeMap) return; + protected function initializeModifierChangeMap(): void { + if (isset($this->modifierChangeMap)) { + return; + } $this->modifierChangeMap = [ - 'Stmt_ClassConst->flags' => \T_CONST, - 'Stmt_ClassMethod->flags' => \T_FUNCTION, - 'Stmt_Class->flags' => \T_CLASS, - 'Stmt_Property->flags' => \T_VARIABLE, - 'Param->flags' => \T_VARIABLE, - //'Stmt_TraitUseAdaptation_Alias->newModifier' => 0, // TODO + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], + Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO ]; // List of integer subnodes that are not modifiers: // Expr_Include->type // Stmt_GroupUse->type // Stmt_Use->type - // Stmt_UseUse->type + // UseItem->type } } diff --git a/vendor/phar-io/manifest/CHANGELOG.md b/vendor/phar-io/manifest/CHANGELOG.md index a403e093..f363b169 100644 --- a/vendor/phar-io/manifest/CHANGELOG.md +++ b/vendor/phar-io/manifest/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [2.0.4] - 03-03-2024 + +### Changed + +- Make `EMail` an optional attribute for author +- Stick with PHP 7.2 compatibilty +- Do not use implict nullable type (thanks @sebastianbergmann), this should make things work on PHP 8.4 + ## [2.0.3] - 20.07.2021 - Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release @@ -26,7 +34,8 @@ This release now requires PHP 7.2+ ### Unreleased -[Unreleased]: https://github.com/phar-io/manifest/compare/2.0.3...HEAD +[Unreleased]: https://github.com/phar-io/manifest/compare/2.1.0...HEAD +[2.1.0]: https://github.com/phar-io/manifest/compare/2.0.3...2.1.0 [2.0.3]: https://github.com/phar-io/manifest/compare/2.0.2...2.0.3 [2.0.2]: https://github.com/phar-io/manifest/compare/2.0.1...2.0.2 [2.0.1]: https://github.com/phar-io/manifest/compare/2.0.0...2.0.1 diff --git a/vendor/phar-io/manifest/README.md b/vendor/phar-io/manifest/README.md index e6d0b055..fae2c9a7 100644 --- a/vendor/phar-io/manifest/README.md +++ b/vendor/phar-io/manifest/README.md @@ -2,10 +2,6 @@ Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar). -[![Build Status](https://travis-ci.org/phar-io/manifest.svg?branch=master)](https://travis-ci.org/phar-io/manifest) -[![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) -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7/mini.png)](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7) - ## Installation You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): @@ -16,8 +12,9 @@ If you only need this library during development, for instance to run your proje composer require --dev phar-io/manifest -## Usage +## Usage Examples +### Read from `manifest.xml` ```php use PharIo\Manifest\ManifestLoader; use PharIo\Manifest\ManifestSerializer; @@ -28,3 +25,154 @@ var_dump($manifest); echo (new ManifestSerializer)->serializeToString($manifest); ``` + +
+ Output + +```shell +object(PharIo\Manifest\Manifest)#14 (6) { + ["name":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\ApplicationName)#10 (1) { + ["name":"PharIo\Manifest\ApplicationName":private]=> + string(12) "some/library" + } + ["version":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Version\Version)#12 (5) { + ["originalVersionString":"PharIo\Version\Version":private]=> + string(5) "1.0.0" + ["major":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#13 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(1) + } + ["minor":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#23 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(0) + } + ["patch":"PharIo\Version\Version":private]=> + object(PharIo\Version\VersionNumber)#22 (1) { + ["value":"PharIo\Version\VersionNumber":private]=> + int(0) + } + ["preReleaseSuffix":"PharIo\Version\Version":private]=> + NULL + } + ["type":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\Library)#6 (0) { + } + ["copyrightInformation":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\CopyrightInformation)#19 (2) { + ["authors":"PharIo\Manifest\CopyrightInformation":private]=> + object(PharIo\Manifest\AuthorCollection)#9 (1) { + ["authors":"PharIo\Manifest\AuthorCollection":private]=> + array(1) { + [0]=> + object(PharIo\Manifest\Author)#15 (2) { + ["name":"PharIo\Manifest\Author":private]=> + string(13) "Reiner Zufall" + ["email":"PharIo\Manifest\Author":private]=> + object(PharIo\Manifest\Email)#16 (1) { + ["email":"PharIo\Manifest\Email":private]=> + string(16) "reiner@zufall.de" + } + } + } + } + ["license":"PharIo\Manifest\CopyrightInformation":private]=> + object(PharIo\Manifest\License)#11 (2) { + ["name":"PharIo\Manifest\License":private]=> + string(12) "BSD-3-Clause" + ["url":"PharIo\Manifest\License":private]=> + object(PharIo\Manifest\Url)#18 (1) { + ["url":"PharIo\Manifest\Url":private]=> + string(26) "https://domain.tld/LICENSE" + } + } + } + ["requirements":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\RequirementCollection)#17 (1) { + ["requirements":"PharIo\Manifest\RequirementCollection":private]=> + array(1) { + [0]=> + object(PharIo\Manifest\PhpVersionRequirement)#20 (1) { + ["versionConstraint":"PharIo\Manifest\PhpVersionRequirement":private]=> + object(PharIo\Version\SpecificMajorAndMinorVersionConstraint)#24 (3) { + ["originalValue":"PharIo\Version\AbstractVersionConstraint":private]=> + string(3) "7.0" + ["major":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> + int(7) + ["minor":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=> + int(0) + } + } + } + } + ["bundledComponents":"PharIo\Manifest\Manifest":private]=> + object(PharIo\Manifest\BundledComponentCollection)#8 (1) { + ["bundledComponents":"PharIo\Manifest\BundledComponentCollection":private]=> + array(0) { + } + } +} + + + + + + + + + + + +``` +
+ +### Create via API +```php +$bundled = new \PharIo\Manifest\BundledComponentCollection(); +$bundled->add( + new \PharIo\Manifest\BundledComponent('vendor/packageA', new \PharIo\Version\Version('1.2.3-dev') + ) +); + +$manifest = new PharIo\Manifest\Manifest( + new \PharIo\Manifest\ApplicationName('vendor/package'), + new \PharIo\Version\Version('1.0.0'), + new \PharIo\Manifest\Library(), + new \PharIo\Manifest\CopyrightInformation( + new \PharIo\Manifest\AuthorCollection(), + new \PharIo\Manifest\License( + 'BSD-3-Clause', + new \PharIo\Manifest\Url('https://spdx.org/licenses/BSD-3-Clause.html') + ) + ), + new \PharIo\Manifest\RequirementCollection(), + $bundled +); + +echo (new ManifestSerializer)->serializeToString($manifest); +``` + +
+ Output + +```xml + + + + + + + + + + + + + +``` + +
+ diff --git a/vendor/phar-io/manifest/composer.json b/vendor/phar-io/manifest/composer.json index a2521193..dc5fa458 100644 --- a/vendor/phar-io/manifest/composer.json +++ b/vendor/phar-io/manifest/composer.json @@ -26,6 +26,7 @@ "php": "^7.2 || ^8.0", "ext-dom": "*", "ext-phar": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1" }, diff --git a/vendor/phar-io/manifest/composer.lock b/vendor/phar-io/manifest/composer.lock index e0e6db76..fe18e08b 100644 --- a/vendor/phar-io/manifest/composer.lock +++ b/vendor/phar-io/manifest/composer.lock @@ -4,24 +4,24 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f2ac4614ce4f7273fd54a64b65fd047a", + "content-hash": "279b3c4fe44357abd924fdcc0cfa5664", "packages": [ { "name": "phar-io/version", - "version": "3.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/d06a5000ac1a258a7d035295f0bd4ae7c859bc4f", - "reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -51,7 +51,11 @@ } ], "description": "Library for handling version information and constraints", - "time": "2020-05-09T21:27:55+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" } ], "packages-dev": [], @@ -61,10 +65,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "ext-dom": "*", "ext-phar": "*", + "ext-libxml": "*", "ext-xmlwriter": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php index 8e539d5f..3da6403f 100644 --- a/vendor/phar-io/manifest/src/ManifestDocumentMapper.php +++ b/vendor/phar-io/manifest/src/ManifestDocumentMapper.php @@ -2,16 +2,19 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; use PharIo\Version\Exception as VersionException; use PharIo\Version\Version; use PharIo\Version\VersionConstraintParser; +use Throwable; +use function sprintf; class ManifestDocumentMapper { public function map(ManifestDocument $document): Manifest { @@ -30,9 +33,7 @@ class ManifestDocumentMapper { $requirements, $bundledComponents ); - } catch (VersionException $e) { - throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); - } catch (Exception $e) { + } catch (Throwable $e) { throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); } } @@ -48,7 +49,7 @@ class ManifestDocumentMapper { } throw new ManifestDocumentMapperException( - \sprintf('Unsupported type %s', $contains->getType()) + sprintf('Unsupported type %s', $contains->getType()) ); } @@ -59,7 +60,7 @@ class ManifestDocumentMapper { $authors->add( new Author( $authorElement->getName(), - new Email($authorElement->getEmail()) + $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null ) ); } @@ -85,7 +86,7 @@ class ManifestDocumentMapper { $versionConstraint = $parser->parse($phpElement->getVersion()); } catch (VersionException $e) { throw new ManifestDocumentMapperException( - \sprintf('Unsupported version constraint - %s', $e->getMessage()), + sprintf('Unsupported version constraint - %s', $e->getMessage()), (int)$e->getCode(), $e ); @@ -141,7 +142,7 @@ class ManifestDocumentMapper { ); } catch (VersionException $e) { throw new ManifestDocumentMapperException( - \sprintf('Unsupported version constraint - %s', $e->getMessage()), + sprintf('Unsupported version constraint - %s', $e->getMessage()), (int)$e->getCode(), $e ); diff --git a/vendor/phar-io/manifest/src/ManifestLoader.php b/vendor/phar-io/manifest/src/ManifestLoader.php index ae884e49..f467d2d3 100644 --- a/vendor/phar-io/manifest/src/ManifestLoader.php +++ b/vendor/phar-io/manifest/src/ManifestLoader.php @@ -2,13 +2,16 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; +use function sprintf; + class ManifestLoader { public static function fromFile(string $filename): Manifest { try { @@ -17,7 +20,7 @@ class ManifestLoader { ); } catch (Exception $e) { throw new ManifestLoaderException( - \sprintf('Loading %s failed.', $filename), + sprintf('Loading %s failed.', $filename), (int)$e->getCode(), $e ); diff --git a/vendor/phar-io/manifest/src/ManifestSerializer.php b/vendor/phar-io/manifest/src/ManifestSerializer.php index e236b598..48b8efdd 100644 --- a/vendor/phar-io/manifest/src/ManifestSerializer.php +++ b/vendor/phar-io/manifest/src/ManifestSerializer.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; @@ -13,6 +14,9 @@ use PharIo\Version\AnyVersionConstraint; use PharIo\Version\Version; use PharIo\Version\VersionConstraint; use XMLWriter; +use function count; +use function file_put_contents; +use function str_repeat; /** @psalm-suppress MissingConstructor */ class ManifestSerializer { @@ -20,7 +24,7 @@ class ManifestSerializer { private $xmlWriter; public function serializeToFile(Manifest $manifest, string $filename): void { - \file_put_contents( + file_put_contents( $filename, $this->serializeToString($manifest) ); @@ -41,7 +45,7 @@ class ManifestSerializer { $xmlWriter = new XMLWriter(); $xmlWriter->openMemory(); $xmlWriter->setIndent(true); - $xmlWriter->setIndentString(\str_repeat(' ', 4)); + $xmlWriter->setIndentString(str_repeat(' ', 4)); $xmlWriter->startDocument('1.0', 'UTF-8'); $xmlWriter->startElement('phar'); $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0'); @@ -144,7 +148,7 @@ class ManifestSerializer { } private function addBundles(BundledComponentCollection $bundledComponentCollection): void { - if (\count($bundledComponentCollection) === 0) { + if (count($bundledComponentCollection) === 0) { return; } $this->xmlWriter->startElement('bundles'); diff --git a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php index 766fc0e6..7528afc8 100644 --- a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php +++ b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php @@ -2,12 +2,15 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class ElementCollectionException extends \InvalidArgumentException implements Exception { +use InvalidArgumentException; + +class ElementCollectionException extends InvalidArgumentException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/Exception.php b/vendor/phar-io/manifest/src/exceptions/Exception.php index e7f12209..0c135d3c 100644 --- a/vendor/phar-io/manifest/src/exceptions/Exception.php +++ b/vendor/phar-io/manifest/src/exceptions/Exception.php @@ -2,12 +2,15 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -interface Exception extends \Throwable { +use Throwable; + +interface Exception extends Throwable { } diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php index 952901eb..ecfe5142 100644 --- a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php +++ b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php @@ -2,13 +2,16 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class InvalidApplicationNameException extends \InvalidArgumentException implements Exception { +use InvalidArgumentException; + +class InvalidApplicationNameException extends InvalidArgumentException implements Exception { public const InvalidFormat = 2; } diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php index 3cbe0822..24240551 100644 --- a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php +++ b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php @@ -2,12 +2,15 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class InvalidEmailException extends \InvalidArgumentException implements Exception { +use InvalidArgumentException; + +class InvalidEmailException extends InvalidArgumentException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php index 8f77e294..c8b192b1 100644 --- a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php +++ b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php @@ -2,12 +2,15 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class InvalidUrlException extends \InvalidArgumentException implements Exception { +use InvalidArgumentException; + +class InvalidUrlException extends InvalidArgumentException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php index cf1c314c..0a158e6e 100644 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php @@ -1,5 +1,16 @@ , Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ namespace PharIo\Manifest; -class ManifestDocumentException extends \RuntimeException implements Exception { +use RuntimeException; + +class ManifestDocumentException extends RuntimeException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php index 4676e354..816af120 100644 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php @@ -2,14 +2,16 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; use LibXMLError; +use function sprintf; class ManifestDocumentLoadingException extends \Exception implements Exception { /** @var LibXMLError[] */ @@ -25,7 +27,7 @@ class ManifestDocumentLoadingException extends \Exception implements Exception { $first = $this->libxmlErrors[0]; parent::__construct( - \sprintf( + sprintf( '%s (Line: %d / Column: %d / File: %s)', $first->message, $first->line, diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php index 43373bd3..0d1a5f5a 100644 --- a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php @@ -1,5 +1,16 @@ , Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ namespace PharIo\Manifest; -class ManifestDocumentMapperException extends \RuntimeException implements Exception { +use RuntimeException; + +class ManifestDocumentMapperException extends RuntimeException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php index a4e77236..46f82e32 100644 --- a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php +++ b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php @@ -1,5 +1,16 @@ , Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ namespace PharIo\Manifest; -class ManifestElementException extends \RuntimeException implements Exception { +use RuntimeException; + +class ManifestElementException extends RuntimeException implements Exception { } diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php index df0971ed..d00ed190 100644 --- a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php +++ b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php @@ -1,4 +1,13 @@ , Sebastian Heuer , Sebastian Bergmann and contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + */ namespace PharIo\Manifest; class ManifestLoaderException extends \Exception implements Exception { diff --git a/vendor/phar-io/manifest/src/values/Application.php b/vendor/phar-io/manifest/src/values/Application.php index 5420bcb8..11a44d9c 100644 --- a/vendor/phar-io/manifest/src/values/Application.php +++ b/vendor/phar-io/manifest/src/values/Application.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/ApplicationName.php b/vendor/phar-io/manifest/src/values/ApplicationName.php index d71744ab..1a0ad1e2 100644 --- a/vendor/phar-io/manifest/src/values/ApplicationName.php +++ b/vendor/phar-io/manifest/src/values/ApplicationName.php @@ -2,13 +2,17 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; +use function preg_match; +use function sprintf; + class ApplicationName { /** @var string */ private $name; @@ -27,9 +31,9 @@ class ApplicationName { } private function ensureValidFormat(string $name): void { - if (!\preg_match('#\w/\w#', $name)) { + if (!preg_match('#\w/\w#', $name)) { throw new InvalidApplicationNameException( - \sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name), + sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name), InvalidApplicationNameException::InvalidFormat ); } diff --git a/vendor/phar-io/manifest/src/values/Author.php b/vendor/phar-io/manifest/src/values/Author.php index 82b666e7..7b243aac 100644 --- a/vendor/phar-io/manifest/src/values/Author.php +++ b/vendor/phar-io/manifest/src/values/Author.php @@ -2,27 +2,34 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; +use function sprintf; + class Author { /** @var string */ private $name; - /** @var Email */ + /** @var null|Email */ private $email; - public function __construct(string $name, Email $email) { + public function __construct(string $name, ?Email $email = null) { $this->name = $name; $this->email = $email; } public function asString(): string { - return \sprintf( + if (!$this->hasEmail()) { + return $this->name; + } + + return sprintf( '%s <%s>', $this->name, $this->email->asString() @@ -33,7 +40,18 @@ class Author { return $this->name; } + /** + * @psalm-assert-if-true Email $this->email + */ + public function hasEmail(): bool { + return $this->email !== null; + } + public function getEmail(): Email { + if (!$this->hasEmail()) { + throw new NoEmailAddressException(); + } + return $this->email; } } diff --git a/vendor/phar-io/manifest/src/values/AuthorCollection.php b/vendor/phar-io/manifest/src/values/AuthorCollection.php index 27e50ad8..549876da 100644 --- a/vendor/phar-io/manifest/src/values/AuthorCollection.php +++ b/vendor/phar-io/manifest/src/values/AuthorCollection.php @@ -2,14 +2,20 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class AuthorCollection implements \Countable, \IteratorAggregate { +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class AuthorCollection implements Countable, IteratorAggregate { /** @var Author[] */ private $authors = []; @@ -25,7 +31,7 @@ class AuthorCollection implements \Countable, \IteratorAggregate { } public function count(): int { - return \count($this->authors); + return count($this->authors); } public function getIterator(): AuthorCollectionIterator { diff --git a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php index 4ff3c394..36fee9f7 100644 --- a/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php +++ b/vendor/phar-io/manifest/src/values/AuthorCollectionIterator.php @@ -2,14 +2,19 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class AuthorCollectionIterator implements \Iterator { +use Iterator; +use function count; + +/** @template-implements Iterator */ +class AuthorCollectionIterator implements Iterator { /** @var Author[] */ private $authors; @@ -25,7 +30,7 @@ class AuthorCollectionIterator implements \Iterator { } public function valid(): bool { - return $this->position < \count($this->authors); + return $this->position < count($this->authors); } public function key(): int { diff --git a/vendor/phar-io/manifest/src/values/BundledComponent.php b/vendor/phar-io/manifest/src/values/BundledComponent.php index ea77b440..58170368 100644 --- a/vendor/phar-io/manifest/src/values/BundledComponent.php +++ b/vendor/phar-io/manifest/src/values/BundledComponent.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php index b628eaa3..28aaa06c 100644 --- a/vendor/phar-io/manifest/src/values/BundledComponentCollection.php +++ b/vendor/phar-io/manifest/src/values/BundledComponentCollection.php @@ -2,14 +2,20 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class BundledComponentCollection implements \Countable, \IteratorAggregate { +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class BundledComponentCollection implements Countable, IteratorAggregate { /** @var BundledComponent[] */ private $bundledComponents = []; @@ -25,7 +31,7 @@ class BundledComponentCollection implements \Countable, \IteratorAggregate { } public function count(): int { - return \count($this->bundledComponents); + return count($this->bundledComponents); } public function getIterator(): BundledComponentCollectionIterator { diff --git a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php index 462db45a..5c72817d 100644 --- a/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php +++ b/vendor/phar-io/manifest/src/values/BundledComponentCollectionIterator.php @@ -2,14 +2,19 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class BundledComponentCollectionIterator implements \Iterator { +use Iterator; +use function count; + +/** @template-implements Iterator */ +class BundledComponentCollectionIterator implements Iterator { /** @var BundledComponent[] */ private $bundledComponents; @@ -25,7 +30,7 @@ class BundledComponentCollectionIterator implements \Iterator { } public function valid(): bool { - return $this->position < \count($this->bundledComponents); + return $this->position < count($this->bundledComponents); } public function key(): int { diff --git a/vendor/phar-io/manifest/src/values/CopyrightInformation.php b/vendor/phar-io/manifest/src/values/CopyrightInformation.php index d26f9472..b4468ed7 100644 --- a/vendor/phar-io/manifest/src/values/CopyrightInformation.php +++ b/vendor/phar-io/manifest/src/values/CopyrightInformation.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/Email.php b/vendor/phar-io/manifest/src/values/Email.php index 588348d8..dbaff84a 100644 --- a/vendor/phar-io/manifest/src/values/Email.php +++ b/vendor/phar-io/manifest/src/values/Email.php @@ -2,13 +2,17 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; +use const FILTER_VALIDATE_EMAIL; +use function filter_var; + class Email { /** @var string */ private $email; @@ -24,7 +28,7 @@ class Email { } private function ensureEmailIsValid(string $url): void { - if (\filter_var($url, \FILTER_VALIDATE_EMAIL) === false) { + if (filter_var($url, FILTER_VALIDATE_EMAIL) === false) { throw new InvalidEmailException; } } diff --git a/vendor/phar-io/manifest/src/values/Extension.php b/vendor/phar-io/manifest/src/values/Extension.php index 4c5726f8..abcd2f89 100644 --- a/vendor/phar-io/manifest/src/values/Extension.php +++ b/vendor/phar-io/manifest/src/values/Extension.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/Library.php b/vendor/phar-io/manifest/src/values/Library.php index 21849e13..97c292dc 100644 --- a/vendor/phar-io/manifest/src/values/Library.php +++ b/vendor/phar-io/manifest/src/values/Library.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/License.php b/vendor/phar-io/manifest/src/values/License.php index 39542fe8..c2d94299 100644 --- a/vendor/phar-io/manifest/src/values/License.php +++ b/vendor/phar-io/manifest/src/values/License.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/Manifest.php b/vendor/phar-io/manifest/src/values/Manifest.php index 0140b842..36466820 100644 --- a/vendor/phar-io/manifest/src/values/Manifest.php +++ b/vendor/phar-io/manifest/src/values/Manifest.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; @@ -75,7 +76,7 @@ class Manifest { return $this->type->isExtension(); } - public function isExtensionFor(ApplicationName $application, Version $version = null): bool { + public function isExtensionFor(ApplicationName $application, ?Version $version = null): bool { if (!$this->isExtension()) { return false; } diff --git a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php index 088f3858..f81bd259 100644 --- a/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php +++ b/vendor/phar-io/manifest/src/values/PhpExtensionRequirement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php index f8d6f6d1..fb30c3b8 100644 --- a/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php +++ b/vendor/phar-io/manifest/src/values/PhpVersionRequirement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/Requirement.php b/vendor/phar-io/manifest/src/values/Requirement.php index 8b845d6a..d4b46401 100644 --- a/vendor/phar-io/manifest/src/values/Requirement.php +++ b/vendor/phar-io/manifest/src/values/Requirement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/RequirementCollection.php b/vendor/phar-io/manifest/src/values/RequirementCollection.php index b82cd955..e4fe2a11 100644 --- a/vendor/phar-io/manifest/src/values/RequirementCollection.php +++ b/vendor/phar-io/manifest/src/values/RequirementCollection.php @@ -2,14 +2,20 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class RequirementCollection implements \Countable, \IteratorAggregate { +use Countable; +use IteratorAggregate; +use function count; + +/** @template-implements IteratorAggregate */ +class RequirementCollection implements Countable, IteratorAggregate { /** @var Requirement[] */ private $requirements = []; @@ -25,7 +31,7 @@ class RequirementCollection implements \Countable, \IteratorAggregate { } public function count(): int { - return \count($this->requirements); + return count($this->requirements); } public function getIterator(): RequirementCollectionIterator { diff --git a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php index 5614eaf7..a587468c 100644 --- a/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php +++ b/vendor/phar-io/manifest/src/values/RequirementCollectionIterator.php @@ -2,14 +2,19 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; -class RequirementCollectionIterator implements \Iterator { +use Iterator; +use function count; + +/** @template-implements Iterator */ +class RequirementCollectionIterator implements Iterator { /** @var Requirement[] */ private $requirements; @@ -25,7 +30,7 @@ class RequirementCollectionIterator implements \Iterator { } public function valid(): bool { - return $this->position < \count($this->requirements); + return $this->position < count($this->requirements); } public function key(): int { diff --git a/vendor/phar-io/manifest/src/values/Type.php b/vendor/phar-io/manifest/src/values/Type.php index 23b28980..231e7fd9 100644 --- a/vendor/phar-io/manifest/src/values/Type.php +++ b/vendor/phar-io/manifest/src/values/Type.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/values/Url.php b/vendor/phar-io/manifest/src/values/Url.php index 63952533..98061554 100644 --- a/vendor/phar-io/manifest/src/values/Url.php +++ b/vendor/phar-io/manifest/src/values/Url.php @@ -2,13 +2,17 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; +use const FILTER_VALIDATE_URL; +use function filter_var; + class Url { /** @var string */ private $url; @@ -24,12 +28,10 @@ class Url { } /** - * @param string $url - * * @throws InvalidUrlException */ - private function ensureUrlIsValid($url): void { - if (\filter_var($url, \FILTER_VALIDATE_URL) === false) { + private function ensureUrlIsValid(string $url): void { + if (filter_var($url, FILTER_VALIDATE_URL) === false) { throw new InvalidUrlException; } } diff --git a/vendor/phar-io/manifest/src/xml/AuthorElement.php b/vendor/phar-io/manifest/src/xml/AuthorElement.php index c454b271..b33eb3ca 100644 --- a/vendor/phar-io/manifest/src/xml/AuthorElement.php +++ b/vendor/phar-io/manifest/src/xml/AuthorElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; @@ -17,4 +18,8 @@ class AuthorElement extends ManifestElement { public function getEmail(): string { return $this->getAttributeValue('email'); } + + public function hasEMail(): bool { + return $this->hasAttribute('email'); + } } diff --git a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php index a54147eb..0a2a2a38 100644 --- a/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php +++ b/vendor/phar-io/manifest/src/xml/AuthorElementCollection.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/BundlesElement.php b/vendor/phar-io/manifest/src/xml/BundlesElement.php index eb2105ac..ef721a66 100644 --- a/vendor/phar-io/manifest/src/xml/BundlesElement.php +++ b/vendor/phar-io/manifest/src/xml/BundlesElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ComponentElement.php b/vendor/phar-io/manifest/src/xml/ComponentElement.php index 7f6a5ec9..84373c47 100644 --- a/vendor/phar-io/manifest/src/xml/ComponentElement.php +++ b/vendor/phar-io/manifest/src/xml/ComponentElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php index 23bcbd2f..cd9ad5dd 100644 --- a/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php +++ b/vendor/phar-io/manifest/src/xml/ComponentElementCollection.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ContainsElement.php b/vendor/phar-io/manifest/src/xml/ContainsElement.php index ebef49d9..55a9c605 100644 --- a/vendor/phar-io/manifest/src/xml/ContainsElement.php +++ b/vendor/phar-io/manifest/src/xml/ContainsElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/CopyrightElement.php b/vendor/phar-io/manifest/src/xml/CopyrightElement.php index 3debe7dc..c11415a5 100644 --- a/vendor/phar-io/manifest/src/xml/CopyrightElement.php +++ b/vendor/phar-io/manifest/src/xml/CopyrightElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ElementCollection.php b/vendor/phar-io/manifest/src/xml/ElementCollection.php index 26d9250f..9e1de569 100644 --- a/vendor/phar-io/manifest/src/xml/ElementCollection.php +++ b/vendor/phar-io/manifest/src/xml/ElementCollection.php @@ -2,17 +2,24 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; use DOMElement; use DOMNodeList; +use Iterator; +use ReturnTypeWillChange; +use function count; +use function get_class; +use function sprintf; -abstract class ElementCollection implements \Iterator { +/** @template-implements Iterator */ +abstract class ElementCollection implements Iterator { /** @var DOMElement[] */ private $nodes = []; @@ -24,7 +31,7 @@ abstract class ElementCollection implements \Iterator { $this->importNodes($nodeList); } - #[\ReturnTypeWillChange] + #[ReturnTypeWillChange] abstract public function current(); public function next(): void { @@ -36,7 +43,7 @@ abstract class ElementCollection implements \Iterator { } public function valid(): bool { - return $this->position < \count($this->nodes); + return $this->position < count($this->nodes); } public function rewind(): void { @@ -51,7 +58,7 @@ abstract class ElementCollection implements \Iterator { foreach ($nodeList as $node) { if (!$node instanceof DOMElement) { throw new ElementCollectionException( - \sprintf('\DOMElement expected, got \%s', \get_class($node)) + sprintf('\DOMElement expected, got \%s', get_class($node)) ); } diff --git a/vendor/phar-io/manifest/src/xml/ExtElement.php b/vendor/phar-io/manifest/src/xml/ExtElement.php index 257853c4..6a88a05d 100644 --- a/vendor/phar-io/manifest/src/xml/ExtElement.php +++ b/vendor/phar-io/manifest/src/xml/ExtElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php index 05977349..3eec9463 100644 --- a/vendor/phar-io/manifest/src/xml/ExtElementCollection.php +++ b/vendor/phar-io/manifest/src/xml/ExtElementCollection.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ExtensionElement.php b/vendor/phar-io/manifest/src/xml/ExtensionElement.php index db067f99..22016a01 100644 --- a/vendor/phar-io/manifest/src/xml/ExtensionElement.php +++ b/vendor/phar-io/manifest/src/xml/ExtensionElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/LicenseElement.php b/vendor/phar-io/manifest/src/xml/LicenseElement.php index 658c3d1c..d9f4cb26 100644 --- a/vendor/phar-io/manifest/src/xml/LicenseElement.php +++ b/vendor/phar-io/manifest/src/xml/LicenseElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/ManifestDocument.php b/vendor/phar-io/manifest/src/xml/ManifestDocument.php index f88b2829..87458686 100644 --- a/vendor/phar-io/manifest/src/xml/ManifestDocument.php +++ b/vendor/phar-io/manifest/src/xml/ManifestDocument.php @@ -2,15 +2,24 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; use DOMDocument; use DOMElement; +use Throwable; +use function count; +use function file_get_contents; +use function is_file; +use function libxml_clear_errors; +use function libxml_get_errors; +use function libxml_use_internal_errors; +use function sprintf; class ManifestDocument { public const XMLNS = 'https://phar.io/xml/manifest/1.0'; @@ -19,28 +28,31 @@ class ManifestDocument { private $dom; public static function fromFile(string $filename): ManifestDocument { - if (!\file_exists($filename)) { + if (!is_file($filename)) { throw new ManifestDocumentException( - \sprintf('File "%s" not found', $filename) + sprintf('File "%s" not found', $filename) ); } return self::fromString( - \file_get_contents($filename) + file_get_contents($filename) ); } public static function fromString(string $xmlString): ManifestDocument { - $prev = \libxml_use_internal_errors(true); - \libxml_clear_errors(); + $prev = libxml_use_internal_errors(true); + libxml_clear_errors(); - $dom = new DOMDocument(); - $dom->loadXML($xmlString); + try { + $dom = new DOMDocument(); + $dom->loadXML($xmlString); + $errors = libxml_get_errors(); + libxml_use_internal_errors($prev); + } catch (Throwable $t) { + throw new ManifestDocumentException($t->getMessage(), 0, $t); + } - $errors = \libxml_get_errors(); - \libxml_use_internal_errors($prev); - - if (\count($errors) !== 0) { + if (count($errors) !== 0) { throw new ManifestDocumentLoadingException($errors); } @@ -94,7 +106,7 @@ class ManifestDocument { if (!$element instanceof DOMElement) { throw new ManifestDocumentException( - \sprintf('Element %s missing', $elementName) + sprintf('Element %s missing', $elementName) ); } diff --git a/vendor/phar-io/manifest/src/xml/ManifestElement.php b/vendor/phar-io/manifest/src/xml/ManifestElement.php index 1f57f547..461ba0c9 100644 --- a/vendor/phar-io/manifest/src/xml/ManifestElement.php +++ b/vendor/phar-io/manifest/src/xml/ManifestElement.php @@ -2,15 +2,17 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; use DOMElement; use DOMNodeList; +use function sprintf; class ManifestElement { public const XMLNS = 'https://phar.io/xml/manifest/1.0'; @@ -25,7 +27,7 @@ class ManifestElement { protected function getAttributeValue(string $name): string { if (!$this->element->hasAttribute($name)) { throw new ManifestElementException( - \sprintf( + sprintf( 'Attribute %s not set on element %s', $name, $this->element->localName @@ -36,12 +38,16 @@ class ManifestElement { return $this->element->getAttribute($name); } + protected function hasAttribute(string $name): bool { + return $this->element->hasAttribute($name); + } + protected function getChildByName(string $elementName): DOMElement { $element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); if (!$element instanceof DOMElement) { throw new ManifestElementException( - \sprintf('Element %s missing', $elementName) + sprintf('Element %s missing', $elementName) ); } @@ -53,7 +59,7 @@ class ManifestElement { if ($elementList->length === 0) { throw new ManifestElementException( - \sprintf('Element(s) %s missing', $elementName) + sprintf('Element(s) %s missing', $elementName) ); } diff --git a/vendor/phar-io/manifest/src/xml/PhpElement.php b/vendor/phar-io/manifest/src/xml/PhpElement.php index c5c906c9..9340c2e6 100644 --- a/vendor/phar-io/manifest/src/xml/PhpElement.php +++ b/vendor/phar-io/manifest/src/xml/PhpElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phar-io/manifest/src/xml/RequiresElement.php b/vendor/phar-io/manifest/src/xml/RequiresElement.php index b7cd41ef..73ba54ca 100644 --- a/vendor/phar-io/manifest/src/xml/RequiresElement.php +++ b/vendor/phar-io/manifest/src/xml/RequiresElement.php @@ -2,10 +2,11 @@ /* * This file is part of PharIo\Manifest. * - * (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann + * Copyright (c) Arne Blankerts , Sebastian Heuer , Sebastian Bergmann and contributors * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. + * */ namespace PharIo\Manifest; diff --git a/vendor/phpdocumentor/reflection-common/.github/dependabot.yml b/vendor/phpdocumentor/reflection-common/.github/dependabot.yml deleted file mode 100644 index c630ffa6..00000000 --- a/vendor/phpdocumentor/reflection-common/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 -updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 diff --git a/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml b/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml deleted file mode 100644 index 484410e9..00000000 --- a/vendor/phpdocumentor/reflection-common/.github/workflows/push.yml +++ /dev/null @@ -1,223 +0,0 @@ -on: - push: - branches: - - 2.x - pull_request: -name: Qa workflow -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: composer - uses: docker://composer - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: install --no-interaction --prefer-dist --optimize-autoloader - - - name: Install phive - run: make install-phive - - - name: Install PHAR dependencies - run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,8A03EA3B385DBAA1 --force-accept-unsigned - - phpunit-with-coverage: - runs-on: ubuntu-latest - name: Unit tests - needs: setup - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.2 - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - coverage: pcov - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ubuntu-latest-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ubuntu-latest-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Run PHPUnit - run: php tools/phpunit - - phpunit: - runs-on: ${{ matrix.operating-system }} - strategy: - matrix: - operating-system: - - ubuntu-latest - - windows-latest - - macOS-latest - php-versions: ['7.2', '7.3', '7.4', '8.0'] - name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }} - needs: - - setup - - phpunit-with-coverage - steps: - - uses: actions/checkout@v2 - - - name: Restore/cache tools folder - uses: actions/cache@v1 - with: - path: tools - key: all-tools-${{ github.sha }} - restore-keys: | - all-tools-${{ github.sha }}- - all-tools- - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Run PHPUnit - continue-on-error: true - run: php tools/phpunit - - codestyle: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: Code style check - uses: phpDocumentor/coding-standard@latest - with: - args: -s - - phpstan: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: PHPStan - uses: phpDocumentor/phpstan-ga@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: analyse src --configuration phpstan.neon - - psalm: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.2 - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - tools: psalm - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - - name: Install Composer dependencies - run: | - composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - - - name: Psalm - run: psalm --output-format=github - - bc_check: - name: BC Check - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v2 - - name: fetch tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Restore/cache vendor folder - uses: actions/cache@v1 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga diff --git a/vendor/phpdocumentor/reflection-common/LICENSE b/vendor/phpdocumentor/reflection-common/LICENSE deleted file mode 100644 index ed6926c1..00000000 --- a/vendor/phpdocumentor/reflection-common/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 phpDocumentor - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/phpdocumentor/reflection-common/README.md b/vendor/phpdocumentor/reflection-common/README.md deleted file mode 100644 index 70f830dc..00000000 --- a/vendor/phpdocumentor/reflection-common/README.md +++ /dev/null @@ -1,11 +0,0 @@ -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![Qa workflow](https://github.com/phpDocumentor/ReflectionCommon/workflows/Qa%20workflow/badge.svg) -[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/ReflectionCommon.svg)](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master) -[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) -[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionCommon.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master) -[![Stable Version](https://img.shields.io/packagist/v/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) -[![Unstable Version](https://img.shields.io/packagist/vpre/phpDocumentor/Reflection-Common.svg)](https://packagist.org/packages/phpDocumentor/Reflection-Common) - - -ReflectionCommon -================ diff --git a/vendor/phpdocumentor/reflection-common/composer.json b/vendor/phpdocumentor/reflection-common/composer.json deleted file mode 100644 index 4d128b49..00000000 --- a/vendor/phpdocumentor/reflection-common/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "phpdocumentor/reflection-common", - "keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"], - "homepage": "http://www.phpdoc.org", - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "license": "MIT", - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "require": { - "php": "^7.2 || ^8.0" - }, - "autoload" : { - "psr-4" : { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "require-dev": { - }, - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - } -} diff --git a/vendor/phpdocumentor/reflection-common/src/Element.php b/vendor/phpdocumentor/reflection-common/src/Element.php deleted file mode 100644 index 8923e4fb..00000000 --- a/vendor/phpdocumentor/reflection-common/src/Element.php +++ /dev/null @@ -1,30 +0,0 @@ -fqsen = $fqsen; - - if (isset($matches[2])) { - $this->name = $matches[2]; - } else { - $matches = explode('\\', $fqsen); - $name = end($matches); - assert(is_string($name)); - $this->name = trim($name, '()'); - } - } - - /** - * converts this class to string. - */ - public function __toString() : string - { - return $this->fqsen; - } - - /** - * Returns the name of the element without path. - */ - public function getName() : string - { - return $this->name; - } -} diff --git a/vendor/phpdocumentor/reflection-common/src/Location.php b/vendor/phpdocumentor/reflection-common/src/Location.php deleted file mode 100644 index 177deede..00000000 --- a/vendor/phpdocumentor/reflection-common/src/Location.php +++ /dev/null @@ -1,53 +0,0 @@ -lineNumber = $lineNumber; - $this->columnNumber = $columnNumber; - } - - /** - * Returns the line number that is covered by this location. - */ - public function getLineNumber() : int - { - return $this->lineNumber; - } - - /** - * Returns the column number (character position on a line) for this location object. - */ - public function getColumnNumber() : int - { - return $this->columnNumber; - } -} diff --git a/vendor/phpdocumentor/reflection-common/src/Project.php b/vendor/phpdocumentor/reflection-common/src/Project.php deleted file mode 100644 index 57839fd1..00000000 --- a/vendor/phpdocumentor/reflection-common/src/Project.php +++ /dev/null @@ -1,25 +0,0 @@ -create($docComment); -``` - -The `create` method will yield an object of type `\phpDocumentor\Reflection\DocBlock` -whose methods can be queried: - -```php -// Contains the summary for this DocBlock -$summary = $docblock->getSummary(); - -// Contains \phpDocumentor\Reflection\DocBlock\Description object -$description = $docblock->getDescription(); - -// You can either cast it to string -$description = (string) $docblock->getDescription(); - -// Or use the render method to get a string representation of the Description. -$description = $docblock->getDescription()->render(); -``` - -> For more examples it would be best to review the scripts in the [`/examples` folder](/examples). diff --git a/vendor/phpdocumentor/reflection-docblock/composer.json b/vendor/phpdocumentor/reflection-docblock/composer.json deleted file mode 100644 index d9076302..00000000 --- a/vendor/phpdocumentor/reflection-docblock/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "phpdocumentor/reflection-docblock", - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1", - "phpdocumentor/reflection-common": "^2.2", - "ext-filter": "*" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "phpDocumentor\\Reflection\\": ["tests/unit", "tests/integration"] - } - }, - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php deleted file mode 100644 index cc33e60e..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php +++ /dev/null @@ -1,228 +0,0 @@ -summary = $summary; - $this->description = $description ?: new DocBlock\Description(''); - foreach ($tags as $tag) { - $this->addTag($tag); - } - - $this->context = $context; - $this->location = $location; - - $this->isTemplateEnd = $isTemplateEnd; - $this->isTemplateStart = $isTemplateStart; - } - - public function getSummary(): string - { - return $this->summary; - } - - public function getDescription(): DocBlock\Description - { - return $this->description; - } - - /** - * Returns the current context. - */ - public function getContext(): ?Types\Context - { - return $this->context; - } - - /** - * Returns the current location. - */ - public function getLocation(): ?Location - { - return $this->location; - } - - /** - * Returns whether this DocBlock is the start of a Template section. - * - * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker - * (`#@+`) that is appended directly after the opening `/**` of a DocBlock. - * - * An example of such an opening is: - * - * ``` - * /**#@+ - * * My DocBlock - * * / - * ``` - * - * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all - * elements that follow until another DocBlock is found that contains the closing marker (`#@-`). - * - * @see self::isTemplateEnd() for the check whether a closing marker was provided. - */ - public function isTemplateStart(): bool - { - return $this->isTemplateStart; - } - - /** - * Returns whether this DocBlock is the end of a Template section. - * - * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality. - */ - public function isTemplateEnd(): bool - { - return $this->isTemplateEnd; - } - - /** - * Returns the tags for this DocBlock. - * - * @return Tag[] - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * Returns an array of tags matching the given name. If no tags are found - * an empty array is returned. - * - * @param string $name String to search by. - * - * @return Tag[] - */ - public function getTagsByName(string $name): array - { - $result = []; - - foreach ($this->getTags() as $tag) { - if ($tag->getName() !== $name) { - continue; - } - - $result[] = $tag; - } - - return $result; - } - - /** - * Returns an array of tags with type matching the given name. If no tags are found - * an empty array is returned. - * - * @param string $name String to search by. - * - * @return TagWithType[] - */ - public function getTagsWithTypeByName(string $name): array - { - $result = []; - - foreach ($this->getTagsByName($name) as $tag) { - if (!$tag instanceof TagWithType) { - continue; - } - - $result[] = $tag; - } - - return $result; - } - - /** - * Checks if a tag of a certain type is present in this DocBlock. - * - * @param string $name Tag name to check for. - */ - public function hasTag(string $name): bool - { - foreach ($this->getTags() as $tag) { - if ($tag->getName() === $name) { - return true; - } - } - - return false; - } - - /** - * Remove a tag from this DocBlock. - * - * @param Tag $tagToRemove The tag to remove. - */ - public function removeTag(Tag $tagToRemove): void - { - foreach ($this->tags as $key => $tag) { - if ($tag === $tagToRemove) { - unset($this->tags[$key]); - break; - } - } - } - - /** - * Adds a tag to this DocBlock. - * - * @param Tag $tag The tag to add. - */ - private function addTag(Tag $tag): void - { - $this->tags[] = $tag; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php deleted file mode 100644 index a31b2892..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php +++ /dev/null @@ -1,115 +0,0 @@ -create('This is a {@see Description}', $context); - * - * The description factory will interpret the given body and create a body template and list of tags from them, and pass - * that onto the constructor if this class. - * - * > The $context variable is a class of type {@see \phpDocumentor\Reflection\Types\Context} and contains the namespace - * > and the namespace aliases that apply to this DocBlock. These are used by the Factory to resolve and expand partial - * > type names and FQSENs. - * - * If you do not want to use the DescriptionFactory you can pass a body template and tag listing like this: - * - * $description = new Description( - * 'This is a %1$s', - * [ new See(new Fqsen('\phpDocumentor\Reflection\DocBlock\Description')) ] - * ); - * - * It is generally recommended to use the Factory as that will also apply escaping rules, while the Description object - * is mainly responsible for rendering. - * - * @see DescriptionFactory to create a new Description. - * @see Description\Formatter for the formatting of the body and tags. - */ -class Description -{ - /** @var string */ - private $bodyTemplate; - - /** @var Tag[] */ - private $tags; - - /** - * Initializes a Description with its body (template) and a listing of the tags used in the body template. - * - * @param Tag[] $tags - */ - public function __construct(string $bodyTemplate, array $tags = []) - { - $this->bodyTemplate = $bodyTemplate; - $this->tags = $tags; - } - - /** - * Returns the body template. - */ - public function getBodyTemplate(): string - { - return $this->bodyTemplate; - } - - /** - * Returns the tags for this DocBlock. - * - * @return Tag[] - */ - public function getTags(): array - { - return $this->tags; - } - - /** - * Renders this description as a string where the provided formatter will format the tags in the expected string - * format. - */ - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new PassthroughFormatter(); - } - - $tags = []; - foreach ($this->tags as $tag) { - $tags[] = '{' . $formatter->format($tag) . '}'; - } - - return vsprintf($this->bodyTemplate, $tags); - } - - /** - * Returns a plain string representation of this description. - */ - public function __toString(): string - { - return $this->render(); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php deleted file mode 100644 index 1a519ec4..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php +++ /dev/null @@ -1,178 +0,0 @@ -tagFactory = $tagFactory; - } - - /** - * Returns the parsed text of this description. - */ - public function create(string $contents, ?TypeContext $context = null): Description - { - $tokens = $this->lex($contents); - $count = count($tokens); - $tagCount = 0; - $tags = []; - - for ($i = 1; $i < $count; $i += 2) { - $tags[] = $this->tagFactory->create($tokens[$i], $context); - $tokens[$i] = '%' . ++$tagCount . '$s'; - } - - //In order to allow "literal" inline tags, the otherwise invalid - //sequence "{@}" is changed to "@", and "{}" is changed to "}". - //"%" is escaped to "%%" because of vsprintf. - //See unit tests for examples. - for ($i = 0; $i < $count; $i += 2) { - $tokens[$i] = str_replace(['{@}', '{}', '%'], ['@', '}', '%%'], $tokens[$i]); - } - - return new Description(implode('', $tokens), $tags); - } - - /** - * Strips the contents from superfluous whitespace and splits the description into a series of tokens. - * - * @return string[] A series of tokens of which the description text is composed. - */ - private function lex(string $contents): array - { - $contents = $this->removeSuperfluousStartingWhitespace($contents); - - // performance optimalization; if there is no inline tag, don't bother splitting it up. - if (strpos($contents, '{@') === false) { - return [$contents]; - } - - return Utils::pregSplit( - '/\{ - # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally. - (?!@\}) - # We want to capture the whole tag line, but without the inline tag delimiters. - (\@ - # Match everything up to the next delimiter. - [^{}]* - # Nested inline tag content should not be captured, or it will appear in the result separately. - (?: - # Match nested inline tags. - (?: - # Because we did not catch the tag delimiters earlier, we must be explicit with them here. - # Notice that this also matches "{}", as a way to later introduce it as an escape sequence. - \{(?1)?\} - | - # Make sure we match hanging "{". - \{ - ) - # Match content after the nested inline tag. - [^{}]* - )* # If there are more inline tags, match them as well. We use "*" since there may not be any - # nested inline tags. - ) - \}/Sux', - $contents, - 0, - PREG_SPLIT_DELIM_CAPTURE - ); - } - - /** - * Removes the superfluous from a multi-line description. - * - * When a description has more than one line then it can happen that the second and subsequent lines have an - * additional indentation. This is commonly in use with tags like this: - * - * {@}since 1.1.0 This is an example - * description where we have an - * indentation in the second and - * subsequent lines. - * - * If we do not normalize the indentation then we have superfluous whitespace on the second and subsequent - * lines and this may cause rendering issues when, for example, using a Markdown converter. - */ - private function removeSuperfluousStartingWhitespace(string $contents): string - { - $lines = Utils::pregSplit("/\r\n?|\n/", $contents); - - // if there is only one line then we don't have lines with superfluous whitespace and - // can use the contents as-is - if (count($lines) <= 1) { - return $contents; - } - - // determine how many whitespace characters need to be stripped - $startingSpaceCount = 9999999; - for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { - // lines with a no length do not count as they are not indented at all - if (trim($lines[$i]) === '') { - continue; - } - - // determine the number of prefixing spaces by checking the difference in line length before and after - // an ltrim - $startingSpaceCount = min($startingSpaceCount, strlen($lines[$i]) - strlen(ltrim($lines[$i]))); - } - - // strip the number of spaces from each line - if ($startingSpaceCount > 0) { - for ($i = 1, $iMax = count($lines); $i < $iMax; ++$i) { - $lines[$i] = substr($lines[$i], $startingSpaceCount); - } - } - - return implode("\n", $lines); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php deleted file mode 100644 index 6a6b4729..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php +++ /dev/null @@ -1,159 +0,0 @@ -getFilePath(); - - $file = $this->getExampleFileContents($filename); - if (!$file) { - return sprintf('** File not found : %s **', $filename); - } - - return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount())); - } - - /** - * Registers the project's root directory where an 'examples' folder can be expected. - */ - public function setSourceDirectory(string $directory = ''): void - { - $this->sourceDirectory = $directory; - } - - /** - * Returns the project's root directory where an 'examples' folder can be expected. - */ - public function getSourceDirectory(): string - { - return $this->sourceDirectory; - } - - /** - * Registers a series of directories that may contain examples. - * - * @param string[] $directories - */ - public function setExampleDirectories(array $directories): void - { - $this->exampleDirectories = $directories; - } - - /** - * Returns a series of directories that may contain examples. - * - * @return string[] - */ - public function getExampleDirectories(): array - { - return $this->exampleDirectories; - } - - /** - * Attempts to find the requested example file and returns its contents or null if no file was found. - * - * This method will try several methods in search of the given example file, the first one it encounters is - * returned: - * - * 1. Iterates through all examples folders for the given filename - * 2. Checks the source folder for the given filename - * 3. Checks the 'examples' folder in the current working directory for examples - * 4. Checks the path relative to the current working directory for the given filename - * - * @return string[] all lines of the example file - */ - private function getExampleFileContents(string $filename): ?array - { - $normalizedPath = null; - - foreach ($this->exampleDirectories as $directory) { - $exampleFileFromConfig = $this->constructExamplePath($directory, $filename); - if (is_readable($exampleFileFromConfig)) { - $normalizedPath = $exampleFileFromConfig; - break; - } - } - - if (!$normalizedPath) { - if (is_readable($this->getExamplePathFromSource($filename))) { - $normalizedPath = $this->getExamplePathFromSource($filename); - } elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) { - $normalizedPath = $this->getExamplePathFromExampleDirectory($filename); - } elseif (is_readable($filename)) { - $normalizedPath = $filename; - } - } - - $lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false; - - return $lines !== false ? $lines : null; - } - - /** - * Get example filepath based on the example directory inside your project. - */ - private function getExamplePathFromExampleDirectory(string $file): string - { - return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file; - } - - /** - * Returns a path to the example file in the given directory.. - */ - private function constructExamplePath(string $directory, string $file): string - { - return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file; - } - - /** - * Get example filepath based on sourcecode. - */ - private function getExamplePathFromSource(string $file): string - { - return sprintf( - '%s%s%s', - trim($this->getSourceDirectory(), '\\/'), - DIRECTORY_SEPARATOR, - trim($file, '"') - ); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php deleted file mode 100644 index 77e5fb5f..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php +++ /dev/null @@ -1,157 +0,0 @@ -indent = $indent; - $this->indentString = $indentString; - $this->isFirstLineIndented = $indentFirstLine; - $this->lineLength = $lineLength; - $this->tagFormatter = $tagFormatter ?: new PassthroughFormatter(); - $this->lineEnding = $lineEnding; - } - - /** - * Generate a DocBlock comment. - * - * @param DocBlock $docblock The DocBlock to serialize. - * - * @return string The serialized doc block. - */ - public function getDocComment(DocBlock $docblock): string - { - $indent = str_repeat($this->indentString, $this->indent); - $firstIndent = $this->isFirstLineIndented ? $indent : ''; - // 3 === strlen(' * ') - $wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null; - - $text = $this->removeTrailingSpaces( - $indent, - $this->addAsterisksForEachLine( - $indent, - $this->getSummaryAndDescriptionTextBlock($docblock, $wrapLength) - ) - ); - - $comment = $firstIndent . "/**\n"; - if ($text) { - $comment .= $indent . ' * ' . $text . "\n"; - $comment .= $indent . " *\n"; - } - - $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment); - - return str_replace("\n", $this->lineEnding, $comment . $indent . ' */'); - } - - private function removeTrailingSpaces(string $indent, string $text): string - { - return str_replace( - sprintf("\n%s * \n", $indent), - sprintf("\n%s *\n", $indent), - $text - ); - } - - private function addAsterisksForEachLine(string $indent, string $text): string - { - return str_replace( - "\n", - sprintf("\n%s * ", $indent), - $text - ); - } - - private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, ?int $wrapLength): string - { - $text = $docblock->getSummary() . ((string) $docblock->getDescription() ? "\n\n" . $docblock->getDescription() - : ''); - if ($wrapLength !== null) { - $text = wordwrap($text, $wrapLength); - - return $text; - } - - return $text; - } - - private function addTagBlock(DocBlock $docblock, ?int $wrapLength, string $indent, string $comment): string - { - foreach ($docblock->getTags() as $tag) { - $tagText = $this->tagFormatter->format($tag); - if ($wrapLength !== null) { - $tagText = wordwrap($tagText, $wrapLength); - } - - $tagText = str_replace( - "\n", - sprintf("\n%s * ", $indent), - $tagText - ); - - $comment .= sprintf("%s * %s\n", $indent, $tagText); - } - - return $comment; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php deleted file mode 100644 index 8d765951..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php +++ /dev/null @@ -1,348 +0,0 @@ - Important: each parameter in addition to the body variable for the `create` method must default to null, otherwise - * > it violates the constraint with the interface; it is recommended to use the {@see Assert::notNull()} method to - * > verify that a dependency is actually passed. - * - * This Factory also features a Service Locator component that is used to pass the right dependencies to the - * `create` method of a tag; each dependency should be registered as a service or as a parameter. - * - * When you want to use a Tag of your own with custom handling you need to call the `registerTagHandler` method, pass - * the name of the tag and a Fully Qualified Class Name pointing to a class that implements the Tag interface. - */ -final class StandardTagFactory implements TagFactory -{ - /** PCRE regular expression matching a tag name. */ - public const REGEX_TAGNAME = '[\w\-\_\\\\:]+'; - - /** - * @var array> An array with a tag as a key, and an - * FQCN to a class that handles it as an array value. - */ - private $tagHandlerMappings = [ - 'author' => Author::class, - 'covers' => Covers::class, - 'deprecated' => Deprecated::class, - // 'example' => '\phpDocumentor\Reflection\DocBlock\Tags\Example', - 'link' => LinkTag::class, - 'method' => Method::class, - 'param' => Param::class, - 'property-read' => PropertyRead::class, - 'property' => Property::class, - 'property-write' => PropertyWrite::class, - 'return' => Return_::class, - 'see' => SeeTag::class, - 'since' => Since::class, - 'source' => Source::class, - 'throw' => Throws::class, - 'throws' => Throws::class, - 'uses' => Uses::class, - 'var' => Var_::class, - 'version' => Version::class, - ]; - - /** - * @var array> An array with a anotation s a key, and an - * FQCN to a class that handles it as an array value. - */ - private $annotationMappings = []; - - /** - * @var ReflectionParameter[][] a lazy-loading cache containing parameters - * for each tagHandler that has been used. - */ - private $tagHandlerParameterCache = []; - - /** @var FqsenResolver */ - private $fqsenResolver; - - /** - * @var mixed[] an array representing a simple Service Locator where we can store parameters and - * services that can be inserted into the Factory Methods of Tag Handlers. - */ - private $serviceLocator = []; - - /** - * Initialize this tag factory with the means to resolve an FQSEN and optionally a list of tag handlers. - * - * If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property - * is used. - * - * @see self::registerTagHandler() to add a new tag handler to the existing default list. - * - * @param array> $tagHandlers - */ - public function __construct(FqsenResolver $fqsenResolver, ?array $tagHandlers = null) - { - $this->fqsenResolver = $fqsenResolver; - if ($tagHandlers !== null) { - $this->tagHandlerMappings = $tagHandlers; - } - - $this->addService($fqsenResolver, FqsenResolver::class); - } - - public function create(string $tagLine, ?TypeContext $context = null): Tag - { - if (!$context) { - $context = new TypeContext(''); - } - - [$tagName, $tagBody] = $this->extractTagParts($tagLine); - - return $this->createTag(trim($tagBody), $tagName, $context); - } - - /** - * @param mixed $value - */ - public function addParameter(string $name, $value): void - { - $this->serviceLocator[$name] = $value; - } - - public function addService(object $service, ?string $alias = null): void - { - $this->serviceLocator[$alias ?: get_class($service)] = $service; - } - - public function registerTagHandler(string $tagName, string $handler): void - { - Assert::stringNotEmpty($tagName); - Assert::classExists($handler); - Assert::implementsInterface($handler, Tag::class); - - if (strpos($tagName, '\\') && $tagName[0] !== '\\') { - throw new InvalidArgumentException( - 'A namespaced tag must have a leading backslash as it must be fully qualified' - ); - } - - $this->tagHandlerMappings[$tagName] = $handler; - } - - /** - * Extracts all components for a tag. - * - * @return string[] - */ - private function extractTagParts(string $tagLine): array - { - $matches = []; - if (!preg_match('/^@(' . self::REGEX_TAGNAME . ')((?:[\s\(\{])\s*([^\s].*)|$)/us', $tagLine, $matches)) { - throw new InvalidArgumentException( - 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' - ); - } - - if (count($matches) < 3) { - $matches[] = ''; - } - - return array_slice($matches, 1); - } - - /** - * Creates a new tag object with the given name and body or returns null if the tag name was recognized but the - * body was invalid. - */ - private function createTag(string $body, string $name, TypeContext $context): Tag - { - $handlerClassName = $this->findHandlerClassName($name, $context); - $arguments = $this->getArgumentsForParametersFromWiring( - $this->fetchParametersForHandlerFactoryMethod($handlerClassName), - $this->getServiceLocatorWithDynamicParameters($context, $name, $body) - ); - - try { - $callable = [$handlerClassName, 'create']; - Assert::isCallable($callable); - /** @phpstan-var callable(string): ?Tag $callable */ - $tag = call_user_func_array($callable, $arguments); - - return $tag ?? InvalidTag::create($body, $name); - } catch (InvalidArgumentException $e) { - return InvalidTag::create($body, $name)->withError($e); - } - } - - /** - * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`). - * - * @return class-string - */ - private function findHandlerClassName(string $tagName, TypeContext $context): string - { - $handlerClassName = Generic::class; - if (isset($this->tagHandlerMappings[$tagName])) { - $handlerClassName = $this->tagHandlerMappings[$tagName]; - } elseif ($this->isAnnotation($tagName)) { - // TODO: Annotation support is planned for a later stage and as such is disabled for now - $tagName = (string) $this->fqsenResolver->resolve($tagName, $context); - if (isset($this->annotationMappings[$tagName])) { - $handlerClassName = $this->annotationMappings[$tagName]; - } - } - - return $handlerClassName; - } - - /** - * Retrieves the arguments that need to be passed to the Factory Method with the given Parameters. - * - * @param ReflectionParameter[] $parameters - * @param mixed[] $locator - * - * @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters - * is provided with this method. - */ - private function getArgumentsForParametersFromWiring(array $parameters, array $locator): array - { - $arguments = []; - foreach ($parameters as $parameter) { - $type = $parameter->getType(); - $typeHint = null; - if ($type instanceof ReflectionNamedType) { - $typeHint = $type->getName(); - if ($typeHint === 'self') { - $declaringClass = $parameter->getDeclaringClass(); - if ($declaringClass !== null) { - $typeHint = $declaringClass->getName(); - } - } - } - - if (isset($locator[$typeHint])) { - $arguments[] = $locator[$typeHint]; - continue; - } - - $parameterName = $parameter->getName(); - if (isset($locator[$parameterName])) { - $arguments[] = $locator[$parameterName]; - continue; - } - - $arguments[] = null; - } - - return $arguments; - } - - /** - * Retrieves a series of ReflectionParameter objects for the static 'create' method of the given - * tag handler class name. - * - * @param class-string $handlerClassName - * - * @return ReflectionParameter[] - */ - private function fetchParametersForHandlerFactoryMethod(string $handlerClassName): array - { - if (!isset($this->tagHandlerParameterCache[$handlerClassName])) { - $methodReflection = new ReflectionMethod($handlerClassName, 'create'); - $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters(); - } - - return $this->tagHandlerParameterCache[$handlerClassName]; - } - - /** - * Returns a copy of this class' Service Locator with added dynamic parameters, - * such as the tag's name, body and Context. - * - * @param TypeContext $context The Context (namespace and aliasses) that may be - * passed and is used to resolve FQSENs. - * @param string $tagName The name of the tag that may be - * passed onto the factory method of the Tag class. - * @param string $tagBody The body of the tag that may be - * passed onto the factory method of the Tag class. - * - * @return mixed[] - */ - private function getServiceLocatorWithDynamicParameters( - TypeContext $context, - string $tagName, - string $tagBody - ): array { - return array_merge( - $this->serviceLocator, - [ - 'name' => $tagName, - 'body' => $tagBody, - TypeContext::class => $context, - ] - ); - } - - /** - * Returns whether the given tag belongs to an annotation. - * - * @todo this method should be populated once we implement Annotation notation support. - */ - private function isAnnotation(string $tagContent): bool - { - // 1. Contains a namespace separator - // 2. Contains parenthesis - // 3. Is present in a list of known annotations (make the algorithm smart by first checking is the last part - // of the annotation class name matches the found tag name - - return false; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php deleted file mode 100644 index 7cf07b4d..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php +++ /dev/null @@ -1,31 +0,0 @@ - $handler FQCN of handler. - * - * @throws InvalidArgumentException If the tag name is not a string. - * @throws InvalidArgumentException If the tag name is namespaced (contains backslashes) but - * does not start with a backslash. - * @throws InvalidArgumentException If the handler is not a string. - * @throws InvalidArgumentException If the handler is not an existing class. - * @throws InvalidArgumentException If the handler does not implement the {@see Tag} interface. - */ - public function registerTagHandler(string $tagName, string $handler): void; -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php deleted file mode 100644 index ae09ecf4..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php +++ /dev/null @@ -1,102 +0,0 @@ -authorName = $authorName; - $this->authorEmail = $authorEmail; - } - - /** - * Gets the author's name. - * - * @return string The author's name. - */ - public function getAuthorName(): string - { - return $this->authorName; - } - - /** - * Returns the author's email. - * - * @return string The author's email. - */ - public function getEmail(): string - { - return $this->authorEmail; - } - - /** - * Returns this tag in string form. - */ - public function __toString(): string - { - if ($this->authorEmail) { - $authorEmail = '<' . $this->authorEmail . '>'; - } else { - $authorEmail = ''; - } - - $authorName = $this->authorName; - - return $authorName . ($authorEmail !== '' ? ($authorName !== '' ? ' ' : '') . $authorEmail : ''); - } - - /** - * Attempts to create a new Author object based on the tag body. - */ - public static function create(string $body): ?self - { - $splitTagContent = preg_match('/^([^\<]*)(?:\<([^\>]*)\>)?$/u', $body, $matches); - if (!$splitTagContent) { - return null; - } - - $authorName = trim($matches[1]); - $email = isset($matches[2]) ? trim($matches[2]) : ''; - - return new static($authorName, $email); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php deleted file mode 100644 index a28d5bf9..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php +++ /dev/null @@ -1,53 +0,0 @@ -name; - } - - public function getDescription(): ?Description - { - return $this->description; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php deleted file mode 100644 index 3eff9d8b..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php +++ /dev/null @@ -1,101 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?FqsenResolver $resolver = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($descriptionFactory); - Assert::notNull($resolver); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - - return new static( - self::resolveFqsen($parts[0], $resolver, $context), - $descriptionFactory->create($parts[1] ?? '', $context) - ); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the structural element this tag refers to. - */ - public function getReference(): Fqsen - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php deleted file mode 100644 index dbcad28c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php +++ /dev/null @@ -1,109 +0,0 @@ -version = $version; - $this->description = $description; - } - - /** - * @return static - */ - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return new static( - null, - $descriptionFactory !== null ? $descriptionFactory->create($body, $context) : null - ); - } - - Assert::notNull($descriptionFactory); - - return new static( - $matches[1], - $descriptionFactory->create($matches[2] ?? '', $context) - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php deleted file mode 100644 index 825355aa..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php +++ /dev/null @@ -1,200 +0,0 @@ -filePath = $filePath; - $this->startingLine = $startingLine; - $this->lineCount = $lineCount; - if ($content !== null) { - $this->content = trim($content); - } - - $this->isURI = $isURI; - } - - public function getContent(): string - { - if ($this->content === null || $this->content === '') { - $filePath = $this->filePath; - if ($this->isURI) { - $filePath = $this->isUriRelative($this->filePath) - ? str_replace('%2F', '/', rawurlencode($this->filePath)) - : $this->filePath; - } - - return trim($filePath); - } - - return $this->content; - } - - public function getDescription(): ?string - { - return $this->content; - } - - public static function create(string $body): ?Tag - { - // File component: File path in quotes or File URI / Source information - if (!preg_match('/^\s*(?:(\"[^\"]+\")|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) { - return null; - } - - $filePath = null; - $fileUri = null; - if ($matches[1] !== '') { - $filePath = $matches[1]; - } else { - $fileUri = $matches[2]; - } - - $startingLine = 1; - $lineCount = 0; - $description = null; - - if (array_key_exists(3, $matches)) { - $description = $matches[3]; - - // Starting line / Number of lines / Description - if (preg_match('/^([1-9]\d*)(?:\s+((?1))\s*)?(.*)$/sux', $matches[3], $contentMatches)) { - $startingLine = (int) $contentMatches[1]; - if (isset($contentMatches[2])) { - $lineCount = (int) $contentMatches[2]; - } - - if (array_key_exists(3, $contentMatches)) { - $description = $contentMatches[3]; - } - } - } - - return new static( - $filePath ?? ($fileUri ?? ''), - $fileUri !== null, - $startingLine, - $lineCount, - $description - ); - } - - /** - * Returns the file path. - * - * @return string Path to a file to use as an example. - * May also be an absolute URI. - */ - public function getFilePath(): string - { - return trim($this->filePath, '"'); - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - $filePath = $this->filePath; - $isDefaultLine = $this->startingLine === 1 && $this->lineCount === 0; - $startingLine = !$isDefaultLine ? (string) $this->startingLine : ''; - $lineCount = !$isDefaultLine ? (string) $this->lineCount : ''; - $content = (string) $this->content; - - return $filePath - . ($startingLine !== '' - ? ($filePath !== '' ? ' ' : '') . $startingLine - : '') - . ($lineCount !== '' - ? ($filePath !== '' || $startingLine !== '' ? ' ' : '') . $lineCount - : '') - . ($content !== '' - ? ($filePath !== '' || $startingLine !== '' || $lineCount !== '' ? ' ' : '') . $content - : ''); - } - - /** - * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute). - */ - private function isUriRelative(string $uri): bool - { - return strpos($uri, ':') === false; - } - - public function getStartingLine(): int - { - return $this->startingLine; - } - - public function getLineCount(): int - { - return $this->lineCount; - } - - public function getName(): string - { - return 'example'; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php deleted file mode 100644 index f6f0bb5a..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php +++ /dev/null @@ -1,25 +0,0 @@ -maxLen = max($this->maxLen, strlen($tag->getName())); - } - } - - /** - * Formats the given tag to return a simple plain text version. - */ - public function format(Tag $tag): string - { - return '@' . $tag->getName() . - str_repeat( - ' ', - $this->maxLen - strlen($tag->getName()) + 1 - ) . - $tag; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php deleted file mode 100644 index 2afdfe55..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php +++ /dev/null @@ -1,30 +0,0 @@ -getName() . ' ' . $tag); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php deleted file mode 100644 index bc1ab10c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php +++ /dev/null @@ -1,89 +0,0 @@ -validateTagName($name); - - $this->name = $name; - $this->description = $description; - } - - /** - * Creates a new tag that represents any unknown tag type. - * - * @return static - */ - public static function create( - string $body, - string $name = '', - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($name); - Assert::notNull($descriptionFactory); - - $description = $body !== '' ? $descriptionFactory->create($body, $context) : null; - - return new static($name, $description); - } - - /** - * Returns the tag as a serialized string - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - return $description; - } - - /** - * Validates if the tag name matches the expected format, otherwise throws an exception. - */ - private function validateTagName(string $name): void - { - if (!preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) { - throw new InvalidArgumentException( - 'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, ' - . 'hyphens and backslashes.' - ); - } - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php deleted file mode 100644 index 4e6abb8c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/InvalidTag.php +++ /dev/null @@ -1,145 +0,0 @@ -name = $name; - $this->body = $body; - } - - public function getException(): ?Throwable - { - return $this->throwable; - } - - public function getName(): string - { - return $this->name; - } - - public static function create(string $body, string $name = ''): self - { - return new self($name, $body); - } - - public function withError(Throwable $exception): self - { - $this->flattenExceptionBacktrace($exception); - $tag = new self($this->name, $this->body); - $tag->throwable = $exception; - - return $tag; - } - - /** - * Removes all complex types from backtrace - * - * Not all objects are serializable. So we need to remove them from the - * stored exception to be sure that we do not break existing library usage. - */ - private function flattenExceptionBacktrace(Throwable $exception): void - { - $traceProperty = (new ReflectionClass(Exception::class))->getProperty('trace'); - $traceProperty->setAccessible(true); - - do { - $trace = $exception->getTrace(); - if (isset($trace[0]['args'])) { - $trace = array_map( - function (array $call): array { - $call['args'] = array_map([$this, 'flattenArguments'], $call['args'] ?? []); - - return $call; - }, - $trace - ); - } - - $traceProperty->setValue($exception, $trace); - $exception = $exception->getPrevious(); - } while ($exception !== null); - - $traceProperty->setAccessible(false); - } - - /** - * @param mixed $value - * - * @return mixed - * - * @throws ReflectionException - */ - private function flattenArguments($value) - { - if ($value instanceof Closure) { - $closureReflection = new ReflectionFunction($value); - $value = sprintf( - '(Closure at %s:%s)', - $closureReflection->getFileName(), - $closureReflection->getStartLine() - ); - } elseif (is_object($value)) { - $value = sprintf('object(%s)', get_class($value)); - } elseif (is_resource($value)) { - $value = sprintf('resource(%s)', get_resource_type($value)); - } elseif (is_array($value)) { - $value = array_map([$this, 'flattenArguments'], $value); - } - - return $value; - } - - public function render(?Formatter $formatter = null): string - { - if ($formatter === null) { - $formatter = new Formatter\PassthroughFormatter(); - } - - return $formatter->format($this); - } - - public function __toString(): string - { - return $this->body; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php deleted file mode 100644 index ee242e3b..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php +++ /dev/null @@ -1,78 +0,0 @@ -link = $link; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; - - return new static($parts[0], $description); - } - - /** - * Gets the link - */ - public function getLink(): string - { - return $this->link; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $link = $this->link; - - return $link . ($description !== '' ? ($link !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php deleted file mode 100644 index f08bfffd..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php +++ /dev/null @@ -1,279 +0,0 @@ - - * @var array> - */ - private $arguments; - - /** @var bool */ - private $isStatic; - - /** @var Type */ - private $returnType; - - /** - * @param array> $arguments - * @phpstan-param array $arguments - */ - public function __construct( - string $methodName, - array $arguments = [], - ?Type $returnType = null, - bool $static = false, - ?Description $description = null - ) { - Assert::stringNotEmpty($methodName); - - if ($returnType === null) { - $returnType = new Void_(); - } - - $this->methodName = $methodName; - $this->arguments = $this->filterArguments($arguments); - $this->returnType = $returnType; - $this->isStatic = $static; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - // 1. none or more whitespace - // 2. optionally the keyword "static" followed by whitespace - // 3. optionally a word with underscores followed by whitespace : as - // type for the return value - // 4. then optionally a word with underscores followed by () and - // whitespace : as method name as used by phpDocumentor - // 5. then a word with underscores, followed by ( and any character - // until a ) and whitespace : as method name with signature - // 6. any remaining text : as description - if ( - !preg_match( - '/^ - # Static keyword - # Declares a static method ONLY if type is also present - (?: - (static) - \s+ - )? - # Return type - (?: - ( - (?:[\w\|_\\\\]*\$this[\w\|_\\\\]*) - | - (?: - (?:[\w\|_\\\\]+) - # array notation - (?:\[\])* - )*+ - ) - \s+ - )? - # Method name - ([\w_]+) - # Arguments - (?: - \(([^\)]*)\) - )? - \s* - # Description - (.*) - $/sux', - $body, - $matches - ) - ) { - return null; - } - - [, $static, $returnType, $methodName, $argumentLines, $description] = $matches; - - $static = $static === 'static'; - - if ($returnType === '') { - $returnType = 'void'; - } - - $returnType = $typeResolver->resolve($returnType, $context); - $description = $descriptionFactory->create($description, $context); - - /** @phpstan-var array $arguments */ - $arguments = []; - if ($argumentLines !== '') { - $argumentsExploded = explode(',', $argumentLines); - foreach ($argumentsExploded as $argument) { - $argument = explode(' ', self::stripRestArg(trim($argument)), 2); - if (strpos($argument[0], '$') === 0) { - $argumentName = substr($argument[0], 1); - $argumentType = new Mixed_(); - } else { - $argumentType = $typeResolver->resolve($argument[0], $context); - $argumentName = ''; - if (isset($argument[1])) { - $argument[1] = self::stripRestArg($argument[1]); - $argumentName = substr($argument[1], 1); - } - } - - $arguments[] = ['name' => $argumentName, 'type' => $argumentType]; - } - } - - return new static($methodName, $arguments, $returnType, $static, $description); - } - - /** - * Retrieves the method name. - */ - public function getMethodName(): string - { - return $this->methodName; - } - - /** - * @return array> - * @phpstan-return array - */ - public function getArguments(): array - { - return $this->arguments; - } - - /** - * Checks whether the method tag describes a static method or not. - * - * @return bool TRUE if the method declaration is for a static method, FALSE otherwise. - */ - public function isStatic(): bool - { - return $this->isStatic; - } - - public function getReturnType(): Type - { - return $this->returnType; - } - - public function __toString(): string - { - $arguments = []; - foreach ($this->arguments as $argument) { - $arguments[] = $argument['type'] . ' $' . $argument['name']; - } - - $argumentStr = '(' . implode(', ', $arguments) . ')'; - - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $static = $this->isStatic ? 'static' : ''; - - $returnType = (string) $this->returnType; - - $methodName = $this->methodName; - - return $static - . ($returnType !== '' ? ($static !== '' ? ' ' : '') . $returnType : '') - . ($methodName !== '' ? ($static !== '' || $returnType !== '' ? ' ' : '') . $methodName : '') - . $argumentStr - . ($description !== '' ? ' ' . $description : ''); - } - - /** - * @param mixed[][]|string[] $arguments - * @phpstan-param array $arguments - * - * @return mixed[][] - * @phpstan-return array - */ - private function filterArguments(array $arguments = []): array - { - $result = []; - foreach ($arguments as $argument) { - if (is_string($argument)) { - $argument = ['name' => $argument]; - } - - if (!isset($argument['type'])) { - $argument['type'] = new Mixed_(); - } - - $keys = array_keys($argument); - sort($keys); - if ($keys !== ['name', 'type']) { - throw new InvalidArgumentException( - 'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true) - ); - } - - $result[] = $argument; - } - - return $result; - } - - private static function stripRestArg(string $argument): string - { - if (strpos($argument, '...') === 0) { - $argument = trim(substr($argument, 3)); - } - - return $argument; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php deleted file mode 100644 index 3399649b..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php +++ /dev/null @@ -1,174 +0,0 @@ -name = 'param'; - $this->variableName = $variableName; - $this->type = $type; - $this->isVariadic = $isVariadic; - $this->description = $description; - $this->isReference = $isReference; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - $isVariadic = false; - $isReference = false; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && !self::strStartsWithVariable($firstPart)) { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ or ...$ or &$ or &...$ it must be the variable name - if (isset($parts[0]) && self::strStartsWithVariable($parts[0])) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - if (strpos($variableName, '$') === 0) { - $variableName = substr($variableName, 1); - } elseif (strpos($variableName, '&$') === 0) { - $isReference = true; - $variableName = substr($variableName, 2); - } elseif (strpos($variableName, '...$') === 0) { - $isVariadic = true; - $variableName = substr($variableName, 4); - } elseif (strpos($variableName, '&...$') === 0) { - $isVariadic = true; - $isReference = true; - $variableName = substr($variableName, 5); - } - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $isVariadic, $description, $isReference); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns whether this tag is variadic. - */ - public function isVariadic(): bool - { - return $this->isVariadic; - } - - /** - * Returns whether this tag is passed by reference. - */ - public function isReference(): bool - { - return $this->isReference; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $variableName = ''; - if ($this->variableName) { - $variableName .= ($this->isReference ? '&' : '') . ($this->isVariadic ? '...' : ''); - $variableName .= '$' . $this->variableName; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } - - private static function strStartsWithVariable(string $str): bool - { - return strpos($str, '$') === 0 - || - strpos($str, '...$') === 0 - || - strpos($str, '&$') === 0 - || - strpos($str, '&...$') === 0; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php deleted file mode 100644 index 2521fb3f..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php deleted file mode 100644 index 9491b39c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property-read'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php deleted file mode 100644 index 2bfdac6a..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php +++ /dev/null @@ -1,121 +0,0 @@ -name = 'property-write'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - $type = null; - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php deleted file mode 100644 index 532003dd..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php +++ /dev/null @@ -1,38 +0,0 @@ -fqsen = $fqsen; - } - - /** - * @return string string representation of the referenced fqsen - */ - public function __toString(): string - { - return (string) $this->fqsen; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php deleted file mode 100644 index e7dea868..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php +++ /dev/null @@ -1,22 +0,0 @@ -uri = $uri; - } - - public function __toString(): string - { - return $this->uri; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php deleted file mode 100644 index f021b609..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php +++ /dev/null @@ -1,64 +0,0 @@ -name = 'return'; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$type, $description] = self::extractTypeFromBody($body); - - $type = $typeResolver->resolve($type, $context); - $description = $descriptionFactory->create($description, $context); - - return new static($type, $description); - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $type = $this->type ? '' . $this->type : 'mixed'; - - return $type . ($description !== '' ? ' ' . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php deleted file mode 100644 index a194c7de..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php +++ /dev/null @@ -1,106 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?FqsenResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null; - - // https://tools.ietf.org/html/rfc2396#section-3 - if (preg_match('#\w://\w#', $parts[0])) { - return new static(new Url($parts[0]), $description); - } - - return new static(new FqsenRef(self::resolveFqsen($parts[0], $typeResolver, $context)), $description); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the ref of this tag. - */ - public function getReference(): Reference - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php deleted file mode 100644 index 54af43cd..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php +++ /dev/null @@ -1,103 +0,0 @@ -version = $version; - $this->description = $description; - } - - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return null; - } - - Assert::notNull($descriptionFactory); - - return new static( - $matches[1], - $descriptionFactory->create($matches[2] ?? '', $context) - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php deleted file mode 100644 index 8b8c0fb4..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php +++ /dev/null @@ -1,116 +0,0 @@ -startingLine = (int) $startingLine; - $this->lineCount = $lineCount !== null ? (int) $lineCount : null; - $this->description = $description; - } - - public static function create( - string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($descriptionFactory); - - $startingLine = 1; - $lineCount = null; - $description = null; - - // Starting line / Number of lines / Description - if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) { - $startingLine = (int) $matches[1]; - if (isset($matches[2]) && $matches[2] !== '') { - $lineCount = (int) $matches[2]; - } - - $description = $matches[3]; - } - - return new static($startingLine, $lineCount, $descriptionFactory->create($description ?? '', $context)); - } - - /** - * Gets the starting line. - * - * @return int The starting line, relative to the structural element's - * location. - */ - public function getStartingLine(): int - { - return $this->startingLine; - } - - /** - * Returns the number of lines. - * - * @return int|null The number of lines, relative to the starting line. NULL - * means "to the end". - */ - public function getLineCount(): ?int - { - return $this->lineCount; - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $startingLine = (string) $this->startingLine; - - $lineCount = $this->lineCount !== null ? ' ' . $this->lineCount : ''; - - return $startingLine - . $lineCount - . ($description !== '' - ? ' ' . $description - : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php deleted file mode 100644 index 158578bd..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/TagWithType.php +++ /dev/null @@ -1,66 +0,0 @@ -type; - } - - /** - * @return string[] - */ - protected static function extractTypeFromBody(string $body): array - { - $type = ''; - $nestingLevel = 0; - for ($i = 0, $iMax = strlen($body); $i < $iMax; $i++) { - $character = $body[$i]; - - if ($nestingLevel === 0 && trim($character) === '') { - break; - } - - $type .= $character; - if (in_array($character, ['<', '(', '[', '{'])) { - $nestingLevel++; - continue; - } - - if (in_array($character, ['>', ')', ']', '}'])) { - $nestingLevel--; - continue; - } - } - - $description = trim(substr($body, strlen($type))); - - return [$type, $description]; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php deleted file mode 100644 index f21c9101..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php +++ /dev/null @@ -1,64 +0,0 @@ -name = 'throws'; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$type, $description] = self::extractTypeFromBody($body); - - $type = $typeResolver->resolve($type, $context); - $description = $descriptionFactory->create($description, $context); - - return new static($type, $description); - } - - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $type = (string) $this->type; - - return $type . ($description !== '' ? ($type !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php deleted file mode 100644 index b72f4034..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php +++ /dev/null @@ -1,100 +0,0 @@ -refers = $refers; - $this->description = $description; - } - - public static function create( - string $body, - ?FqsenResolver $resolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::notNull($resolver); - Assert::notNull($descriptionFactory); - - $parts = Utils::pregSplit('/\s+/Su', $body, 2); - - return new static( - self::resolveFqsen($parts[0], $resolver, $context), - $descriptionFactory->create($parts[1] ?? '', $context) - ); - } - - private static function resolveFqsen(string $parts, ?FqsenResolver $fqsenResolver, ?TypeContext $context): Fqsen - { - Assert::notNull($fqsenResolver); - $fqsenParts = explode('::', $parts); - $resolved = $fqsenResolver->resolve($fqsenParts[0], $context); - - if (!array_key_exists(1, $fqsenParts)) { - return $resolved; - } - - return new Fqsen($resolved . '::' . $fqsenParts[1]); - } - - /** - * Returns the structural element this tag refers to. - */ - public function getReference(): Fqsen - { - return $this->refers; - } - - /** - * Returns a string representation of this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $refers = (string) $this->refers; - - return $refers . ($description !== '' ? ($refers !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php deleted file mode 100644 index fa1f9dbf..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php +++ /dev/null @@ -1,122 +0,0 @@ -name = 'var'; - $this->variableName = $variableName; - $this->type = $type; - $this->description = $description; - } - - public static function create( - string $body, - ?TypeResolver $typeResolver = null, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): self { - Assert::stringNotEmpty($body); - Assert::notNull($typeResolver); - Assert::notNull($descriptionFactory); - - [$firstPart, $body] = self::extractTypeFromBody($body); - - $parts = Utils::pregSplit('/(\s+)/Su', $body, 2, PREG_SPLIT_DELIM_CAPTURE); - $type = null; - $variableName = ''; - - // if the first item that is encountered is not a variable; it is a type - if ($firstPart && $firstPart[0] !== '$') { - $type = $typeResolver->resolve($firstPart, $context); - } else { - // first part is not a type; we should prepend it to the parts array for further processing - array_unshift($parts, $firstPart); - } - - // if the next item starts with a $ it must be the variable name - if (isset($parts[0]) && strpos($parts[0], '$') === 0) { - $variableName = array_shift($parts); - if ($type) { - array_shift($parts); - } - - Assert::notNull($variableName); - - $variableName = substr($variableName, 1); - } - - $description = $descriptionFactory->create(implode('', $parts), $context); - - return new static($variableName, $type, $description); - } - - /** - * Returns the variable's name. - */ - public function getVariableName(): ?string - { - return $this->variableName; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - if ($this->variableName) { - $variableName = '$' . $this->variableName; - } else { - $variableName = ''; - } - - $type = (string) $this->type; - - return $type - . ($variableName !== '' ? ($type !== '' ? ' ' : '') . $variableName : '') - . ($description !== '' ? ($type !== '' || $variableName !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php deleted file mode 100644 index f46e4b8c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php +++ /dev/null @@ -1,106 +0,0 @@ -version = $version; - $this->description = $description; - } - - public static function create( - ?string $body, - ?DescriptionFactory $descriptionFactory = null, - ?TypeContext $context = null - ): ?self { - if (empty($body)) { - return new static(); - } - - $matches = []; - if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) { - return null; - } - - $description = null; - if ($descriptionFactory !== null) { - $description = $descriptionFactory->create($matches[2] ?? '', $context); - } - - return new static( - $matches[1], - $description - ); - } - - /** - * Gets the version section of the tag. - */ - public function getVersion(): ?string - { - return $this->version; - } - - /** - * Returns a string representation for this tag. - */ - public function __toString(): string - { - if ($this->description) { - $description = $this->description->render(); - } else { - $description = ''; - } - - $version = (string) $this->version; - - return $version . ($description !== '' ? ($version !== '' ? ' ' : '') . $description : ''); - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php deleted file mode 100644 index 37f72dd2..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php +++ /dev/null @@ -1,287 +0,0 @@ -descriptionFactory = $descriptionFactory; - $this->tagFactory = $tagFactory; - } - - /** - * Factory method for easy instantiation. - * - * @param array> $additionalTags - */ - public static function createInstance(array $additionalTags = []): self - { - $fqsenResolver = new FqsenResolver(); - $tagFactory = new StandardTagFactory($fqsenResolver); - $descriptionFactory = new DescriptionFactory($tagFactory); - - $tagFactory->addService($descriptionFactory); - $tagFactory->addService(new TypeResolver($fqsenResolver)); - - $docBlockFactory = new self($descriptionFactory, $tagFactory); - foreach ($additionalTags as $tagName => $tagHandler) { - $docBlockFactory->registerTagHandler($tagName, $tagHandler); - } - - return $docBlockFactory; - } - - /** - * @param object|string $docblock A string containing the DocBlock to parse or an object supporting the - * getDocComment method (such as a ReflectionClass object). - */ - public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock - { - if (is_object($docblock)) { - if (!method_exists($docblock, 'getDocComment')) { - $exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method'; - - throw new InvalidArgumentException($exceptionMessage); - } - - $docblock = $docblock->getDocComment(); - Assert::string($docblock); - } - - Assert::stringNotEmpty($docblock); - - if ($context === null) { - $context = new Types\Context(''); - } - - $parts = $this->splitDocBlock($this->stripDocComment($docblock)); - - [$templateMarker, $summary, $description, $tags] = $parts; - - return new DocBlock( - $summary, - $description ? $this->descriptionFactory->create($description, $context) : null, - $this->parseTagBlock($tags, $context), - $context, - $location, - $templateMarker === '#@+', - $templateMarker === '#@-' - ); - } - - /** - * @param class-string $handler - */ - public function registerTagHandler(string $tagName, string $handler): void - { - $this->tagFactory->registerTagHandler($tagName, $handler); - } - - /** - * Strips the asterisks from the DocBlock comment. - * - * @param string $comment String containing the comment text. - */ - private function stripDocComment(string $comment): string - { - $comment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]?(.*)?#u', '$1', $comment); - Assert::string($comment); - $comment = trim($comment); - - // reg ex above is not able to remove */ from a single line docblock - if (substr($comment, -2) === '*/') { - $comment = trim(substr($comment, 0, -2)); - } - - return str_replace(["\r\n", "\r"], "\n", $comment); - } - - // phpcs:disable - /** - * Splits the DocBlock into a template marker, summary, description and block of tags. - * - * @param string $comment Comment to split into the sub-parts. - * - * @return string[] containing the template marker (if any), summary, description and a string containing the tags. - * - * @author Mike van Riel for extending the regex with template marker support. - * - * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. - */ - private function splitDocBlock(string $comment) : array - { - // phpcs:enable - // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This - // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the - // performance impact of running a regular expression - if (strpos($comment, '@') === 0) { - return ['', '', '', $comment]; - } - - // clears all extra horizontal whitespace from the line endings to prevent parsing issues - $comment = preg_replace('/\h*$/Sum', '', $comment); - Assert::string($comment); - /* - * Splits the docblock into a template marker, summary, description and tags section. - * - * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may - * occur after it and will be stripped). - * - The short description is started from the first character until a dot is encountered followed by a - * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing - * errors). This is optional. - * - The long description, any character until a new line is encountered followed by an @ and word - * characters (a tag). This is optional. - * - Tags; the remaining characters - * - * Big thanks to RichardJ for contributing this Regular Expression - */ - preg_match( - '/ - \A - # 1. Extract the template marker - (?:(\#\@\+|\#\@\-)\n?)? - - # 2. Extract the summary - (?: - (?! @\pL ) # The summary may not start with an @ - ( - [^\n.]+ - (?: - (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines - [\n.]* (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line - [^\n.]+ # Include anything else - )* - \.? - )? - ) - - # 3. Extract the description - (?: - \s* # Some form of whitespace _must_ precede a description because a summary must be there - (?! @\pL ) # The description may not start with an @ - ( - [^\n]+ - (?: \n+ - (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line - [^\n]+ # Include anything else - )* - ) - )? - - # 4. Extract the tags (anything that follows) - (\s+ [\s\S]*)? # everything that follows - /ux', - $comment, - $matches - ); - array_shift($matches); - - while (count($matches) < 4) { - $matches[] = ''; - } - - return $matches; - } - - /** - * Creates the tag objects. - * - * @param string $tags Tag block to parse. - * @param Types\Context $context Context of the parsed Tag - * - * @return DocBlock\Tag[] - */ - private function parseTagBlock(string $tags, Types\Context $context): array - { - $tags = $this->filterTagBlock($tags); - if ($tags === null) { - return []; - } - - $result = []; - $lines = $this->splitTagBlockIntoTagLines($tags); - foreach ($lines as $key => $tagLine) { - $result[$key] = $this->tagFactory->create(trim($tagLine), $context); - } - - return $result; - } - - /** - * @return string[] - */ - private function splitTagBlockIntoTagLines(string $tags): array - { - $result = []; - foreach (explode("\n", $tags) as $tagLine) { - if ($tagLine !== '' && strpos($tagLine, '@') === 0) { - $result[] = $tagLine; - } else { - $result[count($result) - 1] .= "\n" . $tagLine; - } - } - - return $result; - } - - private function filterTagBlock(string $tags): ?string - { - $tags = trim($tags); - if (!$tags) { - return null; - } - - if ($tags[0] !== '@') { - // @codeCoverageIgnoreStart - // Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that - // we didn't foresee. - - throw new LogicException('A tag block started with text instead of an at-sign(@): ' . $tags); - - // @codeCoverageIgnoreEnd - } - - return $tags; - } -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php deleted file mode 100644 index 9995c0c0..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -> $additionalTags - */ - public static function createInstance(array $additionalTags = []): DocBlockFactory; - - /** - * @param string|object $docblock - */ - public function create($docblock, ?Types\Context $context = null, ?Location $location = null): DocBlock; -} diff --git a/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php b/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php deleted file mode 100644 index b8b6da8c..00000000 --- a/vendor/phpdocumentor/reflection-docblock/src/Exception/PcreException.php +++ /dev/null @@ -1,44 +0,0 @@ - please note that if you want to pass partial class names that additional steps are necessary, see the - > chapter `Resolving partial classes and FQSENs` for more information. - -Where the FqsenResolver can resolve: - -- Constant expressions (i.e. `@see \MyNamespace\MY_CONSTANT`) -- Function expressions (i.e. `@see \MyNamespace\myFunction()`) -- Class expressions (i.e. `@see \MyNamespace\MyClass`) -- Interface expressions (i.e. `@see \MyNamespace\MyInterface`) -- Trait expressions (i.e. `@see \MyNamespace\MyTrait`) -- Class constant expressions (i.e. `@see \MyNamespace\MyClass::MY_CONSTANT`) -- Property expressions (i.e. `@see \MyNamespace\MyClass::$myProperty`) -- Method expressions (i.e. `@see \MyNamespace\MyClass::myMethod()`) - -## Resolving a type - -In order to resolve a type you will have to instantiate the class `\phpDocumentor\Reflection\TypeResolver` and call its `resolve` method like this: - -```php -$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); -$type = $typeResolver->resolve('string|integer'); -``` - -In this example you will receive a Value Object of class `\phpDocumentor\Reflection\Types\Compound` that has two -elements, one of type `\phpDocumentor\Reflection\Types\String_` and one of type -`\phpDocumentor\Reflection\Types\Integer`. - -The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. - -### Resolving nullable types - -Php 7.1 introduced nullable types e.g. `?string`. Type resolver will resolve the original type without the nullable notation `?` -just like it would do without the `?`. After that the type is wrapped in a `\phpDocumentor\Reflection\Types\Nullable` object. -The `Nullable` type has a method to fetch the actual type. - -## Resolving an FQSEN - -A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this: - -```php -$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); -$fqsen = $fqsenResolver->resolve('\phpDocumentor\Reflection\FqsenResolver::resolve()'); -``` - -In this example we resolve a Fully Qualified Structural Element Name (meaning that it includes the full namespace, class name and element name) and receive a Value Object of type `\phpDocumentor\Reflection\Fqsen`. - -The real power of this resolver is in its capability to expand partial element names into Fully Qualified Structural Element Names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply. - -## Resolving partial Classes and Structural Element Names - -Perhaps the best feature of this library is that it knows how to resolve partial class names into fully qualified class names. - -For example, you have this file: - -```php -namespace My\Example; - -use phpDocumentor\Reflection\Types; - -class Classy -{ - /** - * @var Types\Context - * @see Classy::otherFunction() - */ - public function __construct($context) {} - - public function otherFunction(){} -} -``` - -Suppose that you would want to resolve (and expand) the type in the `@var` tag and the element name in the `@see` tag. - -For the resolvers to know how to expand partial names you have to provide a bit of _Context_ for them by instantiating a new class named `\phpDocumentor\Reflection\Types\Context` with the name of the namespace and the aliases that are in play. - -### Creating a Context - -You can do this by manually creating a Context like this: - -```php -$context = new \phpDocumentor\Reflection\Types\Context( - '\My\Example', - [ 'Types' => '\phpDocumentor\Reflection\Types'] -); -``` - -Or by using the `\phpDocumentor\Reflection\Types\ContextFactory` to instantiate a new context based on a Reflector object or by providing the namespace that you'd like to extract and the source code of the file in which the given type expression occurs. - -```php -$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); -$context = $contextFactory->createFromReflector(new ReflectionMethod('\My\Example\Classy', '__construct')); -``` - -or - -```php -$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory(); -$context = $contextFactory->createForNamespace('\My\Example', file_get_contents('My/Example/Classy.php')); -``` - -### Using the Context - -After you have obtained a Context it is just a matter of passing it along with the `resolve` method of either Resolver class as second argument and the Resolvers will take this into account when resolving partial names. - -To obtain the resolved class name for the `@var` tag in the example above you can do: - -```php -$typeResolver = new \phpDocumentor\Reflection\TypeResolver(); -$type = $typeResolver->resolve('Types\Context', $context); -``` - -When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be `phpDocumentor\Reflection\Types\Context`. - -> Why is the FQSEN wrapped in another object `Object_`? -> -> The resolve method of the TypeResolver only returns object with the interface `Type` and the FQSEN is a common type that does not represent a Type. Also: in some cases a type can represent an "Untyped Object", meaning that it is an object (signified by the `object` keyword) but does not refer to a specific element using an FQSEN. - -Another example is on how to resolve the FQSEN of a method as can be seen with the `@see` tag in the example above. To resolve that you can do the following: - -```php -$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver(); -$type = $fqsenResolver->resolve('Classy::otherFunction()', $context); -``` - -Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the `resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to `\My\Example\Classy::otherFunction()`. diff --git a/vendor/phpdocumentor/type-resolver/composer.json b/vendor/phpdocumentor/type-resolver/composer.json deleted file mode 100644 index 4dbf6237..00000000 --- a/vendor/phpdocumentor/type-resolver/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "phpdocumentor/type-resolver", - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "phpDocumentor\\Reflection\\": ["tests/unit", "tests/benchmark"] - } - }, - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php b/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php deleted file mode 100644 index 068fa208..00000000 --- a/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php +++ /dev/null @@ -1,80 +0,0 @@ -isFqsen($fqsen)) { - return new Fqsen($fqsen); - } - - return $this->resolvePartialStructuralElementName($fqsen, $context); - } - - /** - * Tests whether the given type is a Fully Qualified Structural Element Name. - */ - private function isFqsen(string $type): bool - { - return strpos($type, self::OPERATOR_NAMESPACE) === 0; - } - - /** - * Resolves a partial Structural Element Name (i.e. `Reflection\DocBlock`) to its FQSEN representation - * (i.e. `\phpDocumentor\Reflection\DocBlock`) based on the Namespace and aliases mentioned in the Context. - * - * @throws InvalidArgumentException When type is not a valid FQSEN. - */ - private function resolvePartialStructuralElementName(string $type, Context $context): Fqsen - { - $typeParts = explode(self::OPERATOR_NAMESPACE, $type, 2); - - $namespaceAliases = $context->getNamespaceAliases(); - - // if the first segment is not an alias; prepend namespace name and return - if (!isset($namespaceAliases[$typeParts[0]])) { - $namespace = $context->getNamespace(); - if ($namespace !== '') { - $namespace .= self::OPERATOR_NAMESPACE; - } - - return new Fqsen(self::OPERATOR_NAMESPACE . $namespace . $type); - } - - $typeParts[0] = $namespaceAliases[$typeParts[0]]; - - return new Fqsen(self::OPERATOR_NAMESPACE . implode(self::OPERATOR_NAMESPACE, $typeParts)); - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/PseudoType.php b/vendor/phpdocumentor/type-resolver/src/PseudoType.php deleted file mode 100644 index dd91ed79..00000000 --- a/vendor/phpdocumentor/type-resolver/src/PseudoType.php +++ /dev/null @@ -1,19 +0,0 @@ -minValue = $minValue; - $this->maxValue = $maxValue; - } - - public function underlyingType(): Type - { - return new Integer(); - } - - public function getMinValue(): string - { - return $this->minValue; - } - - public function getMaxValue(): string - { - return $this->maxValue; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return 'int<' . $this->minValue . ', ' . $this->maxValue . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php b/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php deleted file mode 100644 index f9f0c6b5..00000000 --- a/vendor/phpdocumentor/type-resolver/src/PseudoTypes/List_.php +++ /dev/null @@ -1,50 +0,0 @@ -valueType instanceof Mixed_) { - return 'list'; - } - - return 'list<' . $this->valueType . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php b/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php deleted file mode 100644 index 690f782b..00000000 --- a/vendor/phpdocumentor/type-resolver/src/PseudoTypes/LiteralString.php +++ /dev/null @@ -1,39 +0,0 @@ - List of recognized keywords and unto which Value Object they map - * @psalm-var array> - */ - private $keywords = [ - 'string' => Types\String_::class, - 'class-string' => Types\ClassString::class, - 'interface-string' => Types\InterfaceString::class, - 'html-escaped-string' => PseudoTypes\HtmlEscapedString::class, - 'lowercase-string' => PseudoTypes\LowercaseString::class, - 'non-empty-lowercase-string' => PseudoTypes\NonEmptyLowercaseString::class, - 'non-empty-string' => PseudoTypes\NonEmptyString::class, - 'numeric-string' => PseudoTypes\NumericString::class, - 'numeric' => PseudoTypes\Numeric_::class, - 'trait-string' => PseudoTypes\TraitString::class, - 'int' => Types\Integer::class, - 'integer' => Types\Integer::class, - 'positive-int' => PseudoTypes\PositiveInteger::class, - 'negative-int' => PseudoTypes\NegativeInteger::class, - 'bool' => Types\Boolean::class, - 'boolean' => Types\Boolean::class, - 'real' => Types\Float_::class, - 'float' => Types\Float_::class, - 'double' => Types\Float_::class, - 'object' => Types\Object_::class, - 'mixed' => Types\Mixed_::class, - 'array' => Types\Array_::class, - 'array-key' => Types\ArrayKey::class, - 'resource' => Types\Resource_::class, - 'void' => Types\Void_::class, - 'null' => Types\Null_::class, - 'scalar' => Types\Scalar::class, - 'callback' => Types\Callable_::class, - 'callable' => Types\Callable_::class, - 'callable-string' => PseudoTypes\CallableString::class, - 'false' => PseudoTypes\False_::class, - 'true' => PseudoTypes\True_::class, - 'literal-string' => PseudoTypes\LiteralString::class, - 'self' => Types\Self_::class, - '$this' => Types\This::class, - 'static' => Types\Static_::class, - 'parent' => Types\Parent_::class, - 'iterable' => Types\Iterable_::class, - 'never' => Types\Never_::class, - 'list' => PseudoTypes\List_::class, - ]; - - /** - * @var FqsenResolver - * @psalm-readonly - */ - private $fqsenResolver; - - /** - * Initializes this TypeResolver with the means to create and resolve Fqsen objects. - */ - public function __construct(?FqsenResolver $fqsenResolver = null) - { - $this->fqsenResolver = $fqsenResolver ?: new FqsenResolver(); - } - - /** - * Analyzes the given type and returns the FQCN variant. - * - * When a type is provided this method checks whether it is not a keyword or - * Fully Qualified Class Name. If so it will use the given namespace and - * aliases to expand the type to a FQCN representation. - * - * This method only works as expected if the namespace and aliases are set; - * no dynamic reflection is being performed here. - * - * @uses Context::getNamespaceAliases() to check whether the first part of the relative type name should not be - * replaced with another namespace. - * @uses Context::getNamespace() to determine with what to prefix the type name. - * - * @param string $type The relative or absolute type. - */ - public function resolve(string $type, ?Context $context = null): Type - { - $type = trim($type); - if (!$type) { - throw new InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty'); - } - - if ($context === null) { - $context = new Context(''); - } - - // split the type string into tokens `|`, `?`, `<`, `>`, `,`, `(`, `)`, `[]`, '<', '>' and type names - $tokens = preg_split( - '/(\\||\\?|<|>|&|, ?|\\(|\\)|\\[\\]+)/', - $type, - -1, - PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE - ); - - if ($tokens === false) { - throw new InvalidArgumentException('Unable to split the type string "' . $type . '" into tokens'); - } - - /** @var ArrayIterator $tokenIterator */ - $tokenIterator = new ArrayIterator($tokens); - - return $this->parseTypes($tokenIterator, $context, self::PARSER_IN_COMPOUND); - } - - /** - * Analyse each tokens and creates types - * - * @param ArrayIterator $tokens the iterator on tokens - * @param int $parserContext on of self::PARSER_* constants, indicating - * the context where we are in the parsing - */ - private function parseTypes(ArrayIterator $tokens, Context $context, int $parserContext): Type - { - $types = []; - $token = ''; - $compoundToken = '|'; - while ($tokens->valid()) { - $token = $tokens->current(); - if ($token === null) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - if ($token === '|' || $token === '&') { - if (count($types) === 0) { - throw new RuntimeException( - 'A type is missing before a type separator' - ); - } - - if ( - !in_array($parserContext, [ - self::PARSER_IN_COMPOUND, - self::PARSER_IN_ARRAY_EXPRESSION, - self::PARSER_IN_COLLECTION_EXPRESSION, - ], true) - ) { - throw new RuntimeException( - 'Unexpected type separator' - ); - } - - $compoundToken = $token; - $tokens->next(); - } elseif ($token === '?') { - if ( - !in_array($parserContext, [ - self::PARSER_IN_COMPOUND, - self::PARSER_IN_ARRAY_EXPRESSION, - self::PARSER_IN_COLLECTION_EXPRESSION, - ], true) - ) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - $tokens->next(); - $type = $this->parseTypes($tokens, $context, self::PARSER_IN_NULLABLE); - $types[] = new Nullable($type); - } elseif ($token === '(') { - $tokens->next(); - $type = $this->parseTypes($tokens, $context, self::PARSER_IN_ARRAY_EXPRESSION); - - $token = $tokens->current(); - if ($token === null) { // Someone did not properly close their array expression .. - break; - } - - $tokens->next(); - - $resolvedType = new Expression($type); - - $types[] = $resolvedType; - } elseif ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION && isset($token[0]) && $token[0] === ')') { - break; - } elseif ($token === '<') { - if (count($types) === 0) { - throw new RuntimeException( - 'Unexpected collection operator "<", class name is missing' - ); - } - - $classType = array_pop($types); - if ($classType !== null) { - if ((string) $classType === 'class-string') { - $types[] = $this->resolveClassString($tokens, $context); - } elseif ((string) $classType === 'int') { - $types[] = $this->resolveIntRange($tokens); - } elseif ((string) $classType === 'interface-string') { - $types[] = $this->resolveInterfaceString($tokens, $context); - } else { - $types[] = $this->resolveCollection($tokens, $classType, $context); - } - } - - $tokens->next(); - } elseif ( - $parserContext === self::PARSER_IN_COLLECTION_EXPRESSION - && ($token === '>' || trim($token) === ',') - ) { - break; - } elseif ($token === self::OPERATOR_ARRAY) { - end($types); - $last = key($types); - if ($last === null) { - throw new InvalidArgumentException('Unexpected array operator'); - } - - $lastItem = $types[$last]; - if ($lastItem instanceof Expression) { - $lastItem = $lastItem->getValueType(); - } - - $types[$last] = new Array_($lastItem); - - $tokens->next(); - } else { - $type = $this->resolveSingleType($token, $context); - $tokens->next(); - if ($parserContext === self::PARSER_IN_NULLABLE) { - return $type; - } - - $types[] = $type; - } - } - - if ($token === '|' || $token === '&') { - throw new RuntimeException( - 'A type is missing after a type separator' - ); - } - - if (count($types) === 0) { - if ($parserContext === self::PARSER_IN_NULLABLE) { - throw new RuntimeException( - 'A type is missing after a nullable character' - ); - } - - if ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION) { - throw new RuntimeException( - 'A type is missing in an array expression' - ); - } - - if ($parserContext === self::PARSER_IN_COLLECTION_EXPRESSION) { - throw new RuntimeException( - 'A type is missing in a collection expression' - ); - } - } elseif (count($types) === 1) { - return current($types); - } - - if ($compoundToken === '|') { - return new Compound(array_values($types)); - } - - return new Intersection(array_values($types)); - } - - /** - * resolve the given type into a type object - * - * @param string $type the type string, representing a single type - * - * @return Type|Array_|Object_ - * - * @psalm-mutation-free - */ - private function resolveSingleType(string $type, Context $context): object - { - switch (true) { - case $this->isKeyword($type): - return $this->resolveKeyword($type); - - case $this->isFqsen($type): - return $this->resolveTypedObject($type); - - case $this->isPartialStructuralElementName($type): - return $this->resolveTypedObject($type, $context); - - // @codeCoverageIgnoreStart - default: - // I haven't got the foggiest how the logic would come here but added this as a defense. - throw new RuntimeException( - 'Unable to resolve type "' . $type . '", there is no known method to resolve it' - ); - } - - // @codeCoverageIgnoreEnd - } - - /** - * Adds a keyword to the list of Keywords and associates it with a specific Value Object. - * - * @psalm-param class-string $typeClassName - */ - public function addKeyword(string $keyword, string $typeClassName): void - { - if (!class_exists($typeClassName)) { - throw new InvalidArgumentException( - 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' - . ' but we could not find the class ' . $typeClassName - ); - } - - $interfaces = class_implements($typeClassName); - if ($interfaces === false) { - throw new InvalidArgumentException( - 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class' - . ' but we could not find the class ' . $typeClassName - ); - } - - if (!in_array(Type::class, $interfaces, true)) { - throw new InvalidArgumentException( - 'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"' - ); - } - - $this->keywords[$keyword] = $typeClassName; - } - - /** - * Detects whether the given type represents a PHPDoc keyword. - * - * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. - * - * @psalm-mutation-free - */ - private function isKeyword(string $type): bool - { - return array_key_exists(strtolower($type), $this->keywords); - } - - /** - * Detects whether the given type represents a relative structural element name. - * - * @param string $type A relative or absolute type as defined in the phpDocumentor documentation. - * - * @psalm-mutation-free - */ - private function isPartialStructuralElementName(string $type): bool - { - return (isset($type[0]) && $type[0] !== self::OPERATOR_NAMESPACE) && !$this->isKeyword($type); - } - - /** - * Tests whether the given type is a Fully Qualified Structural Element Name. - * - * @psalm-mutation-free - */ - private function isFqsen(string $type): bool - { - return strpos($type, self::OPERATOR_NAMESPACE) === 0; - } - - /** - * Resolves the given keyword (such as `string`) into a Type object representing that keyword. - * - * @psalm-mutation-free - */ - private function resolveKeyword(string $type): Type - { - $className = $this->keywords[strtolower($type)]; - - return new $className(); - } - - /** - * Resolves the given FQSEN string into an FQSEN object. - * - * @psalm-mutation-free - */ - private function resolveTypedObject(string $type, ?Context $context = null): Object_ - { - return new Object_($this->fqsenResolver->resolve($type, $context)); - } - - /** - * Resolves class string - * - * @param ArrayIterator $tokens - */ - private function resolveClassString(ArrayIterator $tokens, Context $context): Type - { - $tokens->next(); - - $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - - if (!$classType instanceof Object_ || $classType->getFqsen() === null) { - throw new RuntimeException( - $classType . ' is not a class string' - ); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'class-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - return new ClassString($classType->getFqsen()); - } - - /** - * Resolves integer ranges - * - * @param ArrayIterator $tokens - */ - private function resolveIntRange(ArrayIterator $tokens): Type - { - $tokens->next(); - - $token = ''; - $minValue = null; - $maxValue = null; - $commaFound = false; - $tokenCounter = 0; - while ($tokens->valid()) { - $tokenCounter++; - $token = $tokens->current(); - if ($token === null) { - throw new RuntimeException( - 'Unexpected nullable character' - ); - } - - $token = trim($token); - - if ($token === '>') { - break; - } - - if ($token === ',') { - $commaFound = true; - } - - if ($commaFound === false && $minValue === null) { - if (is_numeric($token) || $token === 'max' || $token === 'min') { - $minValue = $token; - } - } - - if ($commaFound === true && $maxValue === null) { - if (is_numeric($token) || $token === 'max' || $token === 'min') { - $maxValue = $token; - } - } - - $tokens->next(); - } - - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'interface-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - if ($minValue === null || $maxValue === null || $tokenCounter > 4) { - throw new RuntimeException( - 'int has not the correct format' - ); - } - - return new IntegerRange($minValue, $maxValue); - } - - /** - * Resolves class string - * - * @param ArrayIterator $tokens - */ - private function resolveInterfaceString(ArrayIterator $tokens, Context $context): Type - { - $tokens->next(); - - $classType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - - if (!$classType instanceof Object_ || $classType->getFqsen() === null) { - throw new RuntimeException( - $classType . ' is not a interface string' - ); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'interface-string: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - return new InterfaceString($classType->getFqsen()); - } - - /** - * Resolves the collection values and keys - * - * @param ArrayIterator $tokens - * - * @return Array_|Iterable_|Collection - */ - private function resolveCollection(ArrayIterator $tokens, Type $classType, Context $context): Type - { - $isArray = ((string) $classType === 'array'); - $isIterable = ((string) $classType === 'iterable'); - $isList = ((string) $classType === 'list'); - - // allow only "array", "iterable" or class name before "<" - if ( - !$isArray && !$isIterable && !$isList - && (!$classType instanceof Object_ || $classType->getFqsen() === null) - ) { - throw new RuntimeException( - $classType . ' is not a collection' - ); - } - - $tokens->next(); - - $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - $keyType = null; - - $token = $tokens->current(); - if ($token !== null && trim($token) === ',' && !$isList) { - // if we have a comma, then we just parsed the key type, not the value type - $keyType = $valueType; - if ($isArray) { - // check the key type for an "array" collection. We allow only - // strings or integers. - if ( - !$keyType instanceof ArrayKey && - !$keyType instanceof String_ && - !$keyType instanceof Integer && - !$keyType instanceof Compound - ) { - throw new RuntimeException( - 'An array can have only integers or strings as keys' - ); - } - - if ($keyType instanceof Compound) { - foreach ($keyType->getIterator() as $item) { - if ( - !$item instanceof ArrayKey && - !$item instanceof String_ && - !$item instanceof Integer - ) { - throw new RuntimeException( - 'An array can have only integers or strings as keys' - ); - } - } - } - } - - $tokens->next(); - // now let's parse the value type - $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION); - } - - $token = $tokens->current(); - if ($token !== '>') { - if (empty($token)) { - throw new RuntimeException( - 'Collection: ">" is missing' - ); - } - - throw new RuntimeException( - 'Unexpected character "' . $token . '", ">" is missing' - ); - } - - if ($isArray) { - return new Array_($valueType, $keyType); - } - - if ($isIterable) { - return new Iterable_($valueType, $keyType); - } - - if ($isList) { - return new List_($valueType); - } - - if ($classType instanceof Object_) { - return $this->makeCollectionFromObject($classType, $valueType, $keyType); - } - - throw new RuntimeException('Invalid $classType provided'); - } - - /** - * @psalm-pure - */ - private function makeCollectionFromObject(Object_ $object, Type $valueType, ?Type $keyType = null): Collection - { - return new Collection($object->getFqsen(), $valueType, $keyType); - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php b/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php deleted file mode 100644 index b674862a..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php +++ /dev/null @@ -1,83 +0,0 @@ -valueType = $valueType; - $this->defaultKeyType = new Compound([new String_(), new Integer()]); - $this->keyType = $keyType; - } - - /** - * Returns the type for the keys of this array. - */ - public function getKeyType(): Type - { - return $this->keyType ?? $this->defaultKeyType; - } - - /** - * Returns the value for the keys of this array. - */ - public function getValueType(): Type - { - return $this->valueType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->keyType) { - return 'array<' . $this->keyType . ',' . $this->valueType . '>'; - } - - if ($this->valueType instanceof Mixed_) { - return 'array'; - } - - if ($this->valueType instanceof Compound) { - return '(' . $this->valueType . ')[]'; - } - - return $this->valueType . '[]'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php b/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php deleted file mode 100644 index 472a1cdc..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/AggregatedType.php +++ /dev/null @@ -1,125 +0,0 @@ - - */ -abstract class AggregatedType implements Type, IteratorAggregate -{ - /** - * @psalm-allow-private-mutation - * @var array - */ - private $types = []; - - /** @var string */ - private $token; - - /** - * @param array $types - */ - public function __construct(array $types, string $token) - { - foreach ($types as $type) { - $this->add($type); - } - - $this->token = $token; - } - - /** - * Returns the type at the given index. - */ - public function get(int $index): ?Type - { - if (!$this->has($index)) { - return null; - } - - return $this->types[$index]; - } - - /** - * Tests if this compound type has a type with the given index. - */ - public function has(int $index): bool - { - return array_key_exists($index, $this->types); - } - - /** - * Tests if this compound type contains the given type. - */ - public function contains(Type $type): bool - { - foreach ($this->types as $typePart) { - // if the type is duplicate; do not add it - if ((string) $typePart === (string) $type) { - return true; - } - } - - return false; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return implode($this->token, $this->types); - } - - /** - * @return ArrayIterator - */ - public function getIterator(): ArrayIterator - { - return new ArrayIterator($this->types); - } - - /** - * @psalm-suppress ImpureMethodCall - */ - private function add(Type $type): void - { - if ($type instanceof self) { - foreach ($type->getIterator() as $subType) { - $this->add($subType); - } - - return; - } - - // if the type is duplicate; do not add it - if ($this->contains($type)) { - return; - } - - $this->types[] = $type; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php b/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php deleted file mode 100644 index cf86df00..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/ArrayKey.php +++ /dev/null @@ -1,42 +0,0 @@ -fqsen = $fqsen; - } - - public function underlyingType(): Type - { - return new String_(); - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->fqsen === null) { - return 'class-string'; - } - - return 'class-string<' . (string) $this->fqsen . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Collection.php b/vendor/phpdocumentor/type-resolver/src/Types/Collection.php deleted file mode 100644 index 943cc22e..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Collection.php +++ /dev/null @@ -1,68 +0,0 @@ -` - * 2. `ACollectionObject` - * - * - ACollectionObject can be 'array' or an object that can act as an array - * - aValueType and aKeyType can be any type expression - * - * @psalm-immutable - */ -final class Collection extends AbstractList -{ - /** @var Fqsen|null */ - private $fqsen; - - /** - * Initializes this representation of an array with the given Type or Fqsen. - */ - public function __construct(?Fqsen $fqsen, Type $valueType, ?Type $keyType = null) - { - parent::__construct($valueType, $keyType); - - $this->fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - $objectType = (string) ($this->fqsen ?? 'object'); - - if ($this->keyType === null) { - return $objectType . '<' . $this->valueType . '>'; - } - - return $objectType . '<' . $this->keyType . ',' . $this->valueType . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Compound.php b/vendor/phpdocumentor/type-resolver/src/Types/Compound.php deleted file mode 100644 index ad426cc2..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Compound.php +++ /dev/null @@ -1,38 +0,0 @@ - $types - */ - public function __construct(array $types) - { - parent::__construct($types, '|'); - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Context.php b/vendor/phpdocumentor/type-resolver/src/Types/Context.php deleted file mode 100644 index 79aadaf8..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Context.php +++ /dev/null @@ -1,95 +0,0 @@ - Fully Qualified Namespace. - * @psalm-var array - */ - private $namespaceAliases; - - /** - * Initializes the new context and normalizes all passed namespaces to be in Qualified Namespace Name (QNN) - * format (without a preceding `\`). - * - * @param string $namespace The namespace where this DocBlock resides in. - * @param string[] $namespaceAliases List of namespace aliases => Fully Qualified Namespace. - * @psalm-param array $namespaceAliases - */ - public function __construct(string $namespace, array $namespaceAliases = []) - { - $this->namespace = $namespace !== 'global' && $namespace !== 'default' - ? trim($namespace, '\\') - : ''; - - foreach ($namespaceAliases as $alias => $fqnn) { - if ($fqnn[0] === '\\') { - $fqnn = substr($fqnn, 1); - } - - if ($fqnn[strlen($fqnn) - 1] === '\\') { - $fqnn = substr($fqnn, 0, -1); - } - - $namespaceAliases[$alias] = $fqnn; - } - - $this->namespaceAliases = $namespaceAliases; - } - - /** - * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in. - */ - public function getNamespace(): string - { - return $this->namespace; - } - - /** - * Returns a list of Qualified Namespace Names (thus without `\` in front) that are imported, the keys represent - * the alias for the imported Namespace. - * - * @return string[] - * @psalm-return array - */ - public function getNamespaceAliases(): array - { - return $this->namespaceAliases; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php b/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php deleted file mode 100644 index 892ee0f9..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php +++ /dev/null @@ -1,420 +0,0 @@ - $reflector */ - - return $this->createFromReflectionClass($reflector); - } - - if ($reflector instanceof ReflectionParameter) { - return $this->createFromReflectionParameter($reflector); - } - - if ($reflector instanceof ReflectionMethod) { - return $this->createFromReflectionMethod($reflector); - } - - if ($reflector instanceof ReflectionProperty) { - return $this->createFromReflectionProperty($reflector); - } - - if ($reflector instanceof ReflectionClassConstant) { - return $this->createFromReflectionClassConstant($reflector); - } - - throw new UnexpectedValueException('Unhandled \Reflector instance given: ' . get_class($reflector)); - } - - private function createFromReflectionParameter(ReflectionParameter $parameter): Context - { - $class = $parameter->getDeclaringClass(); - if (!$class) { - throw new InvalidArgumentException('Unable to get class of ' . $parameter->getName()); - } - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionMethod(ReflectionMethod $method): Context - { - $class = $method->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionProperty(ReflectionProperty $property): Context - { - $class = $property->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - private function createFromReflectionClassConstant(ReflectionClassConstant $constant): Context - { - //phpcs:ignore SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable - /** @phpstan-var ReflectionClass $class */ - $class = $constant->getDeclaringClass(); - - return $this->createFromReflectionClass($class); - } - - /** - * @phpstan-param ReflectionClass $class - */ - private function createFromReflectionClass(ReflectionClass $class): Context - { - $fileName = $class->getFileName(); - $namespace = $class->getNamespaceName(); - - if (is_string($fileName) && file_exists($fileName)) { - $contents = file_get_contents($fileName); - if ($contents === false) { - throw new RuntimeException('Unable to read file "' . $fileName . '"'); - } - - return $this->createForNamespace($namespace, $contents); - } - - return new Context($namespace, []); - } - - /** - * Build a Context for a namespace in the provided file contents. - * - * @see Context for more information on Contexts. - * - * @param string $namespace It does not matter if a `\` precedes the namespace name, - * this method first normalizes. - * @param string $fileContents The file's contents to retrieve the aliases from with the given namespace. - */ - public function createForNamespace(string $namespace, string $fileContents): Context - { - $namespace = trim($namespace, '\\'); - $useStatements = []; - $currentNamespace = ''; - $tokens = new ArrayIterator(token_get_all($fileContents)); - - while ($tokens->valid()) { - $currentToken = $tokens->current(); - switch ($currentToken[0]) { - case T_NAMESPACE: - $currentNamespace = $this->parseNamespace($tokens); - break; - case T_CLASS: - // Fast-forward the iterator through the class so that any - // T_USE tokens found within are skipped - these are not - // valid namespace use statements so should be ignored. - $braceLevel = 0; - $firstBraceFound = false; - while ($tokens->valid() && ($braceLevel > 0 || !$firstBraceFound)) { - $currentToken = $tokens->current(); - if ( - $currentToken === '{' - || in_array($currentToken[0], [T_CURLY_OPEN, T_DOLLAR_OPEN_CURLY_BRACES], true) - ) { - if (!$firstBraceFound) { - $firstBraceFound = true; - } - - ++$braceLevel; - } - - if ($currentToken === '}') { - --$braceLevel; - } - - $tokens->next(); - } - - break; - case T_USE: - if ($currentNamespace === $namespace) { - $useStatements += $this->parseUseStatement($tokens); - } - - break; - } - - $tokens->next(); - } - - return new Context($namespace, $useStatements); - } - - /** - * Deduce the name from tokens when we are at the T_NAMESPACE token. - * - * @param ArrayIterator $tokens - */ - private function parseNamespace(ArrayIterator $tokens): string - { - // skip to the first string or namespace separator - $this->skipToNextStringOrNamespaceSeparator($tokens); - - $name = ''; - $acceptedTokens = [T_STRING, T_NS_SEPARATOR, T_NAME_QUALIFIED]; - while ($tokens->valid() && in_array($tokens->current()[0], $acceptedTokens, true)) { - $name .= $tokens->current()[1]; - $tokens->next(); - } - - return $name; - } - - /** - * Deduce the names of all imports when we are at the T_USE token. - * - * @param ArrayIterator $tokens - * - * @return string[] - * @psalm-return array - */ - private function parseUseStatement(ArrayIterator $tokens): array - { - $uses = []; - - while ($tokens->valid()) { - $this->skipToNextStringOrNamespaceSeparator($tokens); - - $uses += $this->extractUseStatements($tokens); - $currentToken = $tokens->current(); - if ($currentToken[0] === self::T_LITERAL_END_OF_USE) { - return $uses; - } - } - - return $uses; - } - - /** - * Fast-forwards the iterator as longs as we don't encounter a T_STRING or T_NS_SEPARATOR token. - * - * @param ArrayIterator $tokens - */ - private function skipToNextStringOrNamespaceSeparator(ArrayIterator $tokens): void - { - while ($tokens->valid()) { - $currentToken = $tokens->current(); - if (in_array($currentToken[0], [T_STRING, T_NS_SEPARATOR], true)) { - break; - } - - if ($currentToken[0] === T_NAME_QUALIFIED) { - break; - } - - if (defined('T_NAME_FULLY_QUALIFIED') && $currentToken[0] === T_NAME_FULLY_QUALIFIED) { - break; - } - - $tokens->next(); - } - } - - /** - * Deduce the namespace name and alias of an import when we are at the T_USE token or have not reached the end of - * a USE statement yet. This will return a key/value array of the alias => namespace. - * - * @param ArrayIterator $tokens - * - * @return string[] - * @psalm-return array - * - * @psalm-suppress TypeDoesNotContainType - */ - private function extractUseStatements(ArrayIterator $tokens): array - { - $extractedUseStatements = []; - $groupedNs = ''; - $currentNs = ''; - $currentAlias = ''; - $state = 'start'; - - while ($tokens->valid()) { - $currentToken = $tokens->current(); - $tokenId = is_string($currentToken) ? $currentToken : $currentToken[0]; - $tokenValue = is_string($currentToken) ? null : $currentToken[1]; - switch ($state) { - case 'start': - switch ($tokenId) { - case T_STRING: - case T_NS_SEPARATOR: - $currentNs .= (string) $tokenValue; - $currentAlias = $tokenValue; - break; - case T_NAME_QUALIFIED: - case T_NAME_FULLY_QUALIFIED: - $currentNs .= (string) $tokenValue; - $currentAlias = substr( - (string) $tokenValue, - (int) (strrpos((string) $tokenValue, '\\')) + 1 - ); - break; - case T_CURLY_OPEN: - case '{': - $state = 'grouped'; - $groupedNs = $currentNs; - break; - case T_AS: - $state = 'start-alias'; - break; - case self::T_LITERAL_USE_SEPARATOR: - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'start-alias': - switch ($tokenId) { - case T_STRING: - $currentAlias = $tokenValue; - break; - case self::T_LITERAL_USE_SEPARATOR: - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'grouped': - switch ($tokenId) { - case T_STRING: - case T_NS_SEPARATOR: - $currentNs .= (string) $tokenValue; - $currentAlias = $tokenValue; - break; - case T_AS: - $state = 'grouped-alias'; - break; - case self::T_LITERAL_USE_SEPARATOR: - $state = 'grouped'; - $extractedUseStatements[(string) $currentAlias] = $currentNs; - $currentNs = $groupedNs; - $currentAlias = ''; - break; - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - - break; - case 'grouped-alias': - switch ($tokenId) { - case T_STRING: - $currentAlias = $tokenValue; - break; - case self::T_LITERAL_USE_SEPARATOR: - $state = 'grouped'; - $extractedUseStatements[(string) $currentAlias] = $currentNs; - $currentNs = $groupedNs; - $currentAlias = ''; - break; - case self::T_LITERAL_END_OF_USE: - $state = 'end'; - break; - default: - break; - } - } - - if ($state === 'end') { - break; - } - - $tokens->next(); - } - - if ($groupedNs !== $currentNs) { - $extractedUseStatements[(string) $currentAlias] = $currentNs; - } - - return $extractedUseStatements; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Expression.php b/vendor/phpdocumentor/type-resolver/src/Types/Expression.php deleted file mode 100644 index da5f65d5..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Expression.php +++ /dev/null @@ -1,51 +0,0 @@ -valueType = $valueType; - } - - /** - * Returns the value for the keys of this array. - */ - public function getValueType(): Type - { - return $this->valueType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return '(' . $this->valueType . ')'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Float_.php b/vendor/phpdocumentor/type-resolver/src/Types/Float_.php deleted file mode 100644 index 86138c0e..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Float_.php +++ /dev/null @@ -1,32 +0,0 @@ -fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - if ($this->fqsen === null) { - return 'interface-string'; - } - - return 'interface-string<' . (string) $this->fqsen . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php b/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php deleted file mode 100644 index ced37b62..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Intersection.php +++ /dev/null @@ -1,37 +0,0 @@ - $types - */ - public function __construct(array $types) - { - parent::__construct($types, '&'); - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php b/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php deleted file mode 100644 index 1ca069f2..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Iterable_.php +++ /dev/null @@ -1,38 +0,0 @@ -keyType) { - return 'iterable<' . $this->keyType . ',' . $this->valueType . '>'; - } - - if ($this->valueType instanceof Mixed_) { - return 'iterable'; - } - - return 'iterable<' . $this->valueType . '>'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php b/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php deleted file mode 100644 index 56d1b6da..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Mixed_.php +++ /dev/null @@ -1,32 +0,0 @@ -realType = $realType; - } - - /** - * Provide access to the actual type directly, if needed. - */ - public function getActualType(): Type - { - return $this->realType; - } - - /** - * Returns a rendered output of the Type as it would be used in a DocBlock. - */ - public function __toString(): string - { - return '?' . $this->realType->__toString(); - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Object_.php b/vendor/phpdocumentor/type-resolver/src/Types/Object_.php deleted file mode 100644 index 90dee57a..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Object_.php +++ /dev/null @@ -1,69 +0,0 @@ -fqsen = $fqsen; - } - - /** - * Returns the FQSEN associated with this object. - */ - public function getFqsen(): ?Fqsen - { - return $this->fqsen; - } - - public function __toString(): string - { - if ($this->fqsen) { - return (string) $this->fqsen; - } - - return 'object'; - } -} diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php b/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php deleted file mode 100644 index 34838599..00000000 --- a/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php +++ /dev/null @@ -1,34 +0,0 @@ - -Copyright (c) 2013 Marcello Duarte - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/phpspec/prophecy/README.md b/vendor/phpspec/prophecy/README.md deleted file mode 100644 index fbb58f69..00000000 --- a/vendor/phpspec/prophecy/README.md +++ /dev/null @@ -1,411 +0,0 @@ -# Prophecy - -[![Stable release](https://poser.pugx.org/phpspec/prophecy/version.svg)](https://packagist.org/packages/phpspec/prophecy) -[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy) - -Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking -framework. Though initially it was created to fulfil phpspec2 needs, it is flexible -enough to be used inside any testing framework out there with minimal effort. - -## A simple example - -```php -prophet->prophesize('App\Security\Hasher'); - $user = new App\Entity\User($hasher->reveal()); - - $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass'); - - $user->setPassword('qwerty'); - - $this->assertEquals('hashed_pass', $user->getPassword()); - } - - protected function setUp() - { - $this->prophet = new \Prophecy\Prophet; - } - - protected function tearDown() - { - $this->prophet->checkPredictions(); - } -} -``` - -## Installation - -### Prerequisites - -Prophecy requires PHP 7.2.0 or greater. - -### Setup through composer - -First, add Prophecy to the list of dependencies inside your `composer.json`: - -```json -{ - "require-dev": { - "phpspec/prophecy": "~1.0" - } -} -``` - -Then simply install it with composer: - -```bash -$> composer install --prefer-dist -``` - -You can read more about Composer on its [official webpage](http://getcomposer.org). - -## How to use it - -First of all, in Prophecy every word has a logical meaning, even the name of the library -itself (Prophecy). When you start feeling that, you'll become very fluid with this -tool. - -For example, Prophecy has been named that way because it concentrates on describing the future -behavior of objects with very limited knowledge about them. But as with any other prophecy, -those object prophecies can't create themselves - there should be a Prophet: - -```php -$prophet = new Prophecy\Prophet; -``` - -The Prophet creates prophecies by *prophesizing* them: - -```php -$prophecy = $prophet->prophesize(); -``` - -The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes, -that's your specific object prophecy, which describes how your object would behave -in the near future. But first, you need to specify which object you're talking about, -right? - -```php -$prophecy->willExtend('stdClass'); -$prophecy->willImplement('SessionHandlerInterface'); -``` - -There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells -object prophecy that our object should extend a specific class. The second one says that -it should implement some interface. Obviously, objects in PHP can implement multiple -interfaces, but extend only one parent class. - -### Dummies - -Ok, now we have our object prophecy. What can we do with it? First of all, we can get -our object *dummy* by revealing its prophecy: - -```php -$dummy = $prophecy->reveal(); -``` - -The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend -and/or implement preset classes/interfaces by overriding all their public methods. The key -point about dummies is that they do not hold any logic - they just do nothing. Any method -of the dummy will always return `null` and the dummy will never throw any exceptions. -Dummy is your friend if you don't care about the actual behavior of this double and just need -a token object to satisfy a method typehint. - -You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still -assigned to `$prophecy` variable and in order to manipulate with your expectations, you -should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your -prophecy. - -### Stubs - -Ok, now we know how to create basic prophecies and reveal dummies from them. That's -awesome if we don't care about our _doubles_ (objects that reflect originals) -interactions. If we do, we need to use *stubs* or *mocks*. - -A stub is an object double, which doesn't have any expectations about the object behavior, -but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic, -but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called -method signature does different things (has logic). To create stubs in Prophecy: - -```php -$prophecy->read('123')->willReturn('value'); -``` - -Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this -call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific -method with arguments prophecy. Method prophecies give you the ability to create method -promises or predictions. We'll talk about method predictions later in the _Mocks_ section. - -#### Promises - -Promises are logical blocks, that represent your fictional methods in prophecy terms -and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method. -As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple -shortcut to: - -```php -$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value'))); -``` - -This promise will cause any call to our double's `read()` method with exactly one -argument - `'123'` to always return `'value'`. But that's only for this -promise, there's plenty others you can use: - -- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call -- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call -- `ThrowPromise` or `->willThrow($exception)` - causes the method to throw specific exception -- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic - -Keep in mind, that you can always add even more promises by implementing -`Prophecy\Promise\PromiseInterface`. - -#### Method prophecies idempotency - -Prophecy enforces same method prophecies and, as a consequence, same promises and -predictions for the same method calls with the same arguments. This means: - -```php -$methodProphecy1 = $prophecy->read('123'); -$methodProphecy2 = $prophecy->read('123'); -$methodProphecy3 = $prophecy->read('321'); - -$methodProphecy1 === $methodProphecy2; -$methodProphecy1 !== $methodProphecy3; -``` - -That's interesting, right? Now you might ask me how would you define more complex -behaviors where some method call changes behavior of others. In PHPUnit or Mockery -you do that by predicting how many times your method will be called. In Prophecy, -you'll use promises for that: - -```php -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName('everzet')->will(function () { - $this->getName()->willReturn('everzet'); -}); - -// For PHP 5.3 -$user->setName('everzet')->will(function ($args, $user) { - $user->getName()->willReturn('everzet'); -}); - -// Or -$user->setName('everzet')->will(function ($args) use ($user) { - $user->getName()->willReturn('everzet'); -}); -``` - -And now it doesn't matter how many times or in which order your methods are called. -What matters is their behaviors and how well you faked it. - -Note: If the method is called several times, you can use the following syntax to return different -values for each call: - -```php -$prophecy->read('123')->willReturn(1, 2, 3); -``` - -This feature is actually not recommended for most cases. Relying on the order of -calls for the same arguments tends to make test fragile, as adding one more call -can break everything. - -#### Arguments wildcarding - -The previous example is awesome (at least I hope it is for you), but that's not -optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better -way? In fact there is, but it involves understanding what this `'everzet'` -actually is. - -You see, even if method arguments used during method prophecy creation look -like simple method arguments, in reality they are not. They are argument token -wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just -because Prophecy automatically transforms it under the hood into: - -```php -$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet')); -``` - -Those argument tokens are simple PHP classes, that implement -`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments -with your expectations. And yes, those classnames are damn big. That's why there's a -shortcut class `Prophecy\Argument`, which you can use to create tokens like that: - -```php -use Prophecy\Argument; - -$user->setName(Argument::exact('everzet')); -``` - -`ExactValueToken` is not very useful in our case as it forced us to hardcode the username. -That's why Prophecy comes bundled with a bunch of other tokens: - -- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value -- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value -- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or - classname -- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns - a specific value -- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback -- `AnyValueToken` or `Argument::any()` - matches any argument -- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature -- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value -- `InArrayToken` or `Argument::in($array)` - checks if value is in array -- `NotInArrayToken` or `Argument::notIn($array)` - checks if value is not in array - -And you can add even more by implementing `TokenInterface` with your own custom classes. - -So, let's refactor our initial `{set,get}Name()` logic with argument tokens: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); -``` - -That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it. -We've just described how our stub object should behave, even though the original object could have -no behavior whatsoever. - -One last bit about arguments now. You might ask, what happens in case of: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); - -$user->setName(Argument::any())->will(function () { -}); -``` - -Nothing. Your stub will continue behaving the way it did before. That's because of how -arguments wildcarding works. Every argument token type has a different score level, which -wildcard then uses to calculate the final arguments match score and use the method prophecy -promise that has the highest score. In this case, `Argument::type()` in case of success -scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first -`setName()` method prophecy and its promise. The simple rule of thumb - more precise token -always wins. - -#### Getting stub objects - -Ok, now we know how to define our prophecy method promises, let's get our stub from -it: - -```php -$stub = $prophecy->reveal(); -``` - -As you might see, the only difference between how we get dummies and stubs is that with -stubs we describe every object conversation instead of just agreeing with `null` returns -(object being *dummy*). As a matter of fact, after you define your first promise -(method call), Prophecy will force you to define all the communications - it throws -the `UnexpectedCallException` for any call you didn't describe with object prophecy before -calling it on a stub. - -### Mocks - -Now we know how to define doubles without behavior (dummies) and doubles with behavior, but -no expectations (stubs). What's left is doubles for which we have some expectations. These -are called mocks and in Prophecy they look almost exactly the same as stubs, except that -they define *predictions* instead of *promises* on method prophecies: - -```php -$entityManager->flush()->shouldBeCalled(); -``` - -#### Predictions - -The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy. -Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime -of your doubles, Prophecy records every single call you're making against it inside your -code. After that, Prophecy can use this collected information to check if it matches defined -predictions. You can assign predictions to method prophecies using the -`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact, -the `shouldBeCalled()` method we used earlier is just a shortcut to: - -```php -$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction()); -``` - -It checks if your method of interest (that matches both the method name and the arguments wildcard) -was called 1 or more times. If the prediction failed then it throws an exception. When does this -check happen? Whenever you call `checkPredictions()` on the main Prophet object: - -```php -$prophet->checkPredictions(); -``` - -In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions -are defined, it would do nothing. So it won't harm to call it after every test. - -There are plenty more predictions you can play with: - -- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times -- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called -- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called - `$count` times -- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback - -Of course, you can always create your own custom prediction any time by implementing -`PredictionInterface`. - -### Spies - -The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous -section, Prophecy records every call made during the double's entire lifetime. This means -you don't need to record predictions in order to check them. You can also do it -manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method: - -```php -$em = $prophet->prophesize('Doctrine\ORM\EntityManager'); - -$controller->createUser($em->reveal()); - -$em->flush()->shouldHaveBeenCalled(); -``` - -Such manipulation with doubles is called spying. And with Prophecy it just works. - - -## FAQ - -### Can I call the original methods on a prophesized class? - -Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored. diff --git a/vendor/phpspec/prophecy/composer.json b/vendor/phpspec/prophecy/composer.json deleted file mode 100644 index 129a4cf6..00000000 --- a/vendor/phpspec/prophecy/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "phpspec/prophecy", - "description": "Highly opinionated mocking framework for PHP 5.3+", - "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], - "homepage": "https://github.com/phpspec/prophecy", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - - "require": { - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "doctrine/instantiator": "^1.2", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - - "autoload-dev": { - "psr-4": { - "Fixtures\\Prophecy\\": "fixtures" - } - }, - - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/vendor/phpspec/prophecy/src/Prophecy/Argument.php deleted file mode 100644 index 674255a2..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument.php +++ /dev/null @@ -1,239 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Argument\Token; - -/** - * Argument tokens shortcuts. - * - * @author Konstantin Kudryashov - */ -class Argument -{ - /** - * Checks that argument is exact value or object. - * - * @param mixed $value - * - * @return Token\ExactValueToken - */ - public static function exact($value) - { - return new Token\ExactValueToken($value); - } - - /** - * Checks that argument is of specific type or instance of specific class. - * - * @param string $type Type name (`integer`, `string`) or full class name - * - * @return Token\TypeToken - */ - public static function type($type) - { - return new Token\TypeToken($type); - } - - /** - * Checks that argument object has specific state. - * - * @param string $methodName - * @param mixed $value - * - * @return Token\ObjectStateToken - */ - public static function which($methodName, $value) - { - return new Token\ObjectStateToken($methodName, $value); - } - - /** - * Checks that argument matches provided callback. - * - * @param callable $callback - * - * @return Token\CallbackToken - */ - public static function that($callback) - { - return new Token\CallbackToken($callback); - } - - /** - * Matches any single value. - * - * @return Token\AnyValueToken - */ - public static function any() - { - return new Token\AnyValueToken; - } - - /** - * Matches all values to the rest of the signature. - * - * @return Token\AnyValuesToken - */ - public static function cetera() - { - return new Token\AnyValuesToken; - } - - /** - * Checks that argument matches all tokens - * - * @param mixed ... a list of tokens - * - * @return Token\LogicalAndToken - */ - public static function allOf() - { - return new Token\LogicalAndToken(func_get_args()); - } - - /** - * Checks that argument array or countable object has exact number of elements. - * - * @param integer $value array elements count - * - * @return Token\ArrayCountToken - */ - public static function size($value) - { - return new Token\ArrayCountToken($value); - } - - /** - * Checks that argument array contains (key, value) pair - * - * @param mixed $key exact value or token - * @param mixed $value exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withEntry($key, $value) - { - return new Token\ArrayEntryToken($key, $value); - } - - /** - * Checks that arguments array entries all match value - * - * @param mixed $value - * - * @return Token\ArrayEveryEntryToken - */ - public static function withEveryEntry($value) - { - return new Token\ArrayEveryEntryToken($value); - } - - /** - * Checks that argument array contains value - * - * @param mixed $value - * - * @return Token\ArrayEntryToken - */ - public static function containing($value) - { - return new Token\ArrayEntryToken(self::any(), $value); - } - - /** - * Checks that argument array has key - * - * @param mixed $key exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withKey($key) - { - return new Token\ArrayEntryToken($key, self::any()); - } - - /** - * Checks that argument does not match the value|token. - * - * @param mixed $value either exact value or argument token - * - * @return Token\LogicalNotToken - */ - public static function not($value) - { - return new Token\LogicalNotToken($value); - } - - /** - * @param string $value - * - * @return Token\StringContainsToken - */ - public static function containingString($value) - { - return new Token\StringContainsToken($value); - } - - /** - * Checks that argument is identical value. - * - * @param mixed $value - * - * @return Token\IdenticalValueToken - */ - public static function is($value) - { - return new Token\IdenticalValueToken($value); - } - - /** - * Check that argument is same value when rounding to the - * given precision. - * - * @param float $value - * @param float $precision - * - * @return Token\ApproximateValueToken - */ - public static function approximate($value, $precision = 0) - { - return new Token\ApproximateValueToken($value, $precision); - } - - /** - * Checks that argument is in array. - * - * @param array $value - * - * @return Token\InArrayToken - */ - - public static function in($value) - { - return new Token\InArrayToken($value); - } - - /** - * Checks that argument is not in array. - * - * @param array $value - * - * @return Token\NotInArrayToken - */ - - public static function notIn($value) - { - return new Token\NotInArrayToken($value); - } - -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php deleted file mode 100644 index a088f21d..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php +++ /dev/null @@ -1,101 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument; - -/** - * Arguments wildcarding. - * - * @author Konstantin Kudryashov - */ -class ArgumentsWildcard -{ - /** - * @var Token\TokenInterface[] - */ - private $tokens = array(); - private $string; - - /** - * Initializes wildcard. - * - * @param array $arguments Array of argument tokens or values - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof Token\TokenInterface) { - $argument = new Token\ExactValueToken($argument); - } - - $this->tokens[] = $argument; - } - } - - /** - * Calculates wildcard match score for provided arguments. - * - * @param array $arguments - * - * @return false|int False OR integer score (higher - better) - */ - public function scoreArguments(array $arguments) - { - if (0 == count($arguments) && 0 == count($this->tokens)) { - return 1; - } - - $arguments = array_values($arguments); - $totalScore = 0; - foreach ($this->tokens as $i => $token) { - $argument = isset($arguments[$i]) ? $arguments[$i] : null; - if (1 >= $score = $token->scoreArgument($argument)) { - return false; - } - - $totalScore += $score; - - if (true === $token->isLast()) { - return $totalScore; - } - } - - if (count($arguments) > count($this->tokens)) { - return false; - } - - return $totalScore; - } - - /** - * Returns string representation for wildcard. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = implode(', ', array_map(function ($token) { - return (string) $token; - }, $this->tokens)); - } - - return $this->string; - } - - /** - * @return array - */ - public function getTokens() - { - return $this->tokens; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php deleted file mode 100644 index 50988112..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any single value token. - * - * @author Konstantin Kudryashov - */ -class AnyValueToken implements TokenInterface -{ - /** - * Always scores 3 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 3; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '*'; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php deleted file mode 100644 index f76b17bc..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any values token. - * - * @author Konstantin Kudryashov - */ -class AnyValuesToken implements TokenInterface -{ - /** - * Always scores 2 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 2; - } - - /** - * Returns true to stop wildcard from processing other tokens. - * - * @return bool - */ - public function isLast() - { - return true; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '* [, ...]'; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php deleted file mode 100644 index 901744ab..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ApproximateValueToken.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Approximate value token - * - * @author Daniel Leech - */ -class ApproximateValueToken implements TokenInterface -{ - private $value; - private $precision; - - public function __construct($value, $precision = 0) - { - $this->value = $value; - $this->precision = $precision; - } - - /** - * {@inheritdoc} - */ - public function scoreArgument($argument) - { - return round((float)$argument, $this->precision) === round($this->value, $this->precision) ? 10 : false; - } - - /** - * {@inheritdoc} - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('≅%s', round($this->value, $this->precision)); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php deleted file mode 100644 index 96b4befd..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array elements count token. - * - * @author Boris Mikhaylov - */ - -class ArrayCountToken implements TokenInterface -{ - private $count; - - /** - * @param integer $value - */ - public function __construct($value) - { - $this->count = $value; - } - - /** - * Scores 6 when argument has preset number of elements. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('count(%s)', $this->count); - } - - /** - * Returns true if object is either array or instance of \Countable - * - * @param $argument - * @return bool - */ - private function isCountable($argument) - { - return (is_array($argument) || $argument instanceof \Countable); - } - - /** - * Returns true if $argument has expected number of elements - * - * @param array|\Countable $argument - * - * @return bool - */ - private function hasProperCount($argument) - { - return $this->count === count($argument); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php deleted file mode 100644 index 0305fc72..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Array entry token. - * - * @author Boris Mikhaylov - */ -class ArrayEntryToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $key; - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $value; - - /** - * @param mixed $key exact value or token - * @param mixed $value exact value or token - */ - public function __construct($key, $value) - { - $this->key = $this->wrapIntoExactValueToken($key); - $this->value = $this->wrapIntoExactValueToken($value); - } - - /** - * Scores half of combined scores from key and value tokens for same entry. Capped at 8. - * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken. - * - * @param array|\ArrayAccess|\Traversable $argument - * - * @throws \Prophecy\Exception\InvalidArgumentException - * @return bool|int - */ - public function scoreArgument($argument) - { - if ($argument instanceof \Traversable) { - $argument = iterator_to_array($argument); - } - - if ($argument instanceof \ArrayAccess) { - $argument = $this->convertArrayAccessToEntry($argument); - } - - if (!is_array($argument) || empty($argument)) { - return false; - } - - $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); - $valueScores = array_map(array($this->value,'scoreArgument'), $argument); - $scoreEntry = function ($value, $key) { - return $value && $key ? min(8, ($key + $value) / 2) : false; - }; - - return max(array_map($scoreEntry, $valueScores, $keyScores)); - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('[..., %s => %s, ...]', $this->key, $this->value); - } - - /** - * Returns key - * - * @return TokenInterface - */ - public function getKey() - { - return $this->key; - } - - /** - * Returns value - * - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } - - /** - * Wraps non token $value into ExactValueToken - * - * @param $value - * @return TokenInterface - */ - private function wrapIntoExactValueToken($value) - { - return $value instanceof TokenInterface ? $value : new ExactValueToken($value); - } - - /** - * Converts instance of \ArrayAccess to key => value array entry - * - * @param \ArrayAccess $object - * - * @return array|null - * @throws \Prophecy\Exception\InvalidArgumentException - */ - private function convertArrayAccessToEntry(\ArrayAccess $object) - { - if (!$this->key instanceof ExactValueToken) { - throw new InvalidArgumentException(sprintf( - 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. - 'But you used `%s`.', - $this->key - )); - } - - $key = $this->key->getValue(); - - return $object->offsetExists($key) ? array($key => $object[$key]) : array(); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php deleted file mode 100644 index 5d41fa48..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array every entry token. - * - * @author Adrien Brault - */ -class ArrayEveryEntryToken implements TokenInterface -{ - /** - * @var TokenInterface - */ - private $value; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - if (!$value instanceof TokenInterface) { - $value = new ExactValueToken($value); - } - - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function scoreArgument($argument) - { - if (!$argument instanceof \Traversable && !is_array($argument)) { - return false; - } - - $scores = array(); - foreach ($argument as $key => $argumentEntry) { - $scores[] = $this->value->scoreArgument($argumentEntry); - } - - if (empty($scores) || in_array(false, $scores, true)) { - return false; - } - - return array_sum($scores) / count($scores); - } - - /** - * {@inheritdoc} - */ - public function isLast() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return sprintf('[%s, ..., %s]', $this->value, $this->value); - } - - /** - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php deleted file mode 100644 index f45ba20b..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Callback-verified token. - * - * @author Konstantin Kudryashov - */ -class CallbackToken implements TokenInterface -{ - private $callback; - - /** - * Initializes token. - * - * @param callable $callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackToken, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Scores 7 if callback returns true, false otherwise. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return call_user_func($this->callback, $argument) ? 7 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return 'callback()'; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php deleted file mode 100644 index 045a1b90..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php +++ /dev/null @@ -1,118 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Exact value token. - * - * @author Konstantin Kudryashov - */ -class ExactValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 10 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && is_object($this->value)) { - $comparator = $this->comparatorFactory->getComparatorFor( - $argument, $this->value - ); - - try { - $comparator->assertEquals($argument, $this->value); - return 10; - } catch (ComparisonFailure $failure) { - return false; - } - } - - // If either one is an object it should be castable to a string - if (is_object($argument) xor is_object($this->value)) { - if (is_object($argument) && !method_exists($argument, '__toString')) { - return false; - } - - if (is_object($this->value) && !method_exists($this->value, '__toString')) { - return false; - } - } elseif (is_numeric($argument) && is_numeric($this->value)) { - // noop - } elseif (gettype($argument) !== gettype($this->value)) { - return false; - } - - return $argument == $this->value ? 10 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('exact(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php deleted file mode 100644 index 0b6d23ab..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php +++ /dev/null @@ -1,74 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Util\StringUtil; - -/** - * Identical value token. - * - * @author Florian Voutzinos - */ -class IdenticalValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - */ - public function __construct($value, StringUtil $util = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - } - - /** - * Scores 11 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $argument === $this->value ? 11 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('identical(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php deleted file mode 100644 index f727aea4..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php +++ /dev/null @@ -1,74 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Check if values is in array - * - * @author Vinícius Alonso - */ -class InArrayToken implements TokenInterface -{ - private $token = array(); - private $strict; - - /** - * @param array $arguments tokens - * @param bool $strict - */ - public function __construct(array $arguments, $strict = true) - { - $this->token = $arguments; - $this->strict = $strict; - } - - /** - * Return scores 8 score if argument is in array. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (count($this->token) === 0) { - return false; - } - - if (\in_array($argument, $this->token, $this->strict)) { - return 8; - } - - return false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - $arrayAsString = implode(', ', $this->token); - return "[{$arrayAsString}]"; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php deleted file mode 100644 index 4ee1b25e..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php +++ /dev/null @@ -1,80 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical AND token. - * - * @author Boris Mikhaylov - */ -class LogicalAndToken implements TokenInterface -{ - private $tokens = array(); - - /** - * @param array $arguments exact values or tokens - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof TokenInterface) { - $argument = new ExactValueToken($argument); - } - $this->tokens[] = $argument; - } - } - - /** - * Scores maximum score from scores returned by tokens for this argument if all of them score. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (0 === count($this->tokens)) { - return false; - } - - $maxScore = 0; - foreach ($this->tokens as $token) { - $score = $token->scoreArgument($argument); - if (false === $score) { - return false; - } - $maxScore = max($score, $maxScore); - } - - return $maxScore; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('bool(%s)', implode(' AND ', $this->tokens)); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php deleted file mode 100644 index 623efa57..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php +++ /dev/null @@ -1,73 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical NOT token. - * - * @author Boris Mikhaylov - */ -class LogicalNotToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $token; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); - } - - /** - * Scores 4 when preset token does not match the argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return false === $this->token->scoreArgument($argument) ? 4 : false; - } - - /** - * Returns true if preset token is last. - * - * @return bool|int - */ - public function isLast() - { - return $this->token->isLast(); - } - - /** - * Returns originating token. - * - * @return TokenInterface - */ - public function getOriginatingToken() - { - return $this->token; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('not(%s)', $this->token); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php deleted file mode 100644 index 6aed8aa5..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/NotInArrayToken.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Check if values is not in array - * - * @author Vinícius Alonso - */ -class NotInArrayToken implements TokenInterface -{ - private $token = array(); - private $strict; - - /** - * @param array $arguments tokens - * @param bool $strict - */ - public function __construct(array $arguments, $strict = true) - { - $this->token = $arguments; - $this->strict = $strict; - } - - /** - * Return scores 8 score if argument is in array. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (count($this->token) === 0) { - return false; - } - - if (!\in_array($argument, $this->token, $this->strict)) { - return 8; - } - - return false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - $arrayAsString = implode(', ', $this->token); - return "[{$arrayAsString}]"; - } -} - diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php deleted file mode 100644 index d7710776..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php +++ /dev/null @@ -1,104 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Object state-checker token. - * - * @author Konstantin Kudryashov - */ -class ObjectStateToken implements TokenInterface -{ - private $name; - private $value; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param string $methodName - * @param mixed $value Expected return value - * @param null|StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - $methodName, - $value, - StringUtil $util = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->name = $methodName; - $this->value = $value; - $this->util = $util ?: new StringUtil; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 8 if argument is an object, which method returns expected value. - * - * @param mixed $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && method_exists($argument, $this->name)) { - $actual = call_user_func(array($argument, $this->name)); - - $comparator = $this->comparatorFactory->getComparatorFor( - $this->value, $actual - ); - - try { - $comparator->assertEquals($this->value, $actual); - return 8; - } catch (ComparisonFailure $failure) { - return false; - } - } - - if (is_object($argument) && property_exists($argument, $this->name)) { - return $argument->{$this->name} === $this->value ? 8 : false; - } - - return false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('state(%s(), %s)', - $this->name, - $this->util->stringify($this->value) - ); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php deleted file mode 100644 index bd8d423f..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * String contains token. - * - * @author Peter Mitchell - */ -class StringContainsToken implements TokenInterface -{ - private $value; - - /** - * Initializes token. - * - * @param string $value - */ - public function __construct($value) - { - $this->value = $value; - } - - public function scoreArgument($argument) - { - return is_string($argument) && strpos($argument, $this->value) !== false ? 6 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('contains("%s")', $this->value); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php deleted file mode 100644 index 625d3bad..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Argument token interface. - * - * @author Konstantin Kudryashov - */ -interface TokenInterface -{ - /** - * Calculates token match score for provided argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument); - - /** - * Returns true if this token prevents check of other tokens (is last one). - * - * @return bool|int - */ - public function isLast(); - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString(); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php deleted file mode 100644 index cb65132c..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php +++ /dev/null @@ -1,76 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Value type token. - * - * @author Konstantin Kudryashov - */ -class TypeToken implements TokenInterface -{ - private $type; - - /** - * @param string $type - */ - public function __construct($type) - { - $checker = "is_{$type}"; - if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) { - throw new InvalidArgumentException(sprintf( - 'Type or class name expected as an argument to TypeToken, but got %s.', $type - )); - } - - $this->type = $type; - } - - /** - * Scores 5 if argument has the same type this token was constructed with. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - $checker = "is_{$this->type}"; - if (function_exists($checker)) { - return call_user_func($checker, $argument) ? 5 : false; - } - - return $argument instanceof $this->type ? 5 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('type(%s)', $this->type); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php deleted file mode 100644 index 26522354..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php +++ /dev/null @@ -1,162 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Exception; -use Prophecy\Argument\ArgumentsWildcard; - -/** - * Call object. - * - * @author Konstantin Kudryashov - */ -class Call -{ - private $methodName; - private $arguments; - private $returnValue; - private $exception; - private $file; - private $line; - private $scores; - - /** - * Initializes call. - * - * @param string $methodName - * @param array $arguments - * @param mixed $returnValue - * @param Exception $exception - * @param null|string $file - * @param null|int $line - */ - public function __construct($methodName, array $arguments, $returnValue, - Exception $exception = null, $file, $line) - { - $this->methodName = $methodName; - $this->arguments = $arguments; - $this->returnValue = $returnValue; - $this->exception = $exception; - $this->scores = new \SplObjectStorage(); - - if ($file) { - $this->file = $file; - $this->line = intval($line); - } - } - - /** - * Returns called method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns called method arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Returns called method return value. - * - * @return null|mixed - */ - public function getReturnValue() - { - return $this->returnValue; - } - - /** - * Returns exception that call thrown. - * - * @return null|Exception - */ - public function getException() - { - return $this->exception; - } - - /** - * Returns callee filename. - * - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Returns callee line number. - * - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * Returns short notation for callee place. - * - * @return string - */ - public function getCallPlace() - { - if (null === $this->file) { - return 'unknown'; - } - - return sprintf('%s:%d', $this->file, $this->line); - } - - /** - * Adds the wildcard match score for the provided wildcard. - * - * @param ArgumentsWildcard $wildcard - * @param false|int $score - * - * @return $this - */ - public function addScore(ArgumentsWildcard $wildcard, $score) - { - $this->scores[$wildcard] = $score; - - return $this; - } - - /** - * Returns wildcard match score for the provided wildcard. The score is - * calculated if not already done. - * - * @param ArgumentsWildcard $wildcard - * - * @return false|int False OR integer score (higher - better) - */ - public function getScore(ArgumentsWildcard $wildcard) - { - if (isset($this->scores[$wildcard])) { - return $this->scores[$wildcard]; - } - - return $this->scores[$wildcard] = $wildcard->scoreArguments($this->getArguments()); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php deleted file mode 100644 index 00c526d7..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php +++ /dev/null @@ -1,240 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Call\UnexpectedCallException; -use SplObjectStorage; - -/** - * Calls receiver & manager. - * - * @author Konstantin Kudryashov - */ -class CallCenter -{ - private $util; - - /** - * @var Call[] - */ - private $recordedCalls = array(); - - /** - * @var SplObjectStorage - */ - private $unexpectedCalls; - - /** - * Initializes call center. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - $this->unexpectedCalls = new SplObjectStorage(); - } - - /** - * Makes and records specific method call for object prophecy. - * - * @param ObjectProphecy $prophecy - * @param string $methodName - * @param array $arguments - * - * @return mixed Returns null if no promise for prophecy found or promise return value. - * - * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found - */ - public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments) - { - // For efficiency exclude 'args' from the generated backtrace - // Limit backtrace to last 3 calls as we don't use the rest - $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); - - $file = $line = null; - if (isset($backtrace[2]) && isset($backtrace[2]['file'])) { - $file = $backtrace[2]['file']; - $line = $backtrace[2]['line']; - } - - // If no method prophecies defined, then it's a dummy, so we'll just return null - if ('__destruct' === strtolower($methodName) || 0 == count($prophecy->getMethodProphecies())) { - $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); - - return null; - } - - // There are method prophecies, so it's a fake/stub. Searching prophecy for this call - $matches = $this->findMethodProphecies($prophecy, $methodName, $arguments); - - // If fake/stub doesn't have method prophecy for this call - throw exception - if (!count($matches)) { - $this->unexpectedCalls->attach(new Call($methodName, $arguments, null, null, $file, $line), $prophecy); - $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); - - return null; - } - - // Sort matches by their score value - @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); - - $score = $matches[0][0]; - // If Highest rated method prophecy has a promise - execute it or return null instead - $methodProphecy = $matches[0][1]; - $returnValue = null; - $exception = null; - if ($promise = $methodProphecy->getPromise()) { - try { - $returnValue = $promise->execute($arguments, $prophecy, $methodProphecy); - } catch (\Exception $e) { - $exception = $e; - } - } - - if ($methodProphecy->hasReturnVoid() && $returnValue !== null) { - throw new MethodProphecyException( - "The method \"$methodName\" has a void return type, but the promise returned a value", - $methodProphecy - ); - } - - $this->recordedCalls[] = $call = new Call( - $methodName, $arguments, $returnValue, $exception, $file, $line - ); - $call->addScore($methodProphecy->getArgumentsWildcard(), $score); - - if (null !== $exception) { - throw $exception; - } - - return $returnValue; - } - - /** - * Searches for calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findCalls($methodName, ArgumentsWildcard $wildcard) - { - $methodName = strtolower($methodName); - - return array_values( - array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { - return $methodName === strtolower($call->getMethodName()) - && 0 < $call->getScore($wildcard) - ; - }) - ); - } - - /** - * @throws UnexpectedCallException - */ - public function checkUnexpectedCalls() - { - /** @var Call $call */ - foreach ($this->unexpectedCalls as $call) { - $prophecy = $this->unexpectedCalls[$call]; - - // If fake/stub doesn't have method prophecy for this call - throw exception - if (!count($this->findMethodProphecies($prophecy, $call->getMethodName(), $call->getArguments()))) { - throw $this->createUnexpectedCallException($prophecy, $call->getMethodName(), $call->getArguments()); - } - } - } - - private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName, - array $arguments) - { - $classname = get_class($prophecy->reveal()); - $indentationLength = 8; // looks good - $argstring = implode( - ",\n", - $this->indentArguments( - array_map(array($this->util, 'stringify'), $arguments), - $indentationLength - ) - ); - - $expected = array(); - - foreach (array_merge(...array_values($prophecy->getMethodProphecies())) as $methodProphecy) { - $expected[] = sprintf( - " - %s(\n" . - "%s\n" . - " )", - $methodProphecy->getMethodName(), - implode( - ",\n", - $this->indentArguments( - array_map('strval', $methodProphecy->getArgumentsWildcard()->getTokens()), - $indentationLength - ) - ) - ); - } - - return new UnexpectedCallException( - sprintf( - "Unexpected method call on %s:\n". - " - %s(\n". - "%s\n". - " )\n". - "expected calls were:\n". - "%s", - - $classname, $methodName, $argstring, implode("\n", $expected) - ), - $prophecy, $methodName, $arguments - - ); - } - - private function indentArguments(array $arguments, $indentationLength) - { - return preg_replace_callback( - '/^/m', - function () use ($indentationLength) { - return str_repeat(' ', $indentationLength); - }, - $arguments - ); - } - - /** - * @param ObjectProphecy $prophecy - * @param string $methodName - * @param array $arguments - * - * @return array - */ - private function findMethodProphecies(ObjectProphecy $prophecy, $methodName, array $arguments) - { - $matches = array(); - foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { - if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { - $matches[] = array($score, $methodProphecy); - } - } - - return $matches; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php deleted file mode 100644 index fabfbc61..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php +++ /dev/null @@ -1,44 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Closure comparator. - * - * @author Konstantin Kudryashov - */ -final class ClosureComparator extends Comparator -{ - public function accepts($expected, $actual): bool - { - return is_object($expected) && $expected instanceof \Closure - && is_object($actual) && $actual instanceof \Closure; - } - - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void - { - if ($expected !== $actual) { - throw new ComparisonFailure( - $expected, - $actual, - // we don't need a diff - '', - '', - false, - 'all closures are different if not identical' - ); - } - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php deleted file mode 100644 index 2070db14..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php +++ /dev/null @@ -1,47 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Factory as BaseFactory; - -/** - * Prophecy comparator factory. - * - * @author Konstantin Kudryashov - */ -final class Factory extends BaseFactory -{ - /** - * @var Factory - */ - private static $instance; - - public function __construct() - { - parent::__construct(); - - $this->register(new ClosureComparator()); - $this->register(new ProphecyComparator()); - } - - /** - * @return Factory - */ - public static function getInstance() - { - if (self::$instance === null) { - self::$instance = new Factory; - } - - return self::$instance; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php b/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php deleted file mode 100644 index 2736e410..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Comparator/ProphecyComparator.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use Prophecy\Prophecy\ProphecyInterface; -use SebastianBergmann\Comparator\ObjectComparator; - -/** - * @final - */ -class ProphecyComparator extends ObjectComparator -{ - public function accepts($expected, $actual): bool - { - return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface; - } - - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void - { - parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php deleted file mode 100644 index 2b875211..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class CachedDoubler extends Doubler -{ - private static $classes = array(); - - /** - * {@inheritdoc} - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $classId = $this->generateClassId($class, $interfaces); - if (isset(self::$classes[$classId])) { - return self::$classes[$classId]; - } - - return self::$classes[$classId] = parent::createDoubleClass($class, $interfaces); - } - - /** - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - private function generateClassId(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - if (null !== $class) { - $parts[] = $class->getName(); - } - foreach ($interfaces as $interface) { - $parts[] = $interface->getName(); - } - foreach ($this->getClassPatches() as $patch) { - $parts[] = get_class($patch); - } - sort($parts); - - return md5(implode('', $parts)); - } - - public function resetCache() - { - self::$classes = array(); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php deleted file mode 100644 index d6d19685..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Class patch interface. - * Class patches extend doubles functionality or help - * Prophecy to avoid some internal PHP bugs. - * - * @author Konstantin Kudryashov - */ -interface ClassPatchInterface -{ - /** - * Checks if patch supports specific class node. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node); - - /** - * Applies patch to the specific class node. - * - * @param ClassNode $node - * @return void - */ - public function apply(ClassNode $node); - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority(); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php deleted file mode 100644 index 9d843099..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php +++ /dev/null @@ -1,76 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * Disable constructor. - * Makes all constructor arguments optional. - * - * @author Konstantin Kudryashov - */ -class DisableConstructorPatch implements ClassPatchInterface -{ - /** - * Checks if class has `__construct` method. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Makes all class constructor arguments optional. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if (!$node->isExtendable('__construct')) { - return; - } - - if (!$node->hasMethod('__construct')) { - $node->addMethod(new MethodNode('__construct', '')); - - return; - } - - $constructor = $node->getMethod('__construct'); - foreach ($constructor->getArguments() as $argument) { - $argument->setDefault(null); - } - - $constructor->setCode(<< - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Exception patch for HHVM to remove the stubs from special methods - * - * @author Christophe Coevoet - */ -class HhvmExceptionPatch implements ClassPatchInterface -{ - /** - * Supports exceptions on HHVM. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (!defined('HHVM_VERSION')) { - return false; - } - - return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception'); - } - - /** - * Removes special exception static methods from the doubled methods. - * - * @param ClassNode $node - * - * @return void - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('setTraceOptions')) { - $node->getMethod('setTraceOptions')->useParentCode(); - } - if ($node->hasMethod('getTraceOptions')) { - $node->getMethod('getTraceOptions')->useParentCode(); - } - } - - /** - * {@inheritdoc} - */ - public function getPriority() - { - return -50; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php deleted file mode 100644 index ab99f74b..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Remove method functionality from the double which will clash with php keywords. - * - * @author Milan Magudia - */ -class KeywordPatch implements ClassPatchInterface -{ - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Remove methods that clash with php keywords - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $methodNames = array_keys($node->getMethods()); - $methodsToRemove = array_intersect($methodNames, $this->getKeywords()); - foreach ($methodsToRemove as $methodName) { - $node->removeMethod($methodName); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 49; - } - - /** - * Returns array of php keywords. - * - * @return array - */ - private function getKeywords() - { - return ['__halt_compiler']; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php deleted file mode 100644 index a545eeff..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php +++ /dev/null @@ -1,105 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ArgumentNode; -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\PhpDocumentor\ClassAndInterfaceTagRetriever; -use Prophecy\PhpDocumentor\MethodTagRetrieverInterface; - -/** - * Discover Magical API using "@method" PHPDoc format. - * - * @author Thomas Tourlourat - * @author Kévin Dunglas - * @author Théo FIDRY - */ -class MagicCallPatch implements ClassPatchInterface -{ - const MAGIC_METHODS_WITH_ARGUMENTS = ['__call', '__callStatic', '__get', '__isset', '__set', '__set_state', '__unserialize', '__unset']; - - private $tagRetriever; - - public function __construct(MethodTagRetrieverInterface $tagRetriever = null) - { - $this->tagRetriever = null === $tagRetriever ? new ClassAndInterfaceTagRetriever() : $tagRetriever; - } - - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Discover Magical API - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $types = array_filter($node->getInterfaces(), function ($interface) { - return 0 !== strpos($interface, 'Prophecy\\'); - }); - $types[] = $node->getParentClass(); - - foreach ($types as $type) { - $reflectionClass = new \ReflectionClass($type); - - while ($reflectionClass) { - $tagList = $this->tagRetriever->getTagList($reflectionClass); - - foreach ($tagList as $tag) { - $methodName = $tag->getMethodName(); - - if (empty($methodName)) { - continue; - } - - if (!$reflectionClass->hasMethod($methodName)) { - $methodNode = new MethodNode($methodName); - - // only magic methods can have a contract that needs to be enforced - if (in_array($methodName, self::MAGIC_METHODS_WITH_ARGUMENTS)) { - foreach($tag->getArguments() as $argument) { - $argumentNode = new ArgumentNode($argument['name']); - $methodNode->addArgument($argumentNode); - } - } - - $methodNode->setStatic($tag->isStatic()); - $node->addMethod($methodNode); - } - } - - $reflectionClass = $reflectionClass->getParentClass(); - } - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return integer Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php deleted file mode 100644 index 7573ca50..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php +++ /dev/null @@ -1,113 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ArgumentTypeNode; -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\Doubler\Generator\Node\ArgumentNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; - -/** - * Add Prophecy functionality to the double. - * This is a core class patch for Prophecy. - * - * @author Konstantin Kudryashov - */ -class ProphecySubjectPatch implements ClassPatchInterface -{ - /** - * Always returns true. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Apply Prophecy functionality to class node. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); - $node->addProperty('objectProphecyClosure', 'private'); - - foreach ($node->getMethods() as $name => $method) { - if ('__construct' === strtolower($name)) { - continue; - } - - if (!$method->getReturnTypeNode()->hasReturnStatement()) { - $method->setCode( - '$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' - ); - } else { - $method->setCode( - 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' - ); - } - } - - $prophecySetter = new MethodNode('setProphecy'); - $prophecyArgument = new ArgumentNode('prophecy'); - $prophecyArgument->setTypeNode(new ArgumentTypeNode('Prophecy\Prophecy\ProphecyInterface')); - $prophecySetter->addArgument($prophecyArgument); - $prophecySetter->setCode(<<objectProphecyClosure) { - \$this->objectProphecyClosure = static function () use (\$prophecy) { - return \$prophecy; - }; -} -PHP - ); - - $prophecyGetter = new MethodNode('getProphecy'); - $prophecyGetter->setCode('return \call_user_func($this->objectProphecyClosure);'); - - if ($node->hasMethod('__call')) { - $__call = $node->getMethod('__call'); - } else { - $__call = new MethodNode('__call'); - $__call->addArgument(new ArgumentNode('name')); - $__call->addArgument(new ArgumentNode('arguments')); - - $node->addMethod($__call, true); - } - - $__call->setCode(<<addMethod($prophecySetter, true); - $node->addMethod($prophecyGetter, true); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 0; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php deleted file mode 100644 index 9166aeef..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php +++ /dev/null @@ -1,57 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * ReflectionClass::newInstance patch. - * Makes first argument of newInstance optional, since it works but signature is misleading - * - * @author Florian Klein - */ -class ReflectionClassNewInstancePatch implements ClassPatchInterface -{ - /** - * Supports ReflectionClass - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return 'ReflectionClass' === $node->getParentClass(); - } - - /** - * Updates newInstance's first argument to make it optional - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - foreach ($node->getMethod('newInstance')->getArguments() as $argument) { - $argument->setDefault(null); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher = earlier) - */ - public function getPriority() - { - return 50; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php deleted file mode 100644 index ceee94a2..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php +++ /dev/null @@ -1,123 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * SplFileInfo patch. - * Makes SplFileInfo and derivative classes usable with Prophecy. - * - * @author Konstantin Kudryashov - */ -class SplFileInfoPatch implements ClassPatchInterface -{ - /** - * Supports everything that extends SplFileInfo. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (null === $node->getParentClass()) { - return false; - } - return 'SplFileInfo' === $node->getParentClass() - || is_subclass_of($node->getParentClass(), 'SplFileInfo') - ; - } - - /** - * Updated constructor code to call parent one with dummy file argument. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('__construct')) { - $constructor = $node->getMethod('__construct'); - } else { - $constructor = new MethodNode('__construct'); - $node->addMethod($constructor); - } - - if ($this->nodeIsDirectoryIterator($node)) { - $constructor->setCode('return parent::__construct("' . __DIR__ . '");'); - - return; - } - - if ($this->nodeIsSplFileObject($node)) { - $filePath = str_replace('\\','\\\\',__FILE__); - $constructor->setCode('return parent::__construct("' . $filePath .'");'); - - return; - } - - if ($this->nodeIsSymfonySplFileInfo($node)) { - $filePath = str_replace('\\','\\\\',__FILE__); - $constructor->setCode('return parent::__construct("' . $filePath .'", "", "");'); - - return; - } - - $constructor->useParentCode(); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsDirectoryIterator(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'DirectoryIterator' === $parent - || is_subclass_of($parent, 'DirectoryIterator'); - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsSplFileObject(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'SplFileObject' === $parent - || is_subclass_of($parent, 'SplFileObject'); - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsSymfonySplFileInfo(ClassNode $node) - { - $parent = $node->getParentClass(); - - return 'Symfony\\Component\\Finder\\SplFileInfo' === $parent; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php deleted file mode 100644 index b98e9432..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php +++ /dev/null @@ -1,95 +0,0 @@ -implementsAThrowableInterface($node) && $this->doesNotExtendAThrowableClass($node); - } - - /** - * @param ClassNode $node - * @return bool - */ - private function implementsAThrowableInterface(ClassNode $node) - { - foreach ($node->getInterfaces() as $type) { - if (is_a($type, 'Throwable', true)) { - return true; - } - } - - return false; - } - - /** - * @param ClassNode $node - * @return bool - */ - private function doesNotExtendAThrowableClass(ClassNode $node) - { - return !is_a($node->getParentClass(), 'Throwable', true); - } - - /** - * Applies patch to the specific class node. - * - * @param ClassNode $node - * - * @return void - */ - public function apply(ClassNode $node) - { - $this->checkItCanBeDoubled($node); - $this->setParentClassToException($node); - } - - private function checkItCanBeDoubled(ClassNode $node) - { - $className = $node->getParentClass(); - if ($className !== 'stdClass') { - throw new ClassCreatorException( - sprintf( - 'Cannot double concrete class %s as well as implement Traversable', - $className - ), - $node - ); - } - } - - private function setParentClassToException(ClassNode $node) - { - $node->setParentClass('Exception'); - - $node->removeMethod('getMessage'); - $node->removeMethod('getCode'); - $node->removeMethod('getFile'); - $node->removeMethod('getLine'); - $node->removeMethod('getTrace'); - $node->removeMethod('getPrevious'); - $node->removeMethod('getNext'); - $node->removeMethod('getTraceAsString'); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 100; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php deleted file mode 100644 index 0e2e0470..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php +++ /dev/null @@ -1,98 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; - -/** - * Traversable interface patch. - * Forces classes that implement interfaces, that extend Traversable to also implement Iterator. - * - * @author Konstantin Kudryashov - */ -class TraversablePatch implements ClassPatchInterface -{ - /** - * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (in_array('Iterator', $node->getInterfaces())) { - return false; - } - if (in_array('IteratorAggregate', $node->getInterfaces())) { - return false; - } - - foreach ($node->getInterfaces() as $interface) { - if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) { - continue; - } - if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) { - continue; - } - if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) { - continue; - } - - return true; - } - - return false; - } - - /** - * Forces class to implement Iterator interface. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Iterator'); - - $currentMethod = new MethodNode('current'); - (\PHP_VERSION_ID >= 80100) && $currentMethod->setReturnTypeNode(new ReturnTypeNode('mixed')); - $node->addMethod($currentMethod); - - $keyMethod = new MethodNode('key'); - (\PHP_VERSION_ID >= 80100) && $keyMethod->setReturnTypeNode(new ReturnTypeNode('mixed')); - $node->addMethod($keyMethod); - - $nextMethod = new MethodNode('next'); - (\PHP_VERSION_ID >= 80100) && $nextMethod->setReturnTypeNode(new ReturnTypeNode('void')); - $node->addMethod($nextMethod); - - $rewindMethod = new MethodNode('rewind'); - (\PHP_VERSION_ID >= 80100) && $rewindMethod->setReturnTypeNode(new ReturnTypeNode('void')); - $node->addMethod($rewindMethod); - - $validMethod = new MethodNode('valid'); - (\PHP_VERSION_ID >= 80100) && $validMethod->setReturnTypeNode(new ReturnTypeNode('bool')); - $node->addMethod($validMethod); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 100; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php deleted file mode 100644 index 699be3a2..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -/** - * Core double interface. - * All doubled classes will implement this one. - * - * @author Konstantin Kudryashov - */ -interface DoubleInterface -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php deleted file mode 100644 index a378ae27..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php +++ /dev/null @@ -1,146 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Doubler\ClassPatch\ClassPatchInterface; -use Prophecy\Doubler\Generator\ClassMirror; -use Prophecy\Doubler\Generator\ClassCreator; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class Doubler -{ - private $mirror; - private $creator; - private $namer; - - /** - * @var ClassPatchInterface[] - */ - private $patches = array(); - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes doubler. - * - * @param ClassMirror $mirror - * @param ClassCreator $creator - * @param NameGenerator $namer - */ - public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, - NameGenerator $namer = null) - { - $this->mirror = $mirror ?: new ClassMirror; - $this->creator = $creator ?: new ClassCreator; - $this->namer = $namer ?: new NameGenerator; - } - - /** - * Returns list of registered class patches. - * - * @return ClassPatchInterface[] - */ - public function getClassPatches() - { - return $this->patches; - } - - /** - * Registers new class patch. - * - * @param ClassPatchInterface $patch - */ - public function registerClassPatch(ClassPatchInterface $patch) - { - $this->patches[] = $patch; - - @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) { - return $patch2->getPriority() - $patch1->getPriority(); - }); - } - - /** - * Creates double from specific class or/and list of interfaces. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces Array of ReflectionClass instances - * @param array $args Constructor arguments - * - * @return DoubleInterface - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function double(ReflectionClass $class = null, array $interfaces, array $args = null) - { - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `Doubler::double(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - } - - $classname = $this->createDoubleClass($class, $interfaces); - $reflection = new ReflectionClass($classname); - - if (null !== $args) { - return $reflection->newInstanceArgs($args); - } - if ((null === $constructor = $reflection->getConstructor()) - || ($constructor->isPublic() && !$constructor->isFinal())) { - return $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - return $this->instantiator->instantiate($classname); - } - - /** - * Creates double class and returns its FQN. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $name = $this->namer->name($class, $interfaces); - $node = $this->mirror->reflect($class, $interfaces); - - foreach ($this->patches as $patch) { - if ($patch->supports($node)) { - $patch->apply($node); - } - } - - $this->creator->create($name, $node); - - return $name; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php deleted file mode 100644 index 52e5e045..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php +++ /dev/null @@ -1,110 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; -use Prophecy\Doubler\Generator\Node\TypeNodeAbstract; - -/** - * Class code creator. - * Generates PHP code for specific class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassCodeGenerator -{ - public function __construct(TypeHintReference $typeHintReference = null) - { - } - - /** - * Generates PHP code for class node. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return string - */ - public function generate($classname, Node\ClassNode $class) - { - $parts = explode('\\', $classname); - $classname = array_pop($parts); - $namespace = implode('\\', $parts); - - $code = sprintf("class %s extends \%s implements %s {\n", - $classname, $class->getParentClass(), implode(', ', - array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces()) - ) - ); - - foreach ($class->getProperties() as $name => $visibility) { - $code .= sprintf("%s \$%s;\n", $visibility, $name); - } - $code .= "\n"; - - foreach ($class->getMethods() as $method) { - $code .= $this->generateMethod($method)."\n"; - } - $code .= "\n}"; - - return sprintf("namespace %s {\n%s\n}", $namespace, $code); - } - - private function generateMethod(Node\MethodNode $method) - { - $php = sprintf("%s %s function %s%s(%s)%s {\n", - $method->getVisibility(), - $method->isStatic() ? 'static' : '', - $method->returnsReference() ? '&':'', - $method->getName(), - implode(', ', $this->generateArguments($method->getArguments())), - ($ret = $this->generateTypes($method->getReturnTypeNode())) ? ': '.$ret : '' - ); - $php .= $method->getCode()."\n"; - - return $php.'}'; - } - - private function generateTypes(TypeNodeAbstract $typeNode): string - { - if (!$typeNode->getTypes()) { - return ''; - } - - // When we require PHP 8 we can stop generating ?foo nullables and remove this first block - if ($typeNode->canUseNullShorthand()) { - return sprintf( '?%s', $typeNode->getNonNullTypes()[0]); - } else { - return join('|', $typeNode->getTypes()); - } - } - - private function generateArguments(array $arguments) - { - return array_map(function (Node\ArgumentNode $argument){ - - $php = $this->generateTypes($argument->getTypeNode()); - - $php .= ' '.($argument->isPassedByReference() ? '&' : ''); - - $php .= $argument->isVariadic() ? '...' : ''; - - $php .= '$'.$argument->getName(); - - if ($argument->isOptional() && !$argument->isVariadic()) { - $php .= ' = '.var_export($argument->getDefault(), true); - } - - return $php; - }, $arguments); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php deleted file mode 100644 index 882a4a4b..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Exception\Doubler\ClassCreatorException; - -/** - * Class creator. - * Creates specific class in current environment. - * - * @author Konstantin Kudryashov - */ -class ClassCreator -{ - private $generator; - - /** - * Initializes creator. - * - * @param ClassCodeGenerator $generator - */ - public function __construct(ClassCodeGenerator $generator = null) - { - $this->generator = $generator ?: new ClassCodeGenerator; - } - - /** - * Creates class. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return mixed - * - * @throws \Prophecy\Exception\Doubler\ClassCreatorException - */ - public function create($classname, Node\ClassNode $class) - { - $code = $this->generator->generate($classname, $class); - $return = eval($code); - - if (!class_exists($classname, false)) { - if (count($class->getInterfaces())) { - throw new ClassCreatorException(sprintf( - 'Could not double `%s` and implement interfaces: [%s].', - $class->getParentClass(), implode(', ', $class->getInterfaces()) - ), $class); - } - - throw new ClassCreatorException( - sprintf('Could not double `%s`.', $class->getParentClass()), - $class - ); - } - - return $return; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php deleted file mode 100644 index 5d9cd2d2..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php +++ /dev/null @@ -1,254 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Doubler\Generator\Node\ArgumentTypeNode; -use Prophecy\Doubler\Generator\Node\ReturnTypeNode; -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Doubler\ClassMirrorException; -use ReflectionClass; -use ReflectionIntersectionType; -use ReflectionMethod; -use ReflectionNamedType; -use ReflectionParameter; -use ReflectionType; -use ReflectionUnionType; - -/** - * Class mirror. - * Core doubler class. Mirrors specific class and/or interfaces into class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassMirror -{ - private static $reflectableMethods = array( - '__construct', - '__destruct', - '__sleep', - '__wakeup', - '__toString', - '__call', - '__invoke' - ); - - /** - * Reflects provided arguments into class node. - * - * @param ReflectionClass|null $class - * @param ReflectionClass[] $interfaces - * - * @return Node\ClassNode - * - */ - public function reflect(?ReflectionClass $class, array $interfaces) - { - $node = new Node\ClassNode; - - if (null !== $class) { - if (true === $class->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as a class, because it\n". - "is interface - use the second argument instead.", - $class->getName() - )); - } - - $this->reflectClassToNode($class, $node); - } - - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `ClassMirror::reflect(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - if (false === $interface->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as an interface, because it\n". - "is class - use the first argument instead.", - $interface->getName() - )); - } - - $this->reflectInterfaceToNode($interface, $node); - } - - $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface'); - - return $node; - } - - private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node) - { - if (true === $class->isFinal()) { - throw new ClassMirrorException(sprintf( - 'Could not reflect class %s as it is marked final.', $class->getName() - ), $class); - } - - $node->setParentClass($class->getName()); - - foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { - if (false === $method->isProtected()) { - continue; - } - - $this->reflectMethodToNode($method, $node); - } - - foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - if (0 === strpos($method->getName(), '_') - && !in_array($method->getName(), self::$reflectableMethods)) { - continue; - } - - if (true === $method->isFinal()) { - $node->addUnextendableMethod($method->getName()); - continue; - } - - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node) - { - $node->addInterface($interface->getName()); - - foreach ($interface->getMethods() as $method) { - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode) - { - $node = new Node\MethodNode($method->getName()); - - if (true === $method->isProtected()) { - $node->setVisibility('protected'); - } - - if (true === $method->isStatic()) { - $node->setStatic(); - } - - if (true === $method->returnsReference()) { - $node->setReturnsReference(); - } - - if ($method->hasReturnType()) { - $returnTypes = $this->getTypeHints($method->getReturnType(), $method->getDeclaringClass(), $method->getReturnType()->allowsNull()); - $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); - } - elseif (method_exists($method, 'hasTentativeReturnType') && $method->hasTentativeReturnType()) { - $returnTypes = $this->getTypeHints($method->getTentativeReturnType(), $method->getDeclaringClass(), $method->getTentativeReturnType()->allowsNull()); - $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); - } - - if (is_array($params = $method->getParameters()) && count($params)) { - foreach ($params as $param) { - $this->reflectArgumentToNode($param, $node); - } - } - - $classNode->addMethod($node); - } - - private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode) - { - $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName(); - $node = new Node\ArgumentNode($name); - - $typeHints = $this->getTypeHints($parameter->getType(), $parameter->getDeclaringClass(), $parameter->allowsNull()); - - $node->setTypeNode(new ArgumentTypeNode(...$typeHints)); - - if ($parameter->isVariadic()) { - $node->setAsVariadic(); - } - - if ($this->hasDefaultValue($parameter)) { - $node->setDefault($this->getDefaultValue($parameter)); - } - - if ($parameter->isPassedByReference()) { - $node->setAsPassedByReference(); - } - - - $methodNode->addArgument($node); - } - - private function hasDefaultValue(ReflectionParameter $parameter) - { - if ($parameter->isVariadic()) { - return false; - } - - if ($parameter->isDefaultValueAvailable()) { - return true; - } - - return $parameter->isOptional() || ($parameter->allowsNull() && $parameter->getType() && \PHP_VERSION_ID < 80100); - } - - private function getDefaultValue(ReflectionParameter $parameter) - { - if (!$parameter->isDefaultValueAvailable()) { - return null; - } - - return $parameter->getDefaultValue(); - } - - private function getTypeHints(?ReflectionType $type, ?ReflectionClass $class, bool $allowsNull) : array - { - $types = []; - - if ($type instanceof ReflectionNamedType) { - $types = [$type->getName()]; - - } - elseif ($type instanceof ReflectionUnionType) { - $types = $type->getTypes(); - } - elseif ($type instanceof ReflectionIntersectionType) { - throw new ClassMirrorException('Doubling intersection types is not supported', $class); - } - elseif(is_object($type)) { - throw new ClassMirrorException('Unknown reflection type ' . get_class($type), $class); - } - - $types = array_map( - function(string $type) use ($class) { - if ($type === 'self') { - return $class->getName(); - } - if ($type === 'parent') { - return $class->getParentClass()->getName(); - } - - return $type; - }, - $types - ); - - if ($types && $types != ['mixed'] && $allowsNull) { - $types[] = 'null'; - } - - return $types; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php deleted file mode 100644 index da7fed4e..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php +++ /dev/null @@ -1,133 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -/** - * Argument node. - * - * @author Konstantin Kudryashov - */ -class ArgumentNode -{ - private $name; - private $default; - private $optional = false; - private $byReference = false; - private $isVariadic = false; - - /** @var ArgumentTypeNode */ - private $typeNode; - - /** - * @param string $name - */ - public function __construct($name) - { - $this->name = $name; - $this->typeNode = new ArgumentTypeNode(); - } - - public function getName() - { - return $this->name; - } - - public function setTypeNode(ArgumentTypeNode $typeNode) - { - $this->typeNode = $typeNode; - } - - public function getTypeNode() : ArgumentTypeNode - { - return $this->typeNode; - } - - public function hasDefault() - { - return $this->isOptional() && !$this->isVariadic(); - } - - public function getDefault() - { - return $this->default; - } - - public function setDefault($default = null) - { - $this->optional = true; - $this->default = $default; - } - - public function isOptional() - { - return $this->optional; - } - - public function setAsPassedByReference($byReference = true) - { - $this->byReference = $byReference; - } - - public function isPassedByReference() - { - return $this->byReference; - } - - public function setAsVariadic($isVariadic = true) - { - $this->isVariadic = $isVariadic; - } - - public function isVariadic() - { - return $this->isVariadic; - } - - /** - * @deprecated use getArgumentTypeNode instead - * @return string|null - */ - public function getTypeHint() - { - $type = $this->typeNode->getNonNullTypes() ? $this->typeNode->getNonNullTypes()[0] : null; - - return $type ? ltrim($type, '\\') : null; - } - - /** - * @deprecated use setArgumentTypeNode instead - * @param string|null $typeHint - */ - public function setTypeHint($typeHint = null) - { - $this->typeNode = ($typeHint === null) ? new ArgumentTypeNode() : new ArgumentTypeNode($typeHint); - } - - /** - * @deprecated use getArgumentTypeNode instead - * @return bool - */ - public function isNullable() - { - return $this->typeNode->canUseNullShorthand(); - } - - /** - * @deprecated use getArgumentTypeNode instead - * @param bool $isNullable - */ - public function setAsNullable($isNullable = true) - { - $nonNullTypes = $this->typeNode->getNonNullTypes(); - $this->typeNode = $isNullable ? new ArgumentTypeNode('null', ...$nonNullTypes) : new ArgumentTypeNode(...$nonNullTypes); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php deleted file mode 100644 index 0a18b91e..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentTypeNode.php +++ /dev/null @@ -1,10 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Exception\Doubler\MethodNotExtendableException; -use Prophecy\Exception\InvalidArgumentException; - -/** - * Class node. - * - * @author Konstantin Kudryashov - */ -class ClassNode -{ - private $parentClass = 'stdClass'; - private $interfaces = array(); - private $properties = array(); - private $unextendableMethods = array(); - - /** - * @var MethodNode[] - */ - private $methods = array(); - - public function getParentClass() - { - return $this->parentClass; - } - - /** - * @param string $class - */ - public function setParentClass($class) - { - $this->parentClass = $class ?: 'stdClass'; - } - - /** - * @return string[] - */ - public function getInterfaces() - { - return $this->interfaces; - } - - /** - * @param string $interface - */ - public function addInterface($interface) - { - if ($this->hasInterface($interface)) { - return; - } - - array_unshift($this->interfaces, $interface); - } - - /** - * @param string $interface - * - * @return bool - */ - public function hasInterface($interface) - { - return in_array($interface, $this->interfaces); - } - - public function getProperties() - { - return $this->properties; - } - - public function addProperty($name, $visibility = 'public') - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` property visibility is not supported.', $visibility - )); - } - - $this->properties[$name] = $visibility; - } - - /** - * @return MethodNode[] - */ - public function getMethods() - { - return $this->methods; - } - - public function addMethod(MethodNode $method, $force = false) - { - if (!$this->isExtendable($method->getName())){ - $message = sprintf( - 'Method `%s` is not extendable, so can not be added.', $method->getName() - ); - throw new MethodNotExtendableException($message, $this->getParentClass(), $method->getName()); - } - - if ($force || !isset($this->methods[$method->getName()])) { - $this->methods[$method->getName()] = $method; - } - } - - public function removeMethod($name) - { - unset($this->methods[$name]); - } - - /** - * @param string $name - * - * @return MethodNode|null - */ - public function getMethod($name) - { - return $this->hasMethod($name) ? $this->methods[$name] : null; - } - - /** - * @param string $name - * - * @return bool - */ - public function hasMethod($name) - { - return isset($this->methods[$name]); - } - - /** - * @return string[] - */ - public function getUnextendableMethods() - { - return $this->unextendableMethods; - } - - /** - * @param string $unextendableMethod - */ - public function addUnextendableMethod($unextendableMethod) - { - if (!$this->isExtendable($unextendableMethod)){ - return; - } - $this->unextendableMethods[] = $unextendableMethod; - } - - /** - * @param string $method - * @return bool - */ - public function isExtendable($method) - { - return !in_array($method, $this->unextendableMethods); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php deleted file mode 100644 index ece652f9..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php +++ /dev/null @@ -1,210 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Doubler\Generator\TypeHintReference; -use Prophecy\Exception\InvalidArgumentException; - -/** - * Method node. - * - * @author Konstantin Kudryashov - */ -class MethodNode -{ - private $name; - private $code; - private $visibility = 'public'; - private $static = false; - private $returnsReference = false; - - /** @var ReturnTypeNode */ - private $returnTypeNode; - - /** - * @var ArgumentNode[] - */ - private $arguments = array(); - - /** - * @param string $name - * @param string $code - */ - public function __construct($name, $code = null, TypeHintReference $typeHintReference = null) - { - $this->name = $name; - $this->code = $code; - $this->returnTypeNode = new ReturnTypeNode(); - } - - public function getVisibility() - { - return $this->visibility; - } - - /** - * @param string $visibility - */ - public function setVisibility($visibility) - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` method visibility is not supported.', $visibility - )); - } - - $this->visibility = $visibility; - } - - public function isStatic() - { - return $this->static; - } - - public function setStatic($static = true) - { - $this->static = (bool) $static; - } - - public function returnsReference() - { - return $this->returnsReference; - } - - public function setReturnsReference() - { - $this->returnsReference = true; - } - - public function getName() - { - return $this->name; - } - - public function addArgument(ArgumentNode $argument) - { - $this->arguments[] = $argument; - } - - /** - * @return ArgumentNode[] - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * @deprecated use getReturnTypeNode instead - * @return bool - */ - public function hasReturnType() - { - return (bool) $this->returnTypeNode->getNonNullTypes(); - } - - public function setReturnTypeNode(ReturnTypeNode $returnTypeNode): void - { - $this->returnTypeNode = $returnTypeNode; - } - - /** - * @deprecated use setReturnTypeNode instead - * @param string $type - */ - public function setReturnType($type = null) - { - $this->returnTypeNode = ($type === '' || $type === null) ? new ReturnTypeNode() : new ReturnTypeNode($type); - } - - /** - * @deprecated use setReturnTypeNode instead - * @param bool $bool - */ - public function setNullableReturnType($bool = true) - { - if ($bool) { - $this->returnTypeNode = new ReturnTypeNode('null', ...$this->returnTypeNode->getTypes()); - } - else { - $this->returnTypeNode = new ReturnTypeNode(...$this->returnTypeNode->getNonNullTypes()); - } - } - - /** - * @deprecated use getReturnTypeNode instead - * @return string|null - */ - public function getReturnType() - { - if ($types = $this->returnTypeNode->getNonNullTypes()) - { - return $types[0]; - } - - return null; - } - - public function getReturnTypeNode() : ReturnTypeNode - { - return $this->returnTypeNode; - } - - /** - * @deprecated use getReturnTypeNode instead - * @return bool - */ - public function hasNullableReturnType() - { - return $this->returnTypeNode->canUseNullShorthand(); - } - - /** - * @param string $code - */ - public function setCode($code) - { - $this->code = $code; - } - - public function getCode() - { - if ($this->returnsReference) - { - return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');"; - } - - return (string) $this->code; - } - - public function useParentCode() - { - $this->code = sprintf( - 'return parent::%s(%s);', $this->getName(), implode(', ', - array_map(array($this, 'generateArgument'), $this->arguments) - ) - ); - } - - private function generateArgument(ArgumentNode $arg) - { - $argument = '$'.$arg->getName(); - - if ($arg->isVariadic()) { - $argument = '...'.$argument; - } - - return $argument; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php deleted file mode 100644 index 5b582498..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ReturnTypeNode.php +++ /dev/null @@ -1,45 +0,0 @@ -types['void']) && count($this->types) !== 1) { - throw new DoubleException('void cannot be part of a union'); - } - if (isset($this->types['never']) && count($this->types) !== 1) { - throw new DoubleException('never cannot be part of a union'); - } - - parent::guardIsValidType(); - } - - /** - * @deprecated use hasReturnStatement - */ - public function isVoid() - { - return $this->types == ['void' => 'void']; - } - - public function hasReturnStatement(): bool - { - return $this->types !== ['void' => 'void'] - && $this->types !== ['never' => 'never']; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php deleted file mode 100644 index 97fc5497..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/TypeNodeAbstract.php +++ /dev/null @@ -1,97 +0,0 @@ -getRealType($type); - $this->types[$type] = $type; - } - - $this->guardIsValidType(); - } - - public function canUseNullShorthand(): bool - { - return isset($this->types['null']) && count($this->types) <= 2; - } - - public function getTypes(): array - { - return array_values($this->types); - } - - public function getNonNullTypes(): array - { - $nonNullTypes = $this->types; - unset($nonNullTypes['null']); - - return array_values($nonNullTypes); - } - - protected function prefixWithNsSeparator(string $type): string - { - return '\\' . ltrim($type, '\\'); - } - - protected function getRealType(string $type): string - { - switch ($type) { - // type aliases - case 'double': - case 'real': - return 'float'; - case 'boolean': - return 'bool'; - case 'integer': - return 'int'; - - // built in types - case 'self': - case 'static': - case 'array': - case 'callable': - case 'bool': - case 'false': - case 'float': - case 'int': - case 'string': - case 'iterable': - case 'object': - case 'null': - return $type; - case 'mixed': - return \PHP_VERSION_ID < 80000 ? $this->prefixWithNsSeparator($type) : $type; - - default: - return $this->prefixWithNsSeparator($type); - } - } - - protected function guardIsValidType() - { - if ($this->types == ['null' => 'null']) { - throw new DoubleException('Type cannot be standalone null'); - } - - if ($this->types == ['false' => 'false']) { - throw new DoubleException('Type cannot be standalone false'); - } - - if ($this->types == ['false' => 'false', 'null' => 'null']) { - throw new DoubleException('Type cannot be nullable false'); - } - - if (\PHP_VERSION_ID >= 80000 && isset($this->types['mixed']) && count($this->types) !== 1) { - throw new DoubleException('mixed cannot be part of a union'); - } - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php deleted file mode 100644 index d720b151..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -/** - * Reflection interface. - * All reflected classes implement this interface. - * - * @author Konstantin Kudryashov - */ -interface ReflectionInterface -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php deleted file mode 100644 index 5e8aa303..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/TypeHintReference.php +++ /dev/null @@ -1,43 +0,0 @@ -= 80000; - - default: - return false; - } - } - - public function isBuiltInReturnTypeHint($type) - { - if ($type === 'void') { - return true; - } - - return $this->isBuiltInParamTypeHint($type); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php deleted file mode 100644 index 8a99c4ce..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Prophecy\Exception\Doubler\DoubleException; -use Prophecy\Exception\Doubler\ClassNotFoundException; -use Prophecy\Exception\Doubler\InterfaceNotFoundException; -use ReflectionClass; - -/** - * Lazy double. - * Gives simple interface to describe double before creating it. - * - * @author Konstantin Kudryashov - */ -class LazyDouble -{ - private $doubler; - private $class; - private $interfaces = array(); - private $arguments = null; - private $double; - - /** - * Initializes lazy double. - * - * @param Doubler $doubler - */ - public function __construct(Doubler $doubler) - { - $this->doubler = $doubler; - } - - /** - * Tells doubler to use specific class as parent one for double. - * - * @param string|ReflectionClass $class - * - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function setParentClass($class) - { - if (null !== $this->double) { - throw new DoubleException('Can not extend class with already instantiated double.'); - } - - if (!$class instanceof ReflectionClass) { - if (!class_exists($class)) { - throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class); - } - - $class = new ReflectionClass($class); - } - - $this->class = $class; - } - - /** - * Tells doubler to implement specific interface with double. - * - * @param string|ReflectionClass $interface - * - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function addInterface($interface) - { - if (null !== $this->double) { - throw new DoubleException( - 'Can not implement interface with already instantiated double.' - ); - } - - if (!$interface instanceof ReflectionClass) { - if (!interface_exists($interface)) { - throw new InterfaceNotFoundException( - sprintf('Interface %s not found.', $interface), - $interface - ); - } - - $interface = new ReflectionClass($interface); - } - - $this->interfaces[] = $interface; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - */ - public function setArguments(array $arguments = null) - { - $this->arguments = $arguments; - } - - /** - * Creates double instance or returns already created one. - * - * @return DoubleInterface - */ - public function getInstance() - { - if (null === $this->double) { - if (null !== $this->arguments) { - return $this->double = $this->doubler->double( - $this->class, $this->interfaces, $this->arguments - ); - } - - $this->double = $this->doubler->double($this->class, $this->interfaces); - } - - return $this->double; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php deleted file mode 100644 index d67ec6a4..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Name generator. - * Generates classname for double. - * - * @author Konstantin Kudryashov - */ -class NameGenerator -{ - private static $counter = 1; - - /** - * Generates name. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - public function name(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - - if (null !== $class) { - $parts[] = $class->getName(); - } else { - foreach ($interfaces as $interface) { - $parts[] = $interface->getShortName(); - } - } - - if (!count($parts)) { - $parts[] = 'stdClass'; - } - - return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php deleted file mode 100644 index 48ed2254..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php +++ /dev/null @@ -1,40 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Call; - -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Prophecy\ObjectProphecy; - -class UnexpectedCallException extends ObjectProphecyException -{ - private $methodName; - private $arguments; - - public function __construct($message, ObjectProphecy $objectProphecy, - $methodName, array $arguments) - { - parent::__construct($message, $objectProphecy); - - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php deleted file mode 100644 index 822918a2..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -class ClassCreatorException extends \RuntimeException implements DoublerException -{ - private $node; - - public function __construct($message, ClassNode $node) - { - parent::__construct($message); - - $this->node = $node; - } - - public function getClassNode() - { - return $this->node; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php deleted file mode 100644 index 8fc53b8b..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use ReflectionClass; - -class ClassMirrorException extends \RuntimeException implements DoublerException -{ - private $class; - - public function __construct($message, ReflectionClass $class) - { - parent::__construct($message); - - $this->class = $class; - } - - public function getReflectedClass() - { - return $this->class; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php deleted file mode 100644 index 5bc826d7..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ClassNotFoundException extends DoubleException -{ - private $classname; - - /** - * @param string $message - * @param string $classname - */ - public function __construct($message, $classname) - { - parent::__construct($message); - - $this->classname = $classname; - } - - public function getClassname() - { - return $this->classname; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php deleted file mode 100644 index 6642a58f..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use RuntimeException; - -class DoubleException extends RuntimeException implements DoublerException -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php deleted file mode 100644 index 9d6be179..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Exception\Exception; - -interface DoublerException extends Exception -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php deleted file mode 100644 index e344dead..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class InterfaceNotFoundException extends ClassNotFoundException -{ - public function getInterfaceName() - { - return $this->getClassname(); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php deleted file mode 100644 index 56f47b11..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotExtendableException.php +++ /dev/null @@ -1,41 +0,0 @@ -methodName = $methodName; - $this->className = $className; - } - - - /** - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * @return string - */ - public function getClassName() - { - return $this->className; - } - - } diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php deleted file mode 100644 index a5383494..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class MethodNotFoundException extends DoubleException -{ - /** - * @var string|object - */ - private $classname; - - /** - * @var string - */ - private $methodName; - - /** - * @var array - */ - private $arguments; - - /** - * @param string $message - * @param string|object $classname - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - */ - public function __construct($message, $classname, $methodName, $arguments = null) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php deleted file mode 100644 index 63030497..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ReturnByReferenceException extends DoubleException -{ - private $classname; - private $methodName; - - /** - * @param string $message - * @param string $classname - * @param string $methodName - */ - public function __construct($message, $classname, $methodName) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php deleted file mode 100644 index 41619128..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -/** - * Core Prophecy exception interface. - * All Prophecy exceptions implement it. - * - * @author Konstantin Kudryashov - */ -interface Exception extends \Throwable -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php deleted file mode 100644 index bc91c690..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php deleted file mode 100644 index a00dfb03..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php +++ /dev/null @@ -1,51 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\ObjectProphecy; - -class AggregateException extends \RuntimeException implements PredictionException -{ - private $exceptions = array(); - private $objectProphecy; - - public function append(PredictionException $exception) - { - $message = $exception->getMessage(); - $message = strtr($message, array("\n" => "\n "))."\n"; - $message = empty($this->exceptions) ? $message : "\n" . $message; - - $this->message = rtrim($this->message.$message); - $this->exceptions[] = $exception; - } - - /** - * @return PredictionException[] - */ - public function getExceptions() - { - return $this->exceptions; - } - - public function setObjectProphecy(ObjectProphecy $objectProphecy) - { - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php deleted file mode 100644 index bbbbc3d9..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use RuntimeException; - -/** - * Basic failed prediction exception. - * Use it for custom prediction failures. - * - * @author Konstantin Kudryashov - */ -class FailedPredictionException extends RuntimeException implements PredictionException -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php deleted file mode 100644 index 05ea4aad..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class NoCallsException extends MethodProphecyException implements PredictionException -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php deleted file mode 100644 index 2596b1ef..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Exception; - -interface PredictionException extends Exception -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php deleted file mode 100644 index 9d905431..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; - -class UnexpectedCallsCountException extends UnexpectedCallsException -{ - private $expectedCount; - - public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) - { - parent::__construct($message, $methodProphecy, $calls); - - $this->expectedCount = intval($count); - } - - public function getExpectedCount() - { - return $this->expectedCount; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php deleted file mode 100644 index 7a99c2d7..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class UnexpectedCallsException extends MethodProphecyException implements PredictionException -{ - private $calls = array(); - - public function __construct($message, MethodProphecy $methodProphecy, array $calls) - { - parent::__construct($message, $methodProphecy); - - $this->calls = $calls; - } - - public function getCalls() - { - return $this->calls; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php deleted file mode 100644 index 1b03eaf4..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\MethodProphecy; - -class MethodProphecyException extends ObjectProphecyException -{ - private $methodProphecy; - - public function __construct($message, MethodProphecy $methodProphecy) - { - parent::__construct($message, $methodProphecy->getObjectProphecy()); - - $this->methodProphecy = $methodProphecy; - } - - /** - * @return MethodProphecy - */ - public function getMethodProphecy() - { - return $this->methodProphecy; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php deleted file mode 100644 index e345402e..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\ObjectProphecy; - -class ObjectProphecyException extends \RuntimeException implements ProphecyException -{ - private $objectProphecy; - - public function __construct($message, ObjectProphecy $objectProphecy) - { - parent::__construct($message); - - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php deleted file mode 100644 index 91573328..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Exception\Exception; - -interface ProphecyException extends Exception -{ -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php deleted file mode 100644 index 209821ce..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassAndInterfaceTagRetriever.php +++ /dev/null @@ -1,69 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; -use phpDocumentor\Reflection\DocBlock\Tags\Method; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class ClassAndInterfaceTagRetriever implements MethodTagRetrieverInterface -{ - private $classRetriever; - - public function __construct(MethodTagRetrieverInterface $classRetriever = null) - { - if (null !== $classRetriever) { - $this->classRetriever = $classRetriever; - - return; - } - - $this->classRetriever = class_exists('phpDocumentor\Reflection\DocBlockFactory') && class_exists('phpDocumentor\Reflection\Types\ContextFactory') - ? new ClassTagRetriever() - : new LegacyClassTagRetriever() - ; - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - return array_merge( - $this->classRetriever->getTagList($reflectionClass), - $this->getInterfacesTagList($reflectionClass) - ); - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - private function getInterfacesTagList(\ReflectionClass $reflectionClass) - { - $interfaces = $reflectionClass->getInterfaces(); - $tagList = array(); - - foreach($interfaces as $interface) { - $tagList = array_merge($tagList, $this->classRetriever->getTagList($interface)); - } - - return $tagList; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php deleted file mode 100644 index 9817a447..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/ClassTagRetriever.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tags\Method; -use phpDocumentor\Reflection\DocBlockFactory; -use phpDocumentor\Reflection\Types\ContextFactory; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class ClassTagRetriever implements MethodTagRetrieverInterface -{ - private $docBlockFactory; - private $contextFactory; - - public function __construct() - { - $this->docBlockFactory = DocBlockFactory::createInstance(); - $this->contextFactory = new ContextFactory(); - } - - /** - * @param \ReflectionClass $reflectionClass - * - * @return Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - try { - $phpdoc = $this->docBlockFactory->create( - $reflectionClass, - $this->contextFactory->createFromReflector($reflectionClass) - ); - - $methods = array(); - - foreach ($phpdoc->getTagsByName('method') as $tag) { - if ($tag instanceof Method) { - $methods[] = $tag; - } - } - - return $methods; - } catch (\InvalidArgumentException $e) { - return array(); - } - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php deleted file mode 100644 index c0dec3de..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/LegacyClassTagRetriever.php +++ /dev/null @@ -1,35 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; - -/** - * @author Théo FIDRY - * - * @internal - */ -final class LegacyClassTagRetriever implements MethodTagRetrieverInterface -{ - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[] - */ - public function getTagList(\ReflectionClass $reflectionClass) - { - $phpdoc = new DocBlock($reflectionClass->getDocComment()); - - return $phpdoc->getTagsByName('method'); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php b/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php deleted file mode 100644 index d3989dad..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/PhpDocumentor/MethodTagRetrieverInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\PhpDocumentor; - -use phpDocumentor\Reflection\DocBlock\Tag\MethodTag as LegacyMethodTag; -use phpDocumentor\Reflection\DocBlock\Tags\Method; - -/** - * @author Théo FIDRY - * - * @internal - */ -interface MethodTagRetrieverInterface -{ - /** - * @param \ReflectionClass $reflectionClass - * - * @return LegacyMethodTag[]|Method[] - */ - public function getTagList(\ReflectionClass $reflectionClass); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php deleted file mode 100644 index b4787366..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\NoCallsException; - -/** - * Call prediction. - * - * @author Konstantin Kudryashov - */ -class CallPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was at least one call. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\NoCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($methodCalls)) { - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.\n". - "Recorded `%s(...)` calls:\n%s", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ), $method); - } - - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ), $method); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php deleted file mode 100644 index 31c6c575..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php +++ /dev/null @@ -1,107 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsCountException; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -class CallTimesPrediction implements PredictionInterface -{ - private $times; - private $util; - - /** - * Initializes prediction. - * - * @param int $times - * @param StringUtil $util - */ - public function __construct($times, StringUtil $util = null) - { - $this->times = intval($times); - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was exact amount of calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if ($this->times == count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($calls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but %d were made:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $this->util->stringifyCalls($calls) - ); - } elseif (count($methodCalls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.\n". - "Recorded `%s(...)` calls:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ); - } else { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ); - } - - throw new UnexpectedCallsCountException($message, $method, $this->times, $calls); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php deleted file mode 100644 index 727931f3..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; -use ReflectionFunction; - -/** - * Callback prediction. - * - * @author Konstantin Kudryashov - */ -class CallbackPrediction implements PredictionInterface -{ - private $callback; - - /** - * Initializes callback prediction. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPrediction, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Executes preset callback. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind') && (new ReflectionFunction($callback))->getClosureThis() !== null) { - $callback = Closure::bind($callback, $object); - } - - call_user_func($callback, $calls, $object, $method); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php deleted file mode 100644 index 46ac5bfc..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsException; - -/** - * No calls prediction. - * - * @author Konstantin Kudryashov - */ -class NoCallsPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param null|StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there were no calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (!count($calls)) { - return; - } - - $verb = count($calls) === 1 ? 'was' : 'were'; - - throw new UnexpectedCallsException(sprintf( - "No calls expected that match:\n". - " %s->%s(%s)\n". - "but %d %s made:\n%s", - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $verb, - $this->util->stringifyCalls($calls) - ), $method, $calls); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php deleted file mode 100644 index f7fb06a9..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PredictionInterface -{ - /** - * Tests that double fulfilled prediction. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - * @return void - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php deleted file mode 100644 index f766e6e6..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; -use ReflectionFunction; - -/** - * Callback promise. - * - * @author Konstantin Kudryashov - */ -class CallbackPromise implements PromiseInterface -{ - private $callback; - - /** - * Initializes callback promise. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPromise, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Evaluates promise callback. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind') && (new ReflectionFunction($callback))->getClosureThis() !== null) { - $callback = Closure::bind($callback, $object); - } - - return call_user_func($callback, $args, $object, $method); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php deleted file mode 100644 index 382537b4..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Promise interface. - * Promises are logical blocks, tied to `will...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PromiseInterface -{ - /** - * Evaluates promise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php deleted file mode 100644 index 39bfeea0..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php +++ /dev/null @@ -1,61 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return argument promise. - * - * @author Konstantin Kudryashov - */ -class ReturnArgumentPromise implements PromiseInterface -{ - /** - * @var int - */ - private $index; - - /** - * Initializes callback promise. - * - * @param int $index The zero-indexed number of the argument to return - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($index = 0) - { - if (!is_int($index) || $index < 0) { - throw new InvalidArgumentException(sprintf( - 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.', - $index - )); - } - $this->index = $index; - } - - /** - * Returns nth argument if has one, null otherwise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return null|mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - return count($args) > $this->index ? $args[$this->index] : null; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php deleted file mode 100644 index c7d5ac59..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return promise. - * - * @author Konstantin Kudryashov - */ -class ReturnPromise implements PromiseInterface -{ - private $returnValues = array(); - - /** - * Initializes promise. - * - * @param array $returnValues Array of values - */ - public function __construct(array $returnValues) - { - $this->returnValues = $returnValues; - } - - /** - * Returns saved values one by one until last one, then continuously returns last value. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $value = array_shift($this->returnValues); - - if (!count($this->returnValues)) { - $this->returnValues[] = $value; - } - - return $value; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php deleted file mode 100644 index 26ec19ed..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php +++ /dev/null @@ -1,100 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Throw promise. - * - * @author Konstantin Kudryashov - */ -class ThrowPromise implements PromiseInterface -{ - private $exception; - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes promise. - * - * @param string|\Exception|\Throwable $exception Exception class name or instance - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($exception) - { - if (is_string($exception)) { - if ((!class_exists($exception) && !interface_exists($exception)) || !$this->isAValidThrowable($exception)) { - throw new InvalidArgumentException(sprintf( - 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', - $exception - )); - } - } elseif (!$exception instanceof \Exception && !$exception instanceof \Throwable) { - throw new InvalidArgumentException(sprintf( - 'Exception / Throwable class or instance expected as argument to ThrowPromise, but got %s.', - is_object($exception) ? get_class($exception) : gettype($exception) - )); - } - - $this->exception = $exception; - } - - /** - * Throws predefined exception. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - if (is_string($this->exception)) { - $classname = $this->exception; - $reflection = new ReflectionClass($classname); - $constructor = $reflection->getConstructor(); - - if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) { - throw $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - throw $this->instantiator->instantiate($classname); - } - - throw $this->exception; - } - - /** - * @param string $exception - * - * @return bool - */ - private function isAValidThrowable($exception) - { - return is_a($exception, 'Exception', true) - || is_a($exception, 'Throwable', true); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php deleted file mode 100644 index c45c281d..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php +++ /dev/null @@ -1,573 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use Prophecy\Argument; -use Prophecy\Prophet; -use Prophecy\Promise; -use Prophecy\Prediction; -use Prophecy\Exception\Doubler\MethodNotFoundException; -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Prophecy\MethodProphecyException; -use ReflectionNamedType; -use ReflectionType; -use ReflectionUnionType; - -/** - * Method prophecy. - * - * @author Konstantin Kudryashov - */ -class MethodProphecy -{ - private $objectProphecy; - private $methodName; - private $argumentsWildcard; - private $promise; - private $prediction; - private $checkedPredictions = array(); - private $bound = false; - private $voidReturnType = false; - - /** - * Initializes method prophecy. - * - * @param ObjectProphecy $objectProphecy - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - * - * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found - */ - public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null) - { - $double = $objectProphecy->reveal(); - if (!method_exists($double, $methodName)) { - throw new MethodNotFoundException(sprintf( - 'Method `%s::%s()` is not defined.', get_class($double), $methodName - ), get_class($double), $methodName, $arguments); - } - - $this->objectProphecy = $objectProphecy; - $this->methodName = $methodName; - - $reflectedMethod = new \ReflectionMethod($double, $methodName); - if ($reflectedMethod->isFinal()) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as it is a final method.", - get_class($double), - $methodName - ), $this); - } - - if (null !== $arguments) { - $this->withArguments($arguments); - } - - $hasTentativeReturnType = method_exists($reflectedMethod, 'hasTentativeReturnType') - && $reflectedMethod->hasTentativeReturnType(); - - if (true === $reflectedMethod->hasReturnType() || $hasTentativeReturnType) { - if ($hasTentativeReturnType) { - $reflectionType = $reflectedMethod->getTentativeReturnType(); - } - else { - $reflectionType = $reflectedMethod->getReturnType(); - } - - if ($reflectionType instanceof ReflectionNamedType) { - $types = [$reflectionType]; - } - elseif ($reflectionType instanceof ReflectionUnionType) { - $types = $reflectionType->getTypes(); - } - - $types = array_map( - function(ReflectionType $type) { return $type->getName(); }, - $types - ); - - usort( - $types, - static function(string $type1, string $type2) { - - // null is lowest priority - if ($type2 == 'null') { - return -1; - } - elseif ($type1 == 'null') { - return 1; - } - - // objects are higher priority than scalars - $isObject = static function($type) { - return class_exists($type) || interface_exists($type); - }; - - if($isObject($type1) && !$isObject($type2)) { - return -1; - } - elseif(!$isObject($type1) && $isObject($type2)) - { - return 1; - } - - // don't sort both-scalars or both-objects - return 0; - } - ); - - $defaultType = $types[0]; - - if ('void' === $defaultType) { - $this->voidReturnType = true; - } - - $this->will(function () use ($defaultType) { - switch ($defaultType) { - case 'void': return; - case 'string': return ''; - case 'float': return 0.0; - case 'int': return 0; - case 'bool': return false; - case 'array': return array(); - - case 'callable': - case 'Closure': - return function () {}; - - case 'Traversable': - case 'Generator': - return (function () { yield; })(); - - default: - $prophet = new Prophet; - return $prophet->prophesize($defaultType)->reveal(); - } - }); - } - } - - /** - * Sets argument wildcard. - * - * @param array|Argument\ArgumentsWildcard $arguments - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function withArguments($arguments) - { - if (is_array($arguments)) { - $arguments = new Argument\ArgumentsWildcard($arguments); - } - - if (!$arguments instanceof Argument\ArgumentsWildcard) { - throw new InvalidArgumentException(sprintf( - "Either an array or an instance of ArgumentsWildcard expected as\n". - 'a `MethodProphecy::withArguments()` argument, but got %s.', - gettype($arguments) - )); - } - - $this->argumentsWildcard = $arguments; - - return $this; - } - - /** - * Sets custom promise to the prophecy. - * - * @param callable|Promise\PromiseInterface $promise - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function will($promise) - { - if (is_callable($promise)) { - $promise = new Promise\CallbackPromise($promise); - } - - if (!$promise instanceof Promise\PromiseInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PromiseInterface, but got %s.', - gettype($promise) - )); - } - - $this->bindToObjectProphecy(); - $this->promise = $promise; - - return $this; - } - - /** - * Sets return promise to the prophecy. - * - * @see \Prophecy\Promise\ReturnPromise - * - * @return $this - */ - public function willReturn() - { - if ($this->voidReturnType) { - throw new MethodProphecyException( - "The method \"$this->methodName\" has a void return type, and so cannot return anything", - $this - ); - } - - return $this->will(new Promise\ReturnPromise(func_get_args())); - } - - /** - * @param array $items - * @param mixed $return - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function willYield($items, $return = null) - { - if ($this->voidReturnType) { - throw new MethodProphecyException( - "The method \"$this->methodName\" has a void return type, and so cannot yield anything", - $this - ); - } - - if (!is_array($items)) { - throw new InvalidArgumentException(sprintf( - 'Expected array, but got %s.', - gettype($items) - )); - } - - $generator = function() use ($items, $return) { - yield from $items; - - return $return; - }; - - return $this->will($generator); - } - - /** - * Sets return argument promise to the prophecy. - * - * @param int $index The zero-indexed number of the argument to return - * - * @see \Prophecy\Promise\ReturnArgumentPromise - * - * @return $this - */ - public function willReturnArgument($index = 0) - { - if ($this->voidReturnType) { - throw new MethodProphecyException("The method \"$this->methodName\" has a void return type", $this); - } - - return $this->will(new Promise\ReturnArgumentPromise($index)); - } - - /** - * Sets throw promise to the prophecy. - * - * @see \Prophecy\Promise\ThrowPromise - * - * @param string|\Exception $exception Exception class or instance - * - * @return $this - */ - public function willThrow($exception) - { - return $this->will(new Promise\ThrowPromise($exception)); - } - - /** - * Sets custom prediction to the prophecy. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function should($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - $this->bindToObjectProphecy(); - $this->prediction = $prediction; - - return $this; - } - - /** - * Sets call prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldBeCalled() - { - return $this->should(new Prediction\CallPrediction); - } - - /** - * Sets no calls prediction to the prophecy. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotBeCalled() - { - return $this->should(new Prediction\NoCallsPrediction); - } - - /** - * Sets call times prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @param $count - * - * @return $this - */ - public function shouldBeCalledTimes($count) - { - return $this->should(new Prediction\CallTimesPrediction($count)); - } - - /** - * Sets call times prediction to the prophecy. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @return $this - */ - public function shouldBeCalledOnce() - { - return $this->shouldBeCalledTimes(1); - } - - /** - * Checks provided prediction immediately. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function shouldHave($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - if (null === $this->promise && !$this->voidReturnType) { - $this->willReturn(); - } - - $calls = $this->getObjectProphecy()->findProphecyMethodCalls( - $this->getMethodName(), - $this->getArgumentsWildcard() - ); - - try { - $prediction->check($calls, $this->getObjectProphecy(), $this); - $this->checkedPredictions[] = $prediction; - } catch (\Exception $e) { - $this->checkedPredictions[] = $prediction; - - throw $e; - } - - return $this; - } - - /** - * Checks call prediction. - * - * @see \Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldHaveBeenCalled() - { - return $this->shouldHave(new Prediction\CallPrediction); - } - - /** - * Checks no calls prediction. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotHaveBeenCalled() - { - return $this->shouldHave(new Prediction\NoCallsPrediction); - } - - /** - * Checks no calls prediction. - * - * @see \Prophecy\Prediction\NoCallsPrediction - * @deprecated - * - * @return $this - */ - public function shouldNotBeenCalled() - { - return $this->shouldNotHaveBeenCalled(); - } - - /** - * Checks call times prediction. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @param int $count - * - * @return $this - */ - public function shouldHaveBeenCalledTimes($count) - { - return $this->shouldHave(new Prediction\CallTimesPrediction($count)); - } - - /** - * Checks call times prediction. - * - * @see \Prophecy\Prediction\CallTimesPrediction - * - * @return $this - */ - public function shouldHaveBeenCalledOnce() - { - return $this->shouldHaveBeenCalledTimes(1); - } - - /** - * Checks currently registered [with should(...)] prediction. - */ - public function checkPrediction() - { - if (null === $this->prediction) { - return; - } - - $this->shouldHave($this->prediction); - } - - /** - * Returns currently registered promise. - * - * @return null|Promise\PromiseInterface - */ - public function getPromise() - { - return $this->promise; - } - - /** - * Returns currently registered prediction. - * - * @return null|Prediction\PredictionInterface - */ - public function getPrediction() - { - return $this->prediction; - } - - /** - * Returns predictions that were checked on this object. - * - * @return Prediction\PredictionInterface[] - */ - public function getCheckedPredictions() - { - return $this->checkedPredictions; - } - - /** - * Returns object prophecy this method prophecy is tied to. - * - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } - - /** - * Returns method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns arguments wildcard. - * - * @return Argument\ArgumentsWildcard - */ - public function getArgumentsWildcard() - { - return $this->argumentsWildcard; - } - - /** - * @return bool - */ - public function hasReturnVoid() - { - return $this->voidReturnType; - } - - private function bindToObjectProphecy() - { - if ($this->bound) { - return; - } - - $this->getObjectProphecy()->addMethodProphecy($this); - $this->bound = true; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php deleted file mode 100644 index 11b87cf1..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php +++ /dev/null @@ -1,286 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Call\Call; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Call\CallCenter; -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Exception\Prediction\AggregateException; -use Prophecy\Exception\Prediction\PredictionException; - -/** - * Object prophecy. - * - * @author Konstantin Kudryashov - */ -class ObjectProphecy implements ProphecyInterface -{ - private $lazyDouble; - private $callCenter; - private $revealer; - private $comparatorFactory; - - /** - * @var MethodProphecy[][] - */ - private $methodProphecies = array(); - - /** - * Initializes object prophecy. - * - * @param LazyDouble $lazyDouble - * @param CallCenter $callCenter - * @param RevealerInterface $revealer - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - LazyDouble $lazyDouble, - CallCenter $callCenter = null, - RevealerInterface $revealer = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->lazyDouble = $lazyDouble; - $this->callCenter = $callCenter ?: new CallCenter; - $this->revealer = $revealer ?: new Revealer; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Forces double to extend specific class. - * - * @param string $class - * - * @return $this - */ - public function willExtend($class) - { - $this->lazyDouble->setParentClass($class); - - return $this; - } - - /** - * Forces double to implement specific interface. - * - * @param string $interface - * - * @return $this - */ - public function willImplement($interface) - { - $this->lazyDouble->addInterface($interface); - - return $this; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - * - * @return $this - */ - public function willBeConstructedWith(array $arguments = null) - { - $this->lazyDouble->setArguments($arguments); - - return $this; - } - - /** - * Reveals double. - * - * @return object - * - * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface - */ - public function reveal() - { - $double = $this->lazyDouble->getInstance(); - - if (null === $double || !$double instanceof ProphecySubjectInterface) { - throw new ObjectProphecyException( - "Generated double must implement ProphecySubjectInterface, but it does not.\n". - 'It seems you have wrongly configured doubler without required ClassPatch.', - $this - ); - } - - $double->setProphecy($this); - - return $double; - } - - /** - * Adds method prophecy to object prophecy. - * - * @param MethodProphecy $methodProphecy - * - * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't - * have arguments wildcard - */ - public function addMethodProphecy(MethodProphecy $methodProphecy) - { - $argumentsWildcard = $methodProphecy->getArgumentsWildcard(); - if (null === $argumentsWildcard) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as you did not specify arguments wildcard for it.", - get_class($this->reveal()), - $methodProphecy->getMethodName() - ), $methodProphecy); - } - - $methodName = strtolower($methodProphecy->getMethodName()); - - if (!isset($this->methodProphecies[$methodName])) { - $this->methodProphecies[$methodName] = array(); - } - - $this->methodProphecies[$methodName][] = $methodProphecy; - } - - /** - * Returns either all or related to single method prophecies. - * - * @param null|string $methodName - * - * @return MethodProphecy[] - */ - public function getMethodProphecies($methodName = null) - { - if (null === $methodName) { - return $this->methodProphecies; - } - - $methodName = strtolower($methodName); - - if (!isset($this->methodProphecies[$methodName])) { - return array(); - } - - return $this->methodProphecies[$methodName]; - } - - /** - * Makes specific method call. - * - * @param string $methodName - * @param array $arguments - * - * @return mixed - */ - public function makeProphecyMethodCall($methodName, array $arguments) - { - $arguments = $this->revealer->reveal($arguments); - $return = $this->callCenter->makeCall($this, $methodName, $arguments); - - return $this->revealer->reveal($return); - } - - /** - * Finds calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard) - { - return $this->callCenter->findCalls($methodName, $wildcard); - } - - /** - * Checks that registered method predictions do not fail. - * - * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail - * @throws \Prophecy\Exception\Call\UnexpectedCallException - */ - public function checkProphecyMethodsPredictions() - { - $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); - $exception->setObjectProphecy($this); - - $this->callCenter->checkUnexpectedCalls(); - - foreach ($this->methodProphecies as $prophecies) { - foreach ($prophecies as $prophecy) { - try { - $prophecy->checkPrediction(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } - - /** - * Creates new method prophecy using specified method name and arguments. - * - * @param string $methodName - * @param array $arguments - * - * @return MethodProphecy - */ - public function __call($methodName, array $arguments) - { - $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments)); - - foreach ($this->getMethodProphecies($methodName) as $prophecy) { - $argumentsWildcard = $prophecy->getArgumentsWildcard(); - $comparator = $this->comparatorFactory->getComparatorFor( - $argumentsWildcard, $arguments - ); - - try { - $comparator->assertEquals($argumentsWildcard, $arguments); - return $prophecy; - } catch (ComparisonFailure $failure) {} - } - - return new MethodProphecy($this, $methodName, $arguments); - } - - /** - * Tries to get property value from double. - * - * @param string $name - * - * @return mixed - */ - public function __get($name) - { - return $this->reveal()->$name; - } - - /** - * Tries to set property value to double. - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - $this->reveal()->$name = $this->revealer->reveal($value); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php deleted file mode 100644 index 462f15a9..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Core Prophecy interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecyInterface -{ - /** - * Reveals prophecy object (double) . - * - * @return object - */ - public function reveal(); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php deleted file mode 100644 index 2d839585..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Controllable doubles interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecySubjectInterface -{ - /** - * Sets subject prophecy. - * - * @param ProphecyInterface $prophecy - */ - public function setProphecy(ProphecyInterface $prophecy); - - /** - * Returns subject prophecy. - * - * @return ProphecyInterface - */ - public function getProphecy(); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php deleted file mode 100644 index 60ecdac8..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Basic prophecies revealer. - * - * @author Konstantin Kudryashov - */ -class Revealer implements RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value) - { - if (is_array($value)) { - return array_map(array($this, __FUNCTION__), $value); - } - - if (!is_object($value)) { - return $value; - } - - if ($value instanceof ProphecyInterface) { - $value = $value->reveal(); - } - - return $value; - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php deleted file mode 100644 index ffc82bb6..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Prophecies revealer interface. - * - * @author Konstantin Kudryashov - */ -interface RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value); -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/vendor/phpspec/prophecy/src/Prophecy/Prophet.php deleted file mode 100644 index d37c92a3..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Prophet.php +++ /dev/null @@ -1,138 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Doubler\CachedDoubler; -use Prophecy\Doubler\Doubler; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Doubler\ClassPatch; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\RevealerInterface; -use Prophecy\Prophecy\Revealer; -use Prophecy\Call\CallCenter; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\PredictionException; -use Prophecy\Exception\Prediction\AggregateException; - -/** - * Prophet creates prophecies. - * - * @author Konstantin Kudryashov - */ -class Prophet -{ - private $doubler; - private $revealer; - private $util; - - /** - * @var ObjectProphecy[] - */ - private $prophecies = array(); - - /** - * Initializes Prophet. - * - * @param null|Doubler $doubler - * @param null|RevealerInterface $revealer - * @param null|StringUtil $util - */ - public function __construct( - Doubler $doubler = null, - RevealerInterface $revealer = null, - StringUtil $util = null - ) { - if (null === $doubler) { - $doubler = new CachedDoubler(); - $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); - $doubler->registerClassPatch(new ClassPatch\TraversablePatch); - $doubler->registerClassPatch(new ClassPatch\ThrowablePatch); - $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); - $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); - $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); - $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch()); - $doubler->registerClassPatch(new ClassPatch\MagicCallPatch); - $doubler->registerClassPatch(new ClassPatch\KeywordPatch); - } - - $this->doubler = $doubler; - $this->revealer = $revealer ?: new Revealer; - $this->util = $util ?: new StringUtil; - } - - /** - * Creates new object prophecy. - * - * @param null|string $classOrInterface Class or interface name - * - * @return ObjectProphecy - */ - public function prophesize($classOrInterface = null) - { - $this->prophecies[] = $prophecy = new ObjectProphecy( - new LazyDouble($this->doubler), - new CallCenter($this->util), - $this->revealer - ); - - if ($classOrInterface && class_exists($classOrInterface)) { - return $prophecy->willExtend($classOrInterface); - } - - if ($classOrInterface && interface_exists($classOrInterface)) { - return $prophecy->willImplement($classOrInterface); - } - - return $prophecy; - } - - /** - * Returns all created object prophecies. - * - * @return ObjectProphecy[] - */ - public function getProphecies() - { - return $this->prophecies; - } - - /** - * Returns Doubler instance assigned to this Prophet. - * - * @return Doubler - */ - public function getDoubler() - { - return $this->doubler; - } - - /** - * Checks all predictions defined by prophecies of this Prophet. - * - * @throws Exception\Prediction\AggregateException If any prediction fails - */ - public function checkPredictions() - { - $exception = new AggregateException("Some predictions failed:\n"); - foreach ($this->prophecies as $prophecy) { - try { - $prophecy->checkProphecyMethodsPredictions(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php deleted file mode 100644 index 1090a801..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php +++ /dev/null @@ -1,210 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * This class is a modification from sebastianbergmann/exporter - * @see https://github.com/sebastianbergmann/exporter - */ -class ExportUtil -{ - /** - * Exports a value as a string - * - * The output of this method is similar to the output of print_r(), but - * improved in various aspects: - * - * - NULL is rendered as "null" (instead of "") - * - TRUE is rendered as "true" (instead of "1") - * - FALSE is rendered as "false" (instead of "") - * - Strings are always quoted with single quotes - * - Carriage returns and newlines are normalized to \n - * - Recursion and repeated rendering is treated properly - * - * @param mixed $value - * @param int $indentation The indentation level of the 2nd+ line - * @return string - */ - public static function export($value, $indentation = 0) - { - return self::recursiveExport($value, $indentation); - } - - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @param mixed $value - * @return array - */ - public static function toArray($value) - { - if (!is_object($value)) { - return (array) $value; - } - - $array = array(); - - foreach ((array) $value as $key => $val) { - // properties are transformed to keys in the following way: - // private $property => "\0Classname\0property" - // protected $property => "\0*\0property" - // public $property => "property" - if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { - $key = $matches[1]; - } - - // See https://github.com/php/php-src/commit/5721132 - if ($key === "\0gcdata") { - continue; - } - - $array[$key] = $val; - } - - // Some internal classes like SplObjectStorage don't work with the - // above (fast) mechanism nor with reflection in Zend. - // Format the output similarly to print_r() in this case - if ($value instanceof \SplObjectStorage) { - // However, the fast method does work in HHVM, and exposes the - // internal implementation. Hide it again. - if (property_exists('\SplObjectStorage', '__storage')) { - unset($array['__storage']); - } elseif (property_exists('\SplObjectStorage', 'storage')) { - unset($array['storage']); - } - - if (property_exists('\SplObjectStorage', '__key')) { - unset($array['__key']); - } - - foreach ($value as $key => $val) { - $array[spl_object_hash($val)] = array( - 'obj' => $val, - 'inf' => $value->getInfo(), - ); - } - } - - return $array; - } - - /** - * Recursive implementation of export - * - * @param mixed $value The value to export - * @param int $indentation The indentation level of the 2nd+ line - * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects - * @return string - * @see SebastianBergmann\Exporter\Exporter::export - */ - protected static function recursiveExport(&$value, $indentation, $processed = null) - { - if ($value === null) { - return 'null'; - } - - if ($value === true) { - return 'true'; - } - - if ($value === false) { - return 'false'; - } - - if (is_float($value) && floatval(intval($value)) === $value) { - return "$value.0"; - } - - if (is_resource($value)) { - return sprintf( - 'resource(%d) of type (%s)', - $value, - get_resource_type($value) - ); - } - - if (is_string($value)) { - // Match for most non printable chars somewhat taking multibyte chars into account - if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { - return 'Binary String: 0x' . bin2hex($value); - } - - return "'" . - str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . - "'"; - } - - $whitespace = str_repeat(' ', 4 * $indentation); - - if (!$processed) { - $processed = new Context; - } - - if (is_array($value)) { - if (($key = $processed->contains($value)) !== false) { - return 'Array &' . $key; - } - - $array = $value; - $key = $processed->add($value); - $values = ''; - - if (count($array) > 0) { - foreach ($array as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - self::recursiveExport($k, $indentation), - self::recursiveExport($value[$k], $indentation + 1, $processed) - ); - } - - $values = "\n" . $values . $whitespace; - } - - return sprintf('Array &%s (%s)', $key, $values); - } - - if (is_object($value)) { - $class = get_class($value); - - if ($hash = $processed->contains($value)) { - return sprintf('%s:%s Object', $class, $hash); - } - - $hash = $processed->add($value); - $values = ''; - $array = self::toArray($value); - - if (count($array) > 0) { - foreach ($array as $k => $v) { - $values .= sprintf( - '%s %s => %s' . "\n", - $whitespace, - self::recursiveExport($k, $indentation), - self::recursiveExport($v, $indentation + 1, $processed) - ); - } - - $values = "\n" . $values . $whitespace; - } - - return sprintf('%s:%s Object (%s)', $class, $hash, $values); - } - - return var_export($value, true); - } -} diff --git a/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php deleted file mode 100644 index ba4faff5..00000000 --- a/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php +++ /dev/null @@ -1,99 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Util; - -use Prophecy\Call\Call; - -/** - * String utility. - * - * @author Konstantin Kudryashov - */ -class StringUtil -{ - private $verbose; - - /** - * @param bool $verbose - */ - public function __construct($verbose = true) - { - $this->verbose = $verbose; - } - - /** - * Stringifies any provided value. - * - * @param mixed $value - * @param boolean $exportObject - * - * @return string - */ - public function stringify($value, $exportObject = true) - { - if (is_array($value)) { - if (range(0, count($value) - 1) === array_keys($value)) { - return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']'; - } - - $stringify = array($this, __FUNCTION__); - - return '['.implode(', ', array_map(function ($item, $key) use ($stringify) { - return (is_integer($key) ? $key : '"'.$key.'"'). - ' => '.call_user_func($stringify, $item); - }, $value, array_keys($value))).']'; - } - if (is_resource($value)) { - return get_resource_type($value).':'.$value; - } - if (is_object($value)) { - return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value)); - } - if (true === $value || false === $value) { - return $value ? 'true' : 'false'; - } - if (is_string($value)) { - $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); - - if (!$this->verbose && 50 <= strlen($str)) { - return substr($str, 0, 50).'"...'; - } - - return $str; - } - if (null === $value) { - return 'null'; - } - - return (string) $value; - } - - /** - * Stringifies provided array of calls. - * - * @param Call[] $calls Array of Call instances - * - * @return string - */ - public function stringifyCalls(array $calls) - { - $self = $this; - - return implode(PHP_EOL, array_map(function (Call $call) use ($self) { - return sprintf(' - %s(%s) @ %s', - $call->getMethodName(), - implode(', ', array_map(array($self, 'stringify'), $call->getArguments())), - str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace()) - ); - }, $calls)); - } -} diff --git a/vendor/phpunit/php-code-coverage/ChangeLog.md b/vendor/phpunit/php-code-coverage/ChangeLog.md deleted file mode 100644 index 2e5df9c3..00000000 --- a/vendor/phpunit/php-code-coverage/ChangeLog.md +++ /dev/null @@ -1,448 +0,0 @@ -# ChangeLog - -All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [9.2.15] - 2022-03-07 - -### Fixed - -* [#885](https://github.com/sebastianbergmann/php-code-coverage/issues/885): Files that have only `\r` (CR, 0x0d) EOL characters are not handled correctly -* [#907](https://github.com/sebastianbergmann/php-code-coverage/issues/907): Line with only `return [` is not recognized as executable - -## [9.2.14] - 2022-02-28 - -### Fixed - -* [#904](https://github.com/sebastianbergmann/php-code-coverage/issues/904): Lines of code containing the `match` keyword were not recognized as executable correctly -* [#905](https://github.com/sebastianbergmann/php-code-coverage/issues/905): Lines of code in constructors were not recognized as executable correctly when constructor property promotion is used - -## [9.2.13] - 2022-02-23 - -### Changed - -* The contents of the static analysis sourcecode files is now used to generate the static analysis cache version identifier - -### Fixed - -* Reverted rename of `SebastianBergmann\CodeCoverage\ProcessedCodeCoverageData` to `SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData` (this class is marked as `@internal` and not covered by the backward compatibility promise, but it is (still) used directly by PHPUnit) -* Reverted rename of `SebastianBergmann\CodeCoverage\RawCodeCoverageData` to `SebastianBergmann\CodeCoverage\Data\RawCodeCoverageData` (this class is marked as `@internal` and not covered by the backward compatibility promise, but it is (still) used directly by PHPUnit) -* The `ArrayDim`, `Cast`, and `MethodCall` nodes are now considered when determining whether a line of code is executable or not - -## [9.2.12] - 2022-02-23 [YANKED] - -### Changed - -* [#898](https://github.com/sebastianbergmann/php-code-coverage/pull/898): Use content hash instead of `filemtime()` to determine cache hit/miss - -### Fixed - -* [#736](https://github.com/sebastianbergmann/php-code-coverage/issues/736): HTML report generator allows invalid values for low upper bound and high lower bound -* [#854](https://github.com/sebastianbergmann/php-code-coverage/issues/854): "Class Coverage Distribution" and "Class Complexity" graphs are not displayed at full width -* [#897](https://github.com/sebastianbergmann/php-code-coverage/issues/897): `declare(strict_types=1)` marked as uncovered - -## [9.2.11] - 2022-02-18 - -### Changed - -* `CoveredFileAnalyser` and `UncoveredFileAnalyser` have been combined to `FileAnalyser` -* Updated bundled CSS/JavaScript components used for HTML report: Bootstrap 4.6.1, jQuery 3.6.0, and popper.js 1.16.1 - -### Fixed - -* [#889](https://github.com/sebastianbergmann/php-code-coverage/issues/889): Code Coverage depends on autoload order - -## [9.2.10] - 2021-12-05 - -### Fixed - -* [#887](https://github.com/sebastianbergmann/php-code-coverage/issues/887): Document return type of `CodeUnitFindingVisitor::enterNode()` so that Symfony's DebugClassLoader does not trigger a deprecation warning - -## [9.2.9] - 2021-11-19 - -### Fixed - -* [#882](https://github.com/sebastianbergmann/php-code-coverage/issues/882): PHPUnit 9.2.8 has wrong version number - -## [9.2.8] - 2021-10-30 - -### Fixed - -* [#866](https://github.com/sebastianbergmann/php-code-coverage/issues/866): `CodeUnitFindingVisitor` does not handle `enum` type introduced in PHP 8.1 -* [#868](https://github.com/sebastianbergmann/php-code-coverage/pull/868): Uncovered files should be ignored unless requested -* [#876](https://github.com/sebastianbergmann/php-code-coverage/issues/876): PCOV driver causes 2x slowdown after upgrade to PHPUnit 9.5 - -## [9.2.7] - 2021-09-17 - -### Fixed - -* [#860](https://github.com/sebastianbergmann/php-code-coverage/pull/860): Empty value for `XDEBUG_MODE` environment variable is not handled correctly - -## [9.2.6] - 2021-03-28 - -### Fixed - -* [#846](https://github.com/sebastianbergmann/php-code-coverage/issues/846): Method name should not appear in the method signature attribute of Cobertura XML - -## [9.2.5] - 2020-11-28 - -### Fixed - -* [#831](https://github.com/sebastianbergmann/php-code-coverage/issues/831): Files that do not contain a newline are not handled correctly - -## [9.2.4] - 2020-11-27 - -### Added - -* [#834](https://github.com/sebastianbergmann/php-code-coverage/issues/834): Support `XDEBUG_MODE` environment variable - -## [9.2.3] - 2020-10-30 - -### Changed - -* Bumped required version of `nikic/php-parser` - -## [9.2.2] - 2020-10-28 - -### Fixed - -* [#820](https://github.com/sebastianbergmann/php-code-coverage/issues/820): Hidden dependency on PHPUnit - -## [9.2.1] - 2020-10-26 - -### Fixed - -* `SebastianBergmann\CodeCoverage\Exception` now correctly extends `\Throwable` - -## [9.2.0] - 2020-10-02 - -### Added - -* [#812](https://github.com/sebastianbergmann/php-code-coverage/pull/812): Support for Cobertura XML report format - -### Changed - -* Reduced the number of I/O operations performed by the static analysis cache - -## [9.1.11] - 2020-09-19 - -### Fixed - -* [#811](https://github.com/sebastianbergmann/php-code-coverage/issues/811): `T_FN` constant is used on PHP 7.3 where it is not available - -## [9.1.10] - 2020-09-18 - -### Added - -* `SebastianBergmann\CodeCoverage\Driver\Selector::forLineCoverage()` and `SebastianBergmann\CodeCoverage\Driver\Selector::forLineAndPathCoverage()` have been added - -### Fixed - -* [#810](https://github.com/sebastianbergmann/php-code-coverage/issues/810): `SebastianBergmann\CodeCoverage\Driver\Driver::forLineCoverage()` and `SebastianBergmann\CodeCoverage\Driver\Driver::forLineAndPathCoverage()` are marked as internal - -### Removed - -* `SebastianBergmann\CodeCoverage\Driver\Driver::forLineCoverage()` and `SebastianBergmann\CodeCoverage\Driver\Driver::forLineAndPathCoverage()` are now deprecated - -## [9.1.9] - 2020-09-15 - -### Fixed - -* [#808](https://github.com/sebastianbergmann/php-code-coverage/issues/808): `PHP Warning: Use of undefined constant T_MATCH` - -## [9.1.8] - 2020-09-07 - -### Changed - -* [#800](https://github.com/sebastianbergmann/php-code-coverage/pull/800): All files on the inclusion list are no longer loaded when `SebastianBergmann\CodeCoverage::start()` is called for the first time and `processUncoveredFiles` is set to `true` - -### Fixed - -* [#799](https://github.com/sebastianbergmann/php-code-coverage/issues/799): Uncovered new line at end of file - -## [9.1.7] - 2020-09-03 - -### Fixed - -* Fixed regressions introduced in versions 9.1.5 and 9.1.6 - -## [9.1.6] - 2020-08-31 - -### Fixed - -* [#799](https://github.com/sebastianbergmann/php-code-coverage/issues/799): Uncovered new line at end of file -* [#803](https://github.com/sebastianbergmann/php-code-coverage/issues/803): HTML report does not sort directories and files anymore - -## [9.1.5] - 2020-08-27 - -### Changed - -* [#800](https://github.com/sebastianbergmann/php-code-coverage/pull/800): All files on the inclusion list are no longer loaded when `SebastianBergmann\CodeCoverage::start()` is called for the first time and `processUncoveredFiles` is set to `true` - -### Fixed - -* [#797](https://github.com/sebastianbergmann/php-code-coverage/pull/797): Class name is wrongly removed from namespace name - -## [9.1.4] - 2020-08-13 - -### Fixed - -* [#793](https://github.com/sebastianbergmann/php-code-coverage/issues/793): Lines with `::class` constant are not covered - -## [9.1.3] - 2020-08-10 - -### Changed - -* Changed PHP-Parser usage to parse sourcecode according to the PHP version we are currently running on instead of using emulative lexing - -## [9.1.2] - 2020-08-10 - -### Fixed - -* [#791](https://github.com/sebastianbergmann/php-code-coverage/pull/791): Cache Warmer does not warm all caches - -## [9.1.1] - 2020-08-10 - -### Added - -* Added `SebastianBergmann\CodeCoverage::cacheDirectory()` method for querying where the cache writes its files - -## [9.1.0] - 2020-08-10 - -### Added - -* Implemented a persistent cache for information gathered using PHP-Parser based static analysis (hereinafter referred to as "cache") -* Added `SebastianBergmann\CodeCoverage::cacheStaticAnalysis(string $cacheDirectory)` method for enabling the cache; it will write its files to `$directory` -* Added `SebastianBergmann\CodeCoverage::doNotCacheStaticAnalysis` method for disabling the cache -* Added `SebastianBergmann\CodeCoverage::cachesStaticAnalysis()` method for querying whether the cache is enabled -* Added `SebastianBergmann\CodeCoverage\StaticAnalysis\CacheWarmer::warmCache()` method for warming the cache - -## [9.0.0] - 2020-08-07 - -### Added - -* [#761](https://github.com/sebastianbergmann/php-code-coverage/pull/761): Support for Branch Coverage and Path Coverage -* Added `SebastianBergmann\CodeCoverage\Driver\Driver::forLineCoverage()` for selecting the best available driver for line coverage -* Added `SebastianBergmann\CodeCoverage\Driver\Driver::forLineAndPathCoverage()` for selecting the best available driver for path coverage -* This component is now supported on PHP 8 -* This component now supports Xdebug 3 - -### Changed - -* [#746](https://github.com/sebastianbergmann/php-code-coverage/pull/746): Remove some ancient workarounds for very old Xdebug versions -* [#747](https://github.com/sebastianbergmann/php-code-coverage/pull/747): Use native filtering in PCOV and Xdebug drivers -* [#748](https://github.com/sebastianbergmann/php-code-coverage/pull/748): Store raw code coverage in value objects instead of arrays -* [#749](https://github.com/sebastianbergmann/php-code-coverage/pull/749): Store processed code coverage in value objects instead of arrays -* [#752](https://github.com/sebastianbergmann/php-code-coverage/pull/752): Rework how code coverage settings are propagated to the driver -* [#754](https://github.com/sebastianbergmann/php-code-coverage/pull/754): Implement collection of raw branch and path coverage -* [#755](https://github.com/sebastianbergmann/php-code-coverage/pull/755): Implement processing of raw branch and path coverage -* [#756](https://github.com/sebastianbergmann/php-code-coverage/pull/756): Improve handling of uncovered files -* `SebastianBergmann\CodeCoverage\Filter::addDirectoryToWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::includeDirectory()` -* `SebastianBergmann\CodeCoverage\Filter::addFilesToWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::includeFiles()` -* `SebastianBergmann\CodeCoverage\Filter::addFileToWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::includeFile()` -* `SebastianBergmann\CodeCoverage\Filter::removeDirectoryFromWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::excludeDirectory()` -* `SebastianBergmann\CodeCoverage\Filter::removeFileFromWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::excludeFile()` -* `SebastianBergmann\CodeCoverage\Filter::isFiltered()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::isExcluded()` -* `SebastianBergmann\CodeCoverage\Filter::getWhitelist()` has been renamed to `SebastianBergmann\CodeCoverage\Filter::files()` -* The arguments for `CodeCoverage::__construct()` are no longer optional - -### Fixed - -* [#700](https://github.com/sebastianbergmann/php-code-coverage/pull/700): Throw an exception if code coverage fails to write to disk - -### Removed - -* `SebastianBergmann\CodeCoverage\CodeCoverage::setCacheTokens()` and `SebastianBergmann\CodeCoverage\CodeCoverage::getCacheTokens()` have been removed -* `SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForUnintentionallyCoveredCode()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::enableCheckForUnintentionallyCoveredCode()` or `SebastianBergmann\CodeCoverage\CodeCoverage::disableCheckForUnintentionallyCoveredCode()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setSubclassesExcludedFromUnintentionallyCoveredCodeCheck()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::excludeSubclassesOfThisClassFromUnintentionallyCoveredCodeCheck()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setAddUncoveredFilesFromWhitelist()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::includeUncoveredFiles()` or `SebastianBergmann\CodeCoverage\CodeCoverage::excludeUncoveredFiles()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setProcessUncoveredFiles()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::processUncoveredFiles()` or `SebastianBergmann\CodeCoverage\CodeCoverage::doNotProcessUncoveredFiles()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setIgnoreDeprecatedCode()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::ignoreDeprecatedCode()` or `SebastianBergmann\CodeCoverage\CodeCoverage::doNotIgnoreDeprecatedCode()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setDisableIgnoredLines()` has been removed, please use `SebastianBergmann\CodeCoverage\CodeCoverage::enableAnnotationsForIgnoringCode()` or `SebastianBergmann\CodeCoverage\CodeCoverage::disableAnnotationsForIgnoringCode()` instead -* `SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForMissingCoversAnnotation()` has been removed -* `SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForUnexecutedCoveredCode()` has been removed -* `SebastianBergmann\CodeCoverage\CodeCoverage::setForceCoversAnnotation()` has been removed -* `SebastianBergmann\CodeCoverage\Filter::hasWhitelist()` has been removed, please use `SebastianBergmann\CodeCoverage\Filter::isEmpty()` instead -* `SebastianBergmann\CodeCoverage\Filter::getWhitelistedFiles()` has been removed -* `SebastianBergmann\CodeCoverage\Filter::setWhitelistedFiles()` has been removed - -## [8.0.2] - 2020-05-23 - -### Fixed - -* [#750](https://github.com/sebastianbergmann/php-code-coverage/pull/750): Inconsistent handling of namespaces -* [#751](https://github.com/sebastianbergmann/php-code-coverage/pull/751): Dead code is not highlighted correctly -* [#753](https://github.com/sebastianbergmann/php-code-coverage/issues/753): Do not use `$_SERVER['REQUEST_TIME']` because the test(ed) code might unset it - -## [8.0.1] - 2020-02-19 - -### Fixed - -* [#731](https://github.com/sebastianbergmann/php-code-coverage/pull/731): Confusing footer in the HTML report - -## [8.0.0] - 2020-02-07 - -### Fixed - -* [#721](https://github.com/sebastianbergmann/php-code-coverage/pull/721): Workaround for PHP bug [#79191](https://bugs.php.net/bug.php?id=79191) - -### Removed - -* This component is no longer supported on PHP 7.2 - -## [7.0.15] - 2021-07-26 - -### Changed - -* Bumped required version of php-token-stream - -## [7.0.14] - 2020-12-02 - -### Changed - -* [#837](https://github.com/sebastianbergmann/php-code-coverage/issues/837): Allow version 4 of php-token-stream - -## [7.0.13] - 2020-11-30 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2` to allow installation of this version of this library on PHP 8. However, this version of this library does not work on PHP 8. PHPUnit 8.5, which uses this version of this library, does not call into this library and instead shows a message that code coverage functionality is not available for PHPUnit 8.5 on PHP 8. - -## [7.0.12] - 2020-11-27 - -### Added - -* [#834](https://github.com/sebastianbergmann/php-code-coverage/issues/834): Support `XDEBUG_MODE` environment variable - -## [7.0.11] - 2020-11-27 - -### Added - -* Support for Xdebug 3 - -## [7.0.10] - 2019-11-20 - -### Fixed - -* [#710](https://github.com/sebastianbergmann/php-code-coverage/pull/710): Code Coverage does not work in PhpStorm - -## [7.0.9] - 2019-11-20 - -### Changed - -* [#709](https://github.com/sebastianbergmann/php-code-coverage/pull/709): Prioritize PCOV over Xdebug - -## [7.0.8] - 2019-09-17 - -### Changed - -* Updated bundled CSS/JavaScript components used for HTML report: Bootstrap 4.3.1, jQuery 3.4.1, and popper.js 1.15.0 - -## [7.0.7] - 2019-07-25 - -### Changed - -* Bumped required version of php-token-stream - -## [7.0.6] - 2019-07-08 - -### Changed - -* Bumped required version of php-token-stream - -## [7.0.5] - 2019-06-06 - -### Fixed - -* [#681](https://github.com/sebastianbergmann/php-code-coverage/pull/681): `use function` statements are not ignored - -## [7.0.4] - 2019-05-29 - -### Fixed - -* [#682](https://github.com/sebastianbergmann/php-code-coverage/pull/682): Code that is not executed is reported as being executed when using PCOV - -## [7.0.3] - 2019-02-26 - -### Fixed - -* [#671](https://github.com/sebastianbergmann/php-code-coverage/issues/671): `TypeError` when directory name is a number - -## [7.0.2] - 2019-02-15 - -### Changed - -* Updated bundled CSS/JavaScript components used for HTML report: Bootstrap 4.3.0 - -### Fixed - -* [#667](https://github.com/sebastianbergmann/php-code-coverage/pull/667): `TypeError` in PHP reporter - -## [7.0.1] - 2019-02-01 - -### Fixed - -* [#664](https://github.com/sebastianbergmann/php-code-coverage/issues/664): `TypeError` when whitelisted file does not exist - -## [7.0.0] - 2019-02-01 - -### Added - -* [#663](https://github.com/sebastianbergmann/php-code-coverage/pull/663): Support for PCOV - -### Fixed - -* [#654](https://github.com/sebastianbergmann/php-code-coverage/issues/654): HTML report fails to load assets -* [#655](https://github.com/sebastianbergmann/php-code-coverage/issues/655): Popin pops in outside of screen - -### Removed - -* This component is no longer supported on PHP 7.1 - -[9.2.15]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.14...9.2.15 -[9.2.14]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.13...9.2.14 -[9.2.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631...9.2.13 -[9.2.12]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.11...c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631 -[9.2.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.10...9.2.11 -[9.2.10]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.9...9.2.10 -[9.2.9]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.8...9.2.9 -[9.2.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.7...9.2.8 -[9.2.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.6...9.2.7 -[9.2.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.5...9.2.6 -[9.2.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.4...9.2.5 -[9.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.3...9.2.4 -[9.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.2...9.2.3 -[9.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.1...9.2.2 -[9.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.0...9.2.1 -[9.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.11...9.2.0 -[9.1.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.10...9.1.11 -[9.1.10]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.9...9.1.10 -[9.1.9]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.8...9.1.9 -[9.1.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.7...9.1.8 -[9.1.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.6...9.1.7 -[9.1.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.5...9.1.6 -[9.1.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.4...9.1.5 -[9.1.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.3...9.1.4 -[9.1.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.2...9.1.3 -[9.1.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.1...9.1.2 -[9.1.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.1.0...9.1.1 -[9.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.0.0...9.1.0 -[9.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/8.0...9.0.0 -[8.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/8.0.1...8.0.2 -[8.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/8.0.0...8.0.1 -[8.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.10...8.0.0 -[7.0.15]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.14...7.0.15 -[7.0.14]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.13...7.0.14 -[7.0.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.12...7.0.13 -[7.0.12]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.11...7.0.12 -[7.0.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.10...7.0.11 -[7.0.10]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.9...7.0.10 -[7.0.9]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.8...7.0.9 -[7.0.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.7...7.0.8 -[7.0.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.6...7.0.7 -[7.0.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.5...7.0.6 -[7.0.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.4...7.0.5 -[7.0.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.3...7.0.4 -[7.0.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.2...7.0.3 -[7.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.1...7.0.2 -[7.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/7.0.0...7.0.1 -[7.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/6.1.4...7.0.0 diff --git a/vendor/phpunit/php-code-coverage/LICENSE b/vendor/phpunit/php-code-coverage/LICENSE index c4a1db2c..80e09f7b 100644 --- a/vendor/phpunit/php-code-coverage/LICENSE +++ b/vendor/phpunit/php-code-coverage/LICENSE @@ -1,33 +1,29 @@ -php-code-coverage +BSD 3-Clause License -Copyright (c) 2009-2022, Sebastian Bergmann . +Copyright (c) 2009-2023, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json index 11c3add6..3646210f 100644 --- a/vendor/phpunit/php-code-coverage/composer.json +++ b/vendor/phpunit/php-code-coverage/composer.json @@ -17,7 +17,8 @@ } ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy" }, "config": { "platform": { @@ -32,7 +33,7 @@ "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.18 || ^5.0", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", "sebastian/code-unit-reverse-lookup": "^2.0.2", @@ -46,8 +47,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "autoload": { "classmap": [ diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php index c53d602c..ba4f1f8c 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -20,7 +20,6 @@ use function count; use function explode; use function get_class; use function is_array; -use function is_file; use function sort; use PHPUnit\Framework\TestCase; use PHPUnit\Runner\PhptTestCase; @@ -77,7 +76,7 @@ final class CodeCoverage private $ignoreDeprecatedCode = false; /** - * @var PhptTestCase|string|TestCase + * @var null|PhptTestCase|string|TestCase */ private $currentId; @@ -115,6 +114,11 @@ final class CodeCoverage */ private $cacheDirectory; + /** + * @var ?Directory + */ + private $cachedReport; + public function __construct(Driver $driver, Filter $filter) { $this->driver = $driver; @@ -128,7 +132,11 @@ final class CodeCoverage */ public function getReport(): Directory { - return (new Builder($this->analyser()))->build($this); + if ($this->cachedReport === null) { + $this->cachedReport = (new Builder($this->analyser()))->build($this); + } + + return $this->cachedReport; } /** @@ -136,9 +144,18 @@ final class CodeCoverage */ public function clear(): void { - $this->currentId = null; - $this->data = new ProcessedCodeCoverageData; - $this->tests = []; + $this->currentId = null; + $this->data = new ProcessedCodeCoverageData; + $this->tests = []; + $this->cachedReport = null; + } + + /** + * @internal + */ + public function clearCache(): void + { + $this->cachedReport = null; } /** @@ -203,6 +220,8 @@ final class CodeCoverage $this->currentId = $id; $this->driver->start(); + + $this->cachedReport = null; } /** @@ -221,7 +240,8 @@ final class CodeCoverage $data = $this->driver->stop(); $this->append($data, null, $append, $linesToBeCovered, $linesToBeUsed); - $this->currentId = null; + $this->currentId = null; + $this->cachedReport = null; return $data; } @@ -246,6 +266,8 @@ final class CodeCoverage throw new TestIdMissingException; } + $this->cachedReport = null; + $this->applyFilter($rawData); $this->applyExecutableLinesFilter($rawData); @@ -313,6 +335,8 @@ final class CodeCoverage $this->data->merge($that->data); $this->tests = array_merge($this->tests, $that->getTests()); + + $this->cachedReport = null; } public function enableCheckForUnintentionallyCoveredCode(): void @@ -486,9 +510,16 @@ final class CodeCoverage continue; } + $linesToBranchMap = $this->analyser()->executableLinesIn($filename); + $data->keepLineCoverageDataOnlyForLines( $filename, - $this->analyser()->executableLinesIn($filename) + array_keys($linesToBranchMap) + ); + + $data->markExecutableLineByBranch( + $filename, + $linesToBranchMap ); } } @@ -518,7 +549,7 @@ final class CodeCoverage ); foreach ($uncoveredFiles as $uncoveredFile) { - if (is_file($uncoveredFile)) { + if ($this->filter->isFile($uncoveredFile)) { $this->append( RawCodeCoverageData::fromUncoveredFile( $uncoveredFile, @@ -543,7 +574,7 @@ final class CodeCoverage $this->driver->start(); foreach ($uncoveredFiles as $uncoveredFile) { - if (is_file($uncoveredFile)) { + if ($this->filter->isFile($uncoveredFile)) { include_once $uncoveredFile; } } @@ -644,7 +675,7 @@ final class CodeCoverage } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), + $e->getCode(), $e ); } @@ -667,7 +698,9 @@ final class CodeCoverage if ($this->cachesStaticAnalysis()) { $this->analyser = new CachingFileAnalyser( $this->cacheDirectory, - $this->analyser + $this->analyser, + $this->useAnnotationsForIgnoringCode, + $this->ignoreDeprecatedCode ); } diff --git a/vendor/phpunit/php-code-coverage/src/Filter.php b/vendor/phpunit/php-code-coverage/src/Filter.php index ef0a2c62..5a0a142a 100644 --- a/vendor/phpunit/php-code-coverage/src/Filter.php +++ b/vendor/phpunit/php-code-coverage/src/Filter.php @@ -100,11 +100,7 @@ final class Filter public function isExcluded(string $filename): bool { - if (!$this->isFile($filename)) { - return true; - } - - return !isset($this->files[$filename]); + return !isset($this->files[$filename]) || !$this->isFile($filename); } /** diff --git a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php index 60d6391d..330fb573 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php +++ b/vendor/phpunit/php-code-coverage/src/Node/AbstractNode.php @@ -46,7 +46,7 @@ abstract class AbstractNode implements Countable */ private $id; - public function __construct(string $name, self $parent = null) + public function __construct(string $name, ?self $parent = null) { if (substr($name, -1) === DIRECTORY_SEPARATOR) { $name = substr($name, 0, -1); diff --git a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php index d0a5a065..0d1c7354 100644 --- a/vendor/phpunit/php-code-coverage/src/Node/Iterator.php +++ b/vendor/phpunit/php-code-coverage/src/Node/Iterator.php @@ -74,8 +74,6 @@ final class Iterator implements RecursiveIterator /** * Returns the sub iterator for the current element. - * - * @return Iterator */ public function getChildren(): self { diff --git a/vendor/phpunit/php-code-coverage/src/RawCodeCoverageData.php b/vendor/phpunit/php-code-coverage/src/RawCodeCoverageData.php index 422742e2..9cb20e73 100644 --- a/vendor/phpunit/php-code-coverage/src/RawCodeCoverageData.php +++ b/vendor/phpunit/php-code-coverage/src/RawCodeCoverageData.php @@ -15,8 +15,12 @@ use function array_flip; use function array_intersect; use function array_intersect_key; use function count; +use function explode; +use function file_get_contents; use function in_array; +use function is_file; use function range; +use function trim; use SebastianBergmann\CodeCoverage\Driver\Driver; use SebastianBergmann\CodeCoverage\StaticAnalysis\FileAnalyser; @@ -87,7 +91,7 @@ final class RawCodeCoverageData { $lineCoverage = []; - foreach ($analyser->executableLinesIn($filename) as $line) { + foreach ($analyser->executableLinesIn($filename) as $line => $branch) { $lineCoverage[$line] = Driver::LINE_NOT_EXECUTED; } @@ -137,6 +141,42 @@ final class RawCodeCoverageData ); } + /** + * @param int[] $linesToBranchMap + */ + public function markExecutableLineByBranch(string $filename, array $linesToBranchMap): void + { + if (!isset($this->lineCoverage[$filename])) { + return; + } + + $linesByBranch = []; + + foreach ($linesToBranchMap as $line => $branch) { + $linesByBranch[$branch][] = $line; + } + + foreach ($this->lineCoverage[$filename] as $line => $lineStatus) { + if (!isset($linesToBranchMap[$line])) { + continue; + } + + $branch = $linesToBranchMap[$line]; + + if (!isset($linesByBranch[$branch])) { + continue; + } + + foreach ($linesByBranch[$branch] as $lineInBranch) { + $this->lineCoverage[$filename][$lineInBranch] = $lineStatus; + } + + if (Driver::LINE_EXECUTED === $lineStatus) { + unset($linesByBranch[$branch]); + } + } + } + /** * @param int[] $lines */ diff --git a/vendor/phpunit/php-code-coverage/src/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/Report/Clover.php index 75c731bb..d80ab4de 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Clover.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Clover.php @@ -16,6 +16,7 @@ use function is_string; use function ksort; use function max; use function range; +use function strpos; use function time; use DOMDocument; use SebastianBergmann\CodeCoverage\CodeCoverage; @@ -243,7 +244,9 @@ final class Clover $buffer = $xmlDocument->saveXML(); if ($target !== null) { - Filesystem::createDirectory(dirname($target)); + if (!strpos($target, '://') !== false) { + Filesystem::createDirectory(dirname($target)); + } if (@file_put_contents($target, $buffer) === false) { throw new WriteOperationFailedException($target); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php b/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php index 550fdb75..138a31eb 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Cobertura.php @@ -9,10 +9,14 @@ */ namespace SebastianBergmann\CodeCoverage\Report; +use function basename; use function count; use function dirname; use function file_put_contents; +use function preg_match; use function range; +use function str_replace; +use function strpos; use function time; use DOMImplementation; use SebastianBergmann\CodeCoverage\CodeCoverage; @@ -25,7 +29,7 @@ final class Cobertura /** * @throws WriteOperationFailedException */ - public function process(CodeCoverage $coverage, ?string $target = null, ?string $name = null): string + public function process(CodeCoverage $coverage, ?string $target = null): string { $time = (string) time(); @@ -84,9 +88,8 @@ final class Cobertura $packageElement = $document->createElement('package'); $packageComplexity = 0; - $packageName = $name ?? ''; - $packageElement->setAttribute('name', $packageName); + $packageElement->setAttribute('name', str_replace($report->pathAsString() . DIRECTORY_SEPARATOR, '', $item->pathAsString())); $linesValid = $item->numberOfExecutableLines(); $linesCovered = $item->numberOfExecutedLines(); @@ -191,7 +194,7 @@ final class Cobertura } } - if ($report->numberOfFunctions() === 0) { + if ($item->numberOfFunctions() === 0) { $packageElement->setAttribute('complexity', (string) $packageComplexity); continue; @@ -215,7 +218,7 @@ final class Cobertura $classElement->appendChild($classLinesElement); - $functions = $report->functions(); + $functions = $item->functions(); foreach ($functions as $functionName => $function) { if ($function['executableLines'] === 0) { @@ -292,7 +295,9 @@ final class Cobertura $buffer = $document->saveXML(); if ($target !== null) { - Filesystem::createDirectory(dirname($target)); + if (!strpos($target, '://') !== false) { + Filesystem::createDirectory(dirname($target)); + } if (@file_put_contents($target, $buffer) === false) { throw new WriteOperationFailedException($target); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php index 91f8ed59..2d91567a 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Crap4j.php @@ -15,6 +15,7 @@ use function file_put_contents; use function htmlspecialchars; use function is_string; use function round; +use function strpos; use DOMDocument; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; @@ -124,7 +125,9 @@ final class Crap4j $buffer = $document->saveXML(); if ($target !== null) { - Filesystem::createDirectory(dirname($target)); + if (!strpos($target, '://') !== false) { + Filesystem::createDirectory(dirname($target)); + } if (@file_put_contents($target, $buffer) === false) { throw new WriteOperationFailedException($target); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php index 42973019..b59dc89d 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php @@ -80,6 +80,8 @@ use const T_WHILE; use const T_YIELD; use const T_YIELD_FROM; use function array_key_exists; +use function array_keys; +use function array_merge; use function array_pop; use function array_unique; use function constant; @@ -89,6 +91,9 @@ use function explode; use function file_get_contents; use function htmlspecialchars; use function is_string; +use function ksort; +use function range; +use function sort; use function sprintf; use function str_replace; use function substr; @@ -129,7 +134,7 @@ final class File extends Renderer [ 'items' => $this->renderItems($node), 'lines' => $this->renderSourceWithLineCoverage($node), - 'legend' => '

ExecutedNot ExecutedDead Code

', + 'legend' => '

Covered by small (and larger) testsCovered by medium (and large) testsCovered by large tests (and tests of unknown size)Not coveredNot coverable

', 'structure' => '', ] ); @@ -797,8 +802,15 @@ final class File extends Renderer $singleLineTemplate = new Template($this->templatePath . 'line.html.dist', '{{', '}}'); $lines = ''; + $first = true; foreach ($path['path'] as $branchId) { + if ($first) { + $first = false; + } else { + $lines .= '  ' . "\n"; + } + $branchLines = range($branches[$branchId]['line_start'], $branches[$branchId]['line_end']); sort($branchLines); // sometimes end_line < start_line @@ -834,6 +846,7 @@ final class File extends Renderer $popoverContent .= $this->createPopoverContentForTest($test, $testData[$test]); } + $trClass = $lineCss . ' popin'; } diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css index 6ee59568..83a71b1f 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/bootstrap.min.css @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.6.1 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors - * Copyright 2011-2021 Twitter, Inc. + * Bootstrap v4.6.2 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors + * Copyright 2011-2022 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) - */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-row>.col>.valid-tooltip,.form-row>[class*=col-]>.valid-tooltip{left:5px}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem)!important;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated select.form-control:valid,select.form-control.is-valid{padding-right:3rem!important;background-position:right 1.5rem center}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem)!important;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-row>.col>.invalid-tooltip,.form-row>[class*=col-]>.invalid-tooltip{left:5px}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem)!important;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated select.form-control:invalid,select.form-control.is-invalid{padding-right:3rem!important;background-position:right 1.5rem center}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem)!important;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label,.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label,.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label::after,.input-group.has-validation>.custom-select:nth-last-child(n+3),.input-group.has-validation>.form-control:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.btn,.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.input-group-text,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.btn,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:50%/50% 50% no-repeat}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;overflow:hidden;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;overflow:hidden;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item,.nav-fill>.nav-link{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:50%/100% 100% no-repeat}.navbar-nav-scroll{max-height:75vh;overflow-y:auto}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;z-index:2;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{-ms-flex-preferred-size:350px;flex-basis:350px;max-width:350px;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:.875em;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#28a745}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-row>.col>.valid-tooltip,.form-row>[class*=col-]>.valid-tooltip{left:5px}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem)!important;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated select.form-control:valid,select.form-control.is-valid{padding-right:3rem!important;background-position:right 1.5rem center}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem)!important;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-row>.col>.invalid-tooltip,.form-row>[class*=col-]>.invalid-tooltip{left:5px}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem)!important;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated select.form-control:invalid,select.form-control.is-invalid{padding-right:3rem!important;background-position:right 1.5rem center}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem)!important;background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.width{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.width{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label,.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label,.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label::after,.input-group.has-validation>.custom-select:nth-last-child(n+3),.input-group.has-validation>.form-control:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.btn,.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.input-group-text,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.btn,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:1px solid #adb5bd}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:50%/50% 50% no-repeat}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;overflow:hidden;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;overflow:hidden;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background-color:transparent;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item,.nav-fill>.nav-link{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:50%/100% 100% no-repeat}.navbar-nav-scroll{max-height:75vh;overflow-y:auto}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;z-index:2;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{-ms-flex-preferred-size:350px;flex-basis:350px;max-width:350px;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25em solid currentcolor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;background-color:currentcolor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} /*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css index 0834b5b5..2edd6097 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/css/style.css @@ -1,4 +1,9 @@ body { + font-family: sans-serif; + font-size: 1em; + font-kerning: normal; + font-variant-ligatures: common-ligatures; + text-rendering: optimizeLegibility; padding-top: 10px; } @@ -8,6 +13,8 @@ body { .octicon { margin-right:.25em; + vertical-align: baseline; + width: 0.75em; } .table-bordered>thead>tr>td { @@ -57,6 +64,7 @@ body { } td.big { + vertical-align: middle; width: 117px; } @@ -112,7 +120,7 @@ svg text { .scrollbox { height:245px; - overflow-x:hidden; + overflow-x:scroll; overflow-y:scroll; } @@ -120,3 +128,31 @@ table + .structure-heading { border-top: 1px solid lightgrey; padding-top: 0.5em; } + +.legend { + font-weight: bold; + margin-right: 2px; + padding-left: 10px; + padding-right: 10px; + text-align: center; +} + +.covered-by-small-tests { + background-color: #99cb84; +} + +.covered-by-medium-tests { + background-color: #c3e3b5; +} + +.covered-by-large-tests { + background-color: #dff0d8; +} + +.not-covered { + background-color: #f2dede; +} + +.not-coverable { + background-color: #fcf8e3; +} diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist index aa51bcb8..60e66d5b 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/dashboard.html.dist @@ -4,9 +4,9 @@ Dashboard for {{full_path}} - - - + + + @@ -137,9 +137,9 @@

- - - + + + - - + + + - - - + + + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist index 8717d7f9..f48ebf12 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_branch.html.dist @@ -4,9 +4,9 @@ Code Coverage for {{full_path}} - - - + + + @@ -59,9 +59,9 @@ - - - - + + + + diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist index 335f0ccc..b1c0fca4 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist index 90e25eaa..50502517 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/file_item_branch.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js index 50720ead..97206dcd 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/bootstrap.min.js @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.6.1 (https://getbootstrap.com/) - * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.6.2 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};d.jQueryDetection(),o.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return o.default(this).one(d.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||d.triggerTransitionEnd(e)}),t),this},o.default.event.special[d.TRANSITION_END]={bindType:f,delegateType:f,handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var c="bs.alert",h=o.default.fn.alert,g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,c),this._element=null},e._getRootElement=function(t){var e=d.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=d.getTransitionDurationFromElement(t);o.default(t).one(d.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(c);i||(i=new t(this),n.data(c,i)),"close"===e&&i[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',g._handleDismiss(new g)),o.default.fn.alert=g._jQueryInterface,o.default.fn.alert.Constructor=g,o.default.fn.alert.noConflict=function(){return o.default.fn.alert=h,g._jQueryInterface};var m="bs.button",p=o.default.fn.button,_="active",v='[data-toggle^="button"]',y='input:not([type="hidden"])',b=".btn",E=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector(y);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(_))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass(_)}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains(_)),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(_)),t&&o.default(this._element).toggleClass(_))},e.dispose=function(){o.default.removeData(this._element,m),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this),a=i.data(m);a||(a=new t(this),i.data(m,a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();o.default(document).on("click.bs.button.data-api",v,(function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(b)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector(y);if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||E._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",v,(function(t){var e=o.default(t.target).closest(b)[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),o.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(N)},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(D)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(I);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one(A,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?N:D;this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(".bs.carousel"),o.default.removeData(this._element,w),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},k,t),d.typeCheckConfig(T,t,O),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),o.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===N,i=t===D,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+(t===D?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(I)),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass(S);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass(S)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(I);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(I),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),f=this._getItemIndex(u),c=Boolean(this._interval);if(t===N?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass(S))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var h=o.default.Event(A,{relatedTarget:u,direction:a,from:r,to:f});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),d.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=d.getTransitionDurationFromElement(l);o.default(l).one(d.TRANSITION_END,(function(){o.default(u).removeClass(n+" "+i).addClass(S),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout((function(){return o.default(s._element).trigger(h)}),0)})).emulateTransitionEnd(g)}else o.default(l).removeClass(S),o.default(u).addClass(S),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(w),i=r({},k,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data(w,n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if("undefined"==typeof n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=d.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data(w).to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return k}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",P._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass(q)?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!(this._isTransitioning||o.default(this._element).hasClass(q)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=o.default(e).not(this._selector).data(R))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data(R,null));var s=this._getDimension();o.default(this._element).removeClass(F).addClass(Q),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass(B).attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){o.default(i._element).removeClass(Q).addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass(q)){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",d.reflow(this._element),o.default(this._element).addClass(Q).removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(K);if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data(K,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(it)),i=0,a=n.length;i0&&s--,40===e.which&&sdocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(ht);var i=d.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(d.TRANSITION_END),o.default(this._element).one(d.TRANSITION_END,(function(){t._element.classList.remove(ht),n||o.default(t._element).one(d.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,i)})).emulateTransitionEnd(i),this._element.focus()}},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass(dt),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&d.reflow(this._element),o.default(this._element).addClass(ct),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=d.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(d.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off(pt).on(pt,(function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on(yt,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||o.default(this._element).off(yt)},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on(_t,(function(e){return t.handleUpdate(e)})):o.default(window).off(_t)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){o.default(document.body).removeClass(ft),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger(gt)}))},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass(dt)?dt:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on(vt,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&d.reflow(this._backdrop),o.default(this._backdrop).addClass(ct),!t)return;if(!n)return void t();var i=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass(ct);var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass(dt)){var s=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ut={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Mt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Wt=function(){function t(t,e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass(Rt))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=d.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=d.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass(Lt);var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var f=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(f),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass(Rt),o.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),e===qt&&t._leave(null,t)};if(o.default(this.tip).hasClass(Lt)){var h=d.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(d.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){e._hoverState!==xt&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass(Rt),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass(Lt)){var s=d.getTransitionDurationFromElement(n);o.default(n).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=At(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return Bt[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Ft?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=e===Ft?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Qt:Ft]=!0),o.default(e.getTipElement()).hasClass(Rt)||e._hoverState===xt?e._hoverState=xt:(clearTimeout(e._timeout),e._hoverState=xt,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===xt&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Qt:Ft]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=qt,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===qt&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Pt.indexOf(t)&&delete e[t]})),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d.typeCheckConfig(It,t,this.constructor.DefaultType),t.sanitize&&(t.template=At(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(jt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass(Lt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(kt),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data(kt,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Ht}},{key:"NAME",get:function(){return It}},{key:"DATA_KEY",get:function(){return kt}},{key:"Event",get:function(){return Mt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Ut}}]),t}();o.default.fn.tooltip=Wt._jQueryInterface,o.default.fn.tooltip.Constructor=Wt,o.default.fn.tooltip.noConflict=function(){return o.default.fn.tooltip=Ot,Wt._jQueryInterface};var Vt="bs.popover",zt=o.default.fn.popover,Kt=new RegExp("(^|\\s)bs-popover\\S+","g"),Xt=r({},Wt.Default,{placement:"right",trigger:"click",content:"",template:''}),Yt=r({},Wt.DefaultType,{content:"(string|element|function)"}),$t={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Jt=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n);var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(Kt);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data(Vt),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data(Vt,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},l(i,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Xt}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Vt}},{key:"Event",get:function(){return $t}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Yt}}]),i}(Wt);o.default.fn.popover=Jt._jQueryInterface,o.default.fn.popover.Constructor=Jt,o.default.fn.popover.noConflict=function(){return o.default.fn.popover=zt,Jt._jQueryInterface};var Gt="scrollspy",Zt="bs.scrollspy",te=o.default.fn[Gt],ee="active",ne="position",ie=".nav, .list-group",oe={offset:10,method:"auto",target:""},ae={offset:"number",method:"string",target:"(string|element)"},se=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":ne,n="auto"===this._config.method?e:this._config.method,i=n===ne?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,a=d.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){o.default.removeData(this._element,Zt),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},oe,"object"==typeof t&&t?t:{})).target&&d.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=d.getUID(Gt),o.default(t.target).attr("id",e)),t.target="#"+e}return d.typeCheckConfig(Gt,t,ae),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",ge=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass(ue)||o.default(this._element).hasClass("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=d.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?he:ce;n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,le),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(ce):o.default(e).find(he))[0],s=n&&a&&o.default(a).hasClass(fe),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=d.getTransitionDurationFromElement(a);o.default(a).removeClass(de).one(d.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass(ue);var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass(ue),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}o.default(t).addClass(ue),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains(fe)&&t.classList.add(de);var a=t.parentNode;if(a&&"LI"===a.nodeName&&(a=a.parentNode),a&&o.default(a).hasClass("dropdown-menu")){var s=o.default(t).closest(".dropdown")[0];if(s){var l=[].slice.call(s.querySelectorAll(".dropdown-toggle"));o.default(l).addClass(ue)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(le);if(i||(i=new t(this),n.data(le,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ge._jQueryInterface.call(o.default(this),"show")})),o.default.fn.tab=ge._jQueryInterface,o.default.fn.tab.Constructor=ge,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=re,ge._jQueryInterface};var me="bs.toast",pe=o.default.fn.toast,_e="hide",ve="show",ye="showing",be="click.dismiss.bs.toast",Ee={animation:!0,autohide:!0,delay:500},Te={animation:"boolean",autohide:"boolean",delay:"number"},we=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(ye),t._element.classList.add(ve),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(_e),d.reflow(this._element),this._element.classList.add(ye),this._config.animation){var i=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains(ve)){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(ve)&&this._element.classList.remove(ve),o.default(this._element).off(be),o.default.removeData(this._element,me),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},Ee,o.default(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on(be,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(_e),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(ve),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(me);if(i||(i=new t(this,"object"==typeof e&&e),n.data(me,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return Te}},{key:"Default",get:function(){return Ee}}]),t}();o.default.fn.toast=we._jQueryInterface,o.default.fn.toast.Constructor=we,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=pe,we._jQueryInterface},t.Alert=g,t.Button=E,t.Carousel=P,t.Collapse=V,t.Dropdown=lt,t.Modal=Ct,t.Popover=Jt,t.Scrollspy=se,t.Tab=ge,t.Toast=we,t.Tooltip=Wt,t.Util=d,Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};d.jQueryDetection(),o.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return o.default(this).one(d.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||d.triggerTransitionEnd(e)}),t),this},o.default.event.special[d.TRANSITION_END]={bindType:f,delegateType:f,handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var c="bs.alert",h=o.default.fn.alert,g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,c),this._element=null},e._getRootElement=function(t){var e=d.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=d.getTransitionDurationFromElement(t);o.default(t).one(d.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(c);i||(i=new t(this),n.data(c,i)),"close"===e&&i[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',g._handleDismiss(new g)),o.default.fn.alert=g._jQueryInterface,o.default.fn.alert.Constructor=g,o.default.fn.alert.noConflict=function(){return o.default.fn.alert=h,g._jQueryInterface};var m="bs.button",p=o.default.fn.button,_="active",v='[data-toggle^="button"]',y='input:not([type="hidden"])',b=".btn",E=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector(y);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(_))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass(_)}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains(_)),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(_)),t&&o.default(this._element).toggleClass(_))},e.dispose=function(){o.default.removeData(this._element,m),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this),a=i.data(m);a||(a=new t(this),i.data(m,a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.button.data-api",v,(function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(b)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector(y);if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||E._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",v,(function(t){var e=o.default(t.target).closest(b)[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),o.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(N)},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(D)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(I);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one(A,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?N:D;this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(".bs.carousel"),o.default.removeData(this._element,w),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},k,t),d.typeCheckConfig(T,t,O),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&j[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),o.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===N,i=t===D,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+(t===D?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(I)),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass(S);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass(S)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(I);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(I),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),f=this._getItemIndex(u),c=Boolean(this._interval);if(t===N?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass(S))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u),this._activeElement=u;var h=o.default.Event(A,{relatedTarget:u,direction:a,from:r,to:f});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),d.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=d.getTransitionDurationFromElement(l);o.default(l).one(d.TRANSITION_END,(function(){o.default(u).removeClass(n+" "+i).addClass(S),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout((function(){return o.default(s._element).trigger(h)}),0)})).emulateTransitionEnd(g)}else o.default(l).removeClass(S),o.default(u).addClass(S),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(w),i=r({},k,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data(w,n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if("undefined"==typeof n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=d.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data(w).to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return k}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",P._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass(q)?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!(this._isTransitioning||o.default(this._element).hasClass(q)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=o.default(e).not(this._selector).data(R))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data(R,null));var s=this._getDimension();o.default(this._element).removeClass(F).addClass(Q),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass(B).attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){o.default(i._element).removeClass(Q).addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass(q)){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",d.reflow(this._element),o.default(this._element).addClass(Q).removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data(K);if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data(K,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(it)),i=0,a=n.length;i0&&s--,40===e.which&&sdocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(ht);var i=d.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(d.TRANSITION_END),o.default(this._element).one(d.TRANSITION_END,(function(){t._element.classList.remove(ht),n||o.default(t._element).one(d.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,i)})).emulateTransitionEnd(i),this._element.focus()}},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass(dt),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&d.reflow(this._element),o.default(this._element).addClass(ct),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=d.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(d.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off(pt).on(pt,(function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on(yt,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||o.default(this._element).off(yt)},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on(_t,(function(e){return t.handleUpdate(e)})):o.default(window).off(_t)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){o.default(document.body).removeClass(ft),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger(gt)}))},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass(dt)?dt:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on(vt,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&d.reflow(this._backdrop),o.default(this._backdrop).addClass(ct),!t)return;if(!n)return void t();var i=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass(ct);var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass(dt)){var s=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ut={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Mt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Wt=function(){function t(t,e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass(Rt))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=d.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=d.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass(Lt);var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var f=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(f),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass(Rt),o.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),e===qt&&t._leave(null,t)};if(o.default(this.tip).hasClass(Lt)){var h=d.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(d.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){e._hoverState!==xt&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass(Rt),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass(Lt)){var s=d.getTransitionDurationFromElement(n);o.default(n).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=At(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return Bt[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Ft?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=e===Ft?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Qt:Ft]=!0),o.default(e.getTipElement()).hasClass(Rt)||e._hoverState===xt?e._hoverState=xt:(clearTimeout(e._timeout),e._hoverState=xt,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===xt&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Qt:Ft]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=qt,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===qt&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Pt.indexOf(t)&&delete e[t]})),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d.typeCheckConfig(It,t,this.constructor.DefaultType),t.sanitize&&(t.template=At(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(jt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass(Lt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(kt),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data(kt,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Ht}},{key:"NAME",get:function(){return It}},{key:"DATA_KEY",get:function(){return kt}},{key:"Event",get:function(){return Mt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Ut}}]),t}();o.default.fn.tooltip=Wt._jQueryInterface,o.default.fn.tooltip.Constructor=Wt,o.default.fn.tooltip.noConflict=function(){return o.default.fn.tooltip=Ot,Wt._jQueryInterface};var Vt="bs.popover",zt=o.default.fn.popover,Kt=new RegExp("(^|\\s)bs-popover\\S+","g"),Xt=r({},Wt.Default,{placement:"right",trigger:"click",content:"",template:''}),Yt=r({},Wt.DefaultType,{content:"(string|element|function)"}),$t={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Jt=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n);var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(Kt);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data(Vt),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data(Vt,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},l(i,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return Xt}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Vt}},{key:"Event",get:function(){return $t}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Yt}}]),i}(Wt);o.default.fn.popover=Jt._jQueryInterface,o.default.fn.popover.Constructor=Jt,o.default.fn.popover.noConflict=function(){return o.default.fn.popover=zt,Jt._jQueryInterface};var Gt="scrollspy",Zt="bs.scrollspy",te=o.default.fn[Gt],ee="active",ne="position",ie=".nav, .list-group",oe={offset:10,method:"auto",target:""},ae={offset:"number",method:"string",target:"(string|element)"},se=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":ne,n="auto"===this._config.method?e:this._config.method,i=n===ne?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,a=d.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){o.default.removeData(this._element,Zt),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},oe,"object"==typeof t&&t?t:{})).target&&d.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=d.getUID(Gt),o.default(t.target).attr("id",e)),t.target="#"+e}return d.typeCheckConfig(Gt,t,ae),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",ge=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass(ue)||o.default(this._element).hasClass("disabled")||this._element.hasAttribute("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=d.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?he:ce;n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,le),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(ce):o.default(e).find(he))[0],s=n&&a&&o.default(a).hasClass(fe),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=d.getTransitionDurationFromElement(a);o.default(a).removeClass(de).one(d.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass(ue);var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass(ue),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}o.default(t).addClass(ue),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains(fe)&&t.classList.add(de);var a=t.parentNode;if(a&&"LI"===a.nodeName&&(a=a.parentNode),a&&o.default(a).hasClass("dropdown-menu")){var s=o.default(t).closest(".dropdown")[0];if(s){var l=[].slice.call(s.querySelectorAll(".dropdown-toggle"));o.default(l).addClass(ue)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(le);if(i||(i=new t(this),n.data(le,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ge._jQueryInterface.call(o.default(this),"show")})),o.default.fn.tab=ge._jQueryInterface,o.default.fn.tab.Constructor=ge,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=re,ge._jQueryInterface};var me="bs.toast",pe=o.default.fn.toast,_e="hide",ve="show",ye="showing",be="click.dismiss.bs.toast",Ee={animation:!0,autohide:!0,delay:500},Te={animation:"boolean",autohide:"boolean",delay:"number"},we=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(ye),t._element.classList.add(ve),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(_e),d.reflow(this._element),this._element.classList.add(ye),this._config.animation){var i=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains(ve)){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(ve)&&this._element.classList.remove(ve),o.default(this._element).off(be),o.default.removeData(this._element,me),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},Ee,o.default(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on(be,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(_e),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(ve),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data(me);if(i||(i=new t(this,"object"==typeof e&&e),n.data(me,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}}))},l(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"DefaultType",get:function(){return Te}},{key:"Default",get:function(){return Ee}}]),t}();o.default.fn.toast=we._jQueryInterface,o.default.fn.toast.Constructor=we,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=pe,we._jQueryInterface},t.Alert=g,t.Button=E,t.Carousel=P,t.Collapse=V,t.Dropdown=lt,t.Modal=Ct,t.Popover=Jt,t.Scrollspy=se,t.Tab=ge,t.Toast=we,t.Tooltip=Wt,t.Util=d,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=bootstrap.min.js.map \ No newline at end of file diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js index c4c6022f..2c69bc90 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js/jquery.min.js @@ -1,2 +1,2 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist index e8cbe068..36d6cb74 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist +++ b/vendor/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/method_item_branch.html.dist @@ -1,5 +1,5 @@ - {{name}} + {{name}} {{lines_bar}}
{{lines_executed_percent}}
{{lines_number}}
diff --git a/vendor/phpunit/php-code-coverage/src/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/Report/PHP.php index d16b1b84..1f8186d0 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/PHP.php +++ b/vendor/phpunit/php-code-coverage/src/Report/PHP.php @@ -12,7 +12,7 @@ namespace SebastianBergmann\CodeCoverage\Report; use function dirname; use function file_put_contents; use function serialize; -use function sprintf; +use function strpos; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Util\Filesystem; @@ -21,17 +21,15 @@ final class PHP { public function process(CodeCoverage $coverage, ?string $target = null): string { - $buffer = sprintf( - "clearCache(); + + $buffer = "contextNode = $context; - $this->writer = new XMLWriter(); + $this->writer = new XMLWriter; $this->writer->openMemory(); $this->writer->startElementNS(null, $context->nodeName, 'https://schema.phpunit.de/coverage/1.0'); $this->writer->writeAttribute('nr', $line); diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php index b53b08c0..7f2badae 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Report.php @@ -20,7 +20,7 @@ final class Report extends File { public function __construct(string $name) { - $dom = new DOMDocument(); + $dom = new DOMDocument; $dom->loadXML(''); $contextNode = $dom->getElementsByTagNameNS( diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php index 8fd20f58..2b67ce1d 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php @@ -31,7 +31,7 @@ final class Source { $context = $this->context; - $tokens = (new Tokenizer())->parse($source); + $tokens = (new Tokenizer)->parse($source); $srcDom = (new XMLSerializer(new NamespaceUri($context->namespaceURI)))->toDom($tokens); $context->parentNode->replaceChild( diff --git a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php index c2e56268..c6da4145 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php +++ b/vendor/phpunit/php-code-coverage/src/Report/Xml/Tests.php @@ -17,7 +17,6 @@ use DOMElement; final class Tests { private $contextNode; - private $codeMap = [ -1 => 'UNKNOWN', // PHPUnit_Runner_BaseTestRunner::STATUS_UNKNOWN 0 => 'PASSED', // PHPUnit_Runner_BaseTestRunner::STATUS_PASSED diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php index 00a6d8df..6f8a0449 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php @@ -20,7 +20,9 @@ final class CacheWarmer new ParsingFileAnalyser( $useAnnotationsForIgnoringCode, $ignoreDeprecatedCode - ) + ), + $useAnnotationsForIgnoringCode, + $ignoreDeprecatedCode, ); foreach ($filter->files() as $file) { diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php index cdaad561..63e6e22b 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php @@ -9,15 +9,15 @@ */ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; -use function assert; -use function crc32; use function file_get_contents; use function file_put_contents; +use function implode; use function is_file; +use function md5; use function serialize; -use GlobIterator; +use function unserialize; use SebastianBergmann\CodeCoverage\Util\Filesystem; -use SplFileInfo; +use SebastianBergmann\FileIterator\Facade as FileIteratorFacade; /** * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage @@ -29,31 +29,39 @@ final class CachingFileAnalyser implements FileAnalyser */ private static $cacheVersion; + /** + * @var string + */ + private $directory; + /** * @var FileAnalyser */ private $analyser; + /** + * @var bool + */ + private $useAnnotationsForIgnoringCode; + + /** + * @var bool + */ + private $ignoreDeprecatedCode; + /** * @var array */ private $cache = []; - /** - * @var string - */ - private $directory; - - public function __construct(string $directory, FileAnalyser $analyser) + public function __construct(string $directory, FileAnalyser $analyser, bool $useAnnotationsForIgnoringCode, bool $ignoreDeprecatedCode) { Filesystem::createDirectory($directory); - $this->analyser = $analyser; - $this->directory = $directory; - - if (self::$cacheVersion === null) { - $this->calculateCacheVersion(); - } + $this->analyser = $analyser; + $this->directory = $directory; + $this->useAnnotationsForIgnoringCode = $useAnnotationsForIgnoringCode; + $this->ignoreDeprecatedCode = $ignoreDeprecatedCode; } public function classesIn(string $filename): array @@ -165,19 +173,37 @@ final class CachingFileAnalyser implements FileAnalyser private function cacheFile(string $filename): string { - return $this->directory . DIRECTORY_SEPARATOR . hash('sha256', $filename . crc32(file_get_contents($filename)) . self::$cacheVersion); + $cacheKey = md5( + implode( + "\0", + [ + $filename, + file_get_contents($filename), + self::cacheVersion(), + $this->useAnnotationsForIgnoringCode, + $this->ignoreDeprecatedCode, + ] + ) + ); + + return $this->directory . DIRECTORY_SEPARATOR . $cacheKey; } - private function calculateCacheVersion(): void + private static function cacheVersion(): string { - $buffer = ''; - - foreach (new GlobIterator(__DIR__ . '/*.php') as $file) { - assert($file instanceof SplFileInfo); - - $buffer .= file_get_contents($file->getPathname()); + if (self::$cacheVersion !== null) { + return self::$cacheVersion; } - self::$cacheVersion = (string) crc32($buffer); + $buffer = []; + + foreach ((new FileIteratorFacade)->getFilesAsArray(__DIR__, '.php') as $file) { + $buffer[] = $file; + $buffer[] = file_get_contents($file); + } + + self::$cacheVersion = md5(implode("\0", $buffer)); + + return self::$cacheVersion; } } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php index 8d357b20..cb85cd61 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php @@ -9,6 +9,7 @@ */ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; +use function assert; use function implode; use function rtrim; use function trim; @@ -25,6 +26,7 @@ use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Interface_; use PhpParser\Node\Stmt\Trait_; use PhpParser\Node\UnionType; +use PhpParser\NodeAbstract; use PhpParser\NodeTraverser; use PhpParser\NodeVisitorAbstract; use SebastianBergmann\Complexity\CyclomaticComplexityCalculatingVisitor; @@ -179,8 +181,12 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract return '?' . $type->type; } - if ($type instanceof UnionType || $type instanceof IntersectionType) { - return $this->unionOrIntersectionAsString($type); + if ($type instanceof UnionType) { + return $this->unionTypeAsString($type); + } + + if ($type instanceof IntersectionType) { + return $this->intersectionTypeAsString($type); } return $type->toString(); @@ -297,27 +303,43 @@ final class CodeUnitFindingVisitor extends NodeVisitorAbstract return trim(rtrim($namespacedName, $name), '\\'); } - /** - * @psalm-param UnionType|IntersectionType $type - */ - private function unionOrIntersectionAsString(ComplexType $type): string + private function unionTypeAsString(UnionType $node): string { - if ($type instanceof UnionType) { - $separator = '|'; - } else { - $separator = '&'; - } - $types = []; - foreach ($type->types as $_type) { - if ($_type instanceof Name) { - $types[] = $_type->toCodeString(); - } else { - $types[] = $_type->toString(); + foreach ($node->types as $type) { + if ($type instanceof IntersectionType) { + $types[] = '(' . $this->intersectionTypeAsString($type) . ')'; + + continue; } + + $types[] = $this->typeAsString($type); } - return implode($separator, $types); + return implode('|', $types); + } + + private function intersectionTypeAsString(IntersectionType $node): string + { + $types = []; + + foreach ($node->types as $type) { + $types[] = $this->typeAsString($type); + } + + return implode('&', $types); + } + + /** + * @psalm-param Identifier|Name $node $node + */ + private function typeAsString(NodeAbstract $node): string + { + if ($node instanceof Name) { + return $node->toCodeString(); + } + + return $node->toString(); } } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php index ae0b08ae..38e64c0b 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php @@ -9,46 +9,19 @@ */ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; +use function array_diff_key; +use function assert; +use function count; +use function current; +use function end; +use function explode; +use function max; +use function preg_match; +use function preg_quote; +use function range; +use function reset; +use function sprintf; use PhpParser\Node; -use PhpParser\Node\Expr\Array_; -use PhpParser\Node\Expr\ArrayDimFetch; -use PhpParser\Node\Expr\ArrayItem; -use PhpParser\Node\Expr\Assign; -use PhpParser\Node\Expr\BinaryOp; -use PhpParser\Node\Expr\CallLike; -use PhpParser\Node\Expr\Cast; -use PhpParser\Node\Expr\Closure; -use PhpParser\Node\Expr\Match_; -use PhpParser\Node\Expr\MethodCall; -use PhpParser\Node\Expr\NullsafePropertyFetch; -use PhpParser\Node\Expr\PropertyFetch; -use PhpParser\Node\Expr\StaticPropertyFetch; -use PhpParser\Node\Expr\Ternary; -use PhpParser\Node\MatchArm; -use PhpParser\Node\Scalar\Encapsed; -use PhpParser\Node\Stmt\Break_; -use PhpParser\Node\Stmt\Case_; -use PhpParser\Node\Stmt\Catch_; -use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\ClassMethod; -use PhpParser\Node\Stmt\Continue_; -use PhpParser\Node\Stmt\Do_; -use PhpParser\Node\Stmt\Echo_; -use PhpParser\Node\Stmt\Else_; -use PhpParser\Node\Stmt\ElseIf_; -use PhpParser\Node\Stmt\Expression; -use PhpParser\Node\Stmt\Finally_; -use PhpParser\Node\Stmt\For_; -use PhpParser\Node\Stmt\Foreach_; -use PhpParser\Node\Stmt\Goto_; -use PhpParser\Node\Stmt\If_; -use PhpParser\Node\Stmt\Property; -use PhpParser\Node\Stmt\Return_; -use PhpParser\Node\Stmt\Switch_; -use PhpParser\Node\Stmt\Throw_; -use PhpParser\Node\Stmt\TryCatch; -use PhpParser\Node\Stmt\Unset_; -use PhpParser\Node\Stmt\While_; use PhpParser\NodeVisitorAbstract; /** @@ -57,217 +30,361 @@ use PhpParser\NodeVisitorAbstract; final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract { /** - * @psalm-var array + * @var int */ - private $executableLines = []; + private $nextBranch = 0; /** - * @psalm-var array + * @var string */ - private $propertyLines = []; + private $source; /** - * @psalm-var array + * @var array */ - private $returns = []; + private $executableLinesGroupedByBranch = []; + + /** + * @var array + */ + private $unsets = []; + + /** + * @var array + */ + private $commentsToCheckForUnset = []; + + public function __construct(string $source) + { + $this->source = $source; + } public function enterNode(Node $node): void { - $this->savePropertyLines($node); + foreach ($node->getComments() as $comment) { + $commentLine = $comment->getStartLine(); + + if (!isset($this->executableLinesGroupedByBranch[$commentLine])) { + continue; + } + + foreach (explode("\n", $comment->getText()) as $text) { + $this->commentsToCheckForUnset[$commentLine] = $text; + $commentLine++; + } + } + + if ($node instanceof Node\Scalar\String_ || + $node instanceof Node\Scalar\EncapsedStringPart) { + $startLine = $node->getStartLine() + 1; + $endLine = $node->getEndLine() - 1; + + if ($startLine <= $endLine) { + foreach (range($startLine, $endLine) as $line) { + unset($this->executableLinesGroupedByBranch[$line]); + } + } - if (!$this->isExecutable($node)) { return; } - foreach ($this->getLines($node) as $line) { - if (isset($this->propertyLines[$line])) { + if ($node instanceof Node\Stmt\Interface_) { + foreach (range($node->getStartLine(), $node->getEndLine()) as $line) { + $this->unsets[$line] = true; + } + + return; + } + + if ($node instanceof Node\Stmt\Declare_ || + $node instanceof Node\Stmt\DeclareDeclare || + $node instanceof Node\Stmt\Else_ || + $node instanceof Node\Stmt\EnumCase || + $node instanceof Node\Stmt\Finally_ || + $node instanceof Node\Stmt\GroupUse || + $node instanceof Node\Stmt\Label || + $node instanceof Node\Stmt\Namespace_ || + $node instanceof Node\Stmt\Nop || + $node instanceof Node\Stmt\Switch_ || + $node instanceof Node\Stmt\TryCatch || + $node instanceof Node\Stmt\Use_ || + $node instanceof Node\Stmt\UseUse || + $node instanceof Node\Expr\ConstFetch || + $node instanceof Node\Expr\Match_ || + $node instanceof Node\Expr\Variable || + $node instanceof Node\Expr\Throw_ || + $node instanceof Node\ComplexType || + $node instanceof Node\Const_ || + $node instanceof Node\Identifier || + $node instanceof Node\Name || + $node instanceof Node\Param || + $node instanceof Node\Scalar) { + return; + } + + /* + * nikic/php-parser ^4.18 represents throw statements + * as Stmt\Throw_ objects + */ + if ($node instanceof Node\Stmt\Throw_) { + $this->setLineBranch($node->expr->getEndLine(), $node->expr->getEndLine(), ++$this->nextBranch); + + return; + } + + /* + * nikic/php-parser ^5 represents throw statements + * as Stmt\Expression objects that contain an + * Expr\Throw_ object + */ + if ($node instanceof Node\Stmt\Expression && $node->expr instanceof Node\Expr\Throw_) { + $this->setLineBranch($node->expr->expr->getEndLine(), $node->expr->expr->getEndLine(), ++$this->nextBranch); + + return; + } + + if ($node instanceof Node\Stmt\Enum_ || + $node instanceof Node\Stmt\Function_ || + $node instanceof Node\Stmt\Class_ || + $node instanceof Node\Stmt\ClassMethod || + $node instanceof Node\Expr\Closure || + $node instanceof Node\Stmt\Trait_) { + $isConcreteClassLike = $node instanceof Node\Stmt\Enum_ || $node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Trait_; + + if (null !== $node->stmts) { + foreach ($node->stmts as $stmt) { + if ($stmt instanceof Node\Stmt\Nop) { + continue; + } + + foreach (range($stmt->getStartLine(), $stmt->getEndLine()) as $line) { + unset($this->executableLinesGroupedByBranch[$line]); + + if ( + $isConcreteClassLike && + !$stmt instanceof Node\Stmt\ClassMethod + ) { + $this->unsets[$line] = true; + } + } + } + } + + if ($isConcreteClassLike) { return; } - $this->executableLines[$line] = $line; - } - } + $hasEmptyBody = [] === $node->stmts || + null === $node->stmts || + ( + 1 === count($node->stmts) && + $node->stmts[0] instanceof Node\Stmt\Nop + ); - /** - * @psalm-return array - */ - public function executableLines(): array - { - $this->computeReturns(); + if ($hasEmptyBody) { + if ($node->getEndLine() === $node->getStartLine()) { + return; + } - sort($this->executableLines); + $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); - return $this->executableLines; - } + return; + } - private function savePropertyLines(Node $node): void - { - if (!$node instanceof Property && !$node instanceof Node\Stmt\ClassConst) { return; } - foreach (range($node->getStartLine(), $node->getEndLine()) as $index) { - $this->propertyLines[$index] = $index; - } - } + if ($node instanceof Node\Expr\ArrowFunction) { + $startLine = max( + $node->getStartLine() + 1, + $node->expr->getStartLine() + ); - private function computeReturns(): void - { - foreach ($this->returns as $return) { - foreach (range($return->getStartLine(), $return->getEndLine()) as $loc) { - if (isset($this->executableLines[$loc])) { - continue 2; + $endLine = $node->expr->getEndLine(); + + if ($endLine < $startLine) { + return; + } + + $this->setLineBranch($startLine, $endLine, ++$this->nextBranch); + + return; + } + + if ($node instanceof Node\Expr\Ternary) { + if (null !== $node->if && + $node->getStartLine() !== $node->if->getEndLine()) { + $this->setLineBranch($node->if->getStartLine(), $node->if->getEndLine(), ++$this->nextBranch); + } + + if ($node->getStartLine() !== $node->else->getEndLine()) { + $this->setLineBranch($node->else->getStartLine(), $node->else->getEndLine(), ++$this->nextBranch); + } + + return; + } + + if ($node instanceof Node\Expr\BinaryOp\Coalesce) { + if ($node->getStartLine() !== $node->getEndLine()) { + $this->setLineBranch($node->getEndLine(), $node->getEndLine(), ++$this->nextBranch); + } + + return; + } + + if ($node instanceof Node\Stmt\If_ || + $node instanceof Node\Stmt\ElseIf_ || + $node instanceof Node\Stmt\Case_) { + if (null === $node->cond) { + return; + } + + $this->setLineBranch( + $node->cond->getStartLine(), + $node->cond->getStartLine(), + ++$this->nextBranch + ); + + return; + } + + if ($node instanceof Node\Stmt\For_) { + $startLine = null; + $endLine = null; + + if ([] !== $node->init) { + $startLine = $node->init[0]->getStartLine(); + + end($node->init); + + $endLine = current($node->init)->getEndLine(); + + reset($node->init); + } + + if ([] !== $node->cond) { + if (null === $startLine) { + $startLine = $node->cond[0]->getStartLine(); } + + end($node->cond); + + $endLine = current($node->cond)->getEndLine(); + + reset($node->cond); } - $line = $return->getEndLine(); - - if ($return->expr !== null) { - $line = $return->expr->getStartLine(); - } - - $this->executableLines[$line] = $line; - } - } - - /** - * @return int[] - */ - private function getLines(Node $node): array - { - if ($node instanceof Cast || - $node instanceof PropertyFetch || - $node instanceof NullsafePropertyFetch || - $node instanceof StaticPropertyFetch) { - return [$node->getEndLine()]; - } - - if ($node instanceof ArrayDimFetch) { - if (null === $node->dim) { - return []; - } - - return [$node->dim->getStartLine()]; - } - - if ($node instanceof Array_) { - $startLine = $node->getStartLine(); - - if (isset($this->executableLines[$startLine])) { - return []; - } - - if ([] === $node->items) { - return [$node->getEndLine()]; - } - - if ($node->items[0] instanceof ArrayItem) { - return [$node->items[0]->getStartLine()]; - } - } - - if ($node instanceof ClassMethod) { - if ($node->name->name !== '__construct') { - return []; - } - - $existsAPromotedProperty = false; - - foreach ($node->getParams() as $param) { - if (0 !== ($param->flags & Class_::VISIBILITY_MODIFIER_MASK)) { - $existsAPromotedProperty = true; - - break; + if ([] !== $node->loop) { + if (null === $startLine) { + $startLine = $node->loop[0]->getStartLine(); } + + end($node->loop); + + $endLine = current($node->loop)->getEndLine(); + + reset($node->loop); } - if ($existsAPromotedProperty) { - // Only the line with `function` keyword should be listed here - // but `nikic/php-parser` doesn't provide a way to fetch it - return range($node->getStartLine(), $node->name->getEndLine()); + if (null === $startLine || null === $endLine) { + return; } - return []; + $this->setLineBranch( + $startLine, + $endLine, + ++$this->nextBranch + ); + + return; } - if ($node instanceof MethodCall) { - return [$node->name->getStartLine()]; + if ($node instanceof Node\Stmt\Foreach_) { + $this->setLineBranch( + $node->expr->getStartLine(), + $node->valueVar->getEndLine(), + ++$this->nextBranch + ); + + return; } - if ($node instanceof Ternary) { - $lines = [$node->cond->getStartLine()]; + if ($node instanceof Node\Stmt\While_ || + $node instanceof Node\Stmt\Do_) { + $this->setLineBranch( + $node->cond->getStartLine(), + $node->cond->getEndLine(), + ++$this->nextBranch + ); - if (null !== $node->if) { - $lines[] = $node->if->getStartLine(); + return; + } + + if ($node instanceof Node\Stmt\Catch_) { + assert([] !== $node->types); + $startLine = $node->types[0]->getStartLine(); + end($node->types); + $endLine = current($node->types)->getEndLine(); + + $this->setLineBranch( + $startLine, + $endLine, + ++$this->nextBranch + ); + + return; + } + + if ($node instanceof Node\Expr\CallLike) { + if (isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { + $branch = $this->executableLinesGroupedByBranch[$node->getStartLine()]; + } else { + $branch = ++$this->nextBranch; } - $lines[] = $node->else->getStartLine(); + $this->setLineBranch($node->getStartLine(), $node->getEndLine(), $branch); - return $lines; + return; } - if ($node instanceof Match_) { - return [$node->cond->getStartLine()]; + if (isset($this->executableLinesGroupedByBranch[$node->getStartLine()])) { + return; } - if ($node instanceof MatchArm) { - return [$node->body->getStartLine()]; - } - - if ($node instanceof Expression && ( - $node->expr instanceof Cast || - $node->expr instanceof Match_ || - $node->expr instanceof MethodCall - )) { - return []; - } - - if ($node instanceof Return_) { - $this->returns[] = $node; - - return []; - } - - return [$node->getStartLine()]; + $this->setLineBranch($node->getStartLine(), $node->getEndLine(), ++$this->nextBranch); } - private function isExecutable(Node $node): bool + public function afterTraverse(array $nodes): void { - return $node instanceof Assign || - $node instanceof ArrayDimFetch || - $node instanceof Array_ || - $node instanceof BinaryOp || - $node instanceof Break_ || - $node instanceof CallLike || - $node instanceof Case_ || - $node instanceof Cast || - $node instanceof Catch_ || - $node instanceof ClassMethod || - $node instanceof Closure || - $node instanceof Continue_ || - $node instanceof Do_ || - $node instanceof Echo_ || - $node instanceof ElseIf_ || - $node instanceof Else_ || - $node instanceof Encapsed || - $node instanceof Expression || - $node instanceof Finally_ || - $node instanceof For_ || - $node instanceof Foreach_ || - $node instanceof Goto_ || - $node instanceof If_ || - $node instanceof Match_ || - $node instanceof MatchArm || - $node instanceof MethodCall || - $node instanceof NullsafePropertyFetch || - $node instanceof PropertyFetch || - $node instanceof Return_ || - $node instanceof StaticPropertyFetch || - $node instanceof Switch_ || - $node instanceof Ternary || - $node instanceof Throw_ || - $node instanceof TryCatch || - $node instanceof Unset_ || - $node instanceof While_; + $lines = explode("\n", $this->source); + + foreach ($lines as $lineNumber => $line) { + $lineNumber++; + + if (1 === preg_match('/^\s*$/', $line) || + ( + isset($this->commentsToCheckForUnset[$lineNumber]) && + 1 === preg_match(sprintf('/^\s*%s\s*$/', preg_quote($this->commentsToCheckForUnset[$lineNumber], '/')), $line) + )) { + unset($this->executableLinesGroupedByBranch[$lineNumber]); + } + } + + $this->executableLinesGroupedByBranch = array_diff_key( + $this->executableLinesGroupedByBranch, + $this->unsets + ); + } + + public function executableLinesGroupedByBranch(): array + { + return $this->executableLinesGroupedByBranch; + } + + private function setLineBranch(int $start, int $end, int $branch): void + { + foreach (range($start, $end) as $line) { + $this->executableLinesGroupedByBranch[$line] = $branch; + } } } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php index ebb879e8..3c0b2373 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php @@ -10,9 +10,11 @@ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; use function array_merge; +use function assert; use function range; use function strpos; use PhpParser\Node; +use PhpParser\Node\Attribute; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; @@ -52,7 +54,8 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract !$node instanceof Trait_ && !$node instanceof Interface_ && !$node instanceof ClassMethod && - !$node instanceof Function_) { + !$node instanceof Function_ && + !$node instanceof Attribute) { return; } @@ -60,11 +63,16 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract return; } - // Workaround for https://bugs.xdebug.org/view.php?id=1798 if ($node instanceof Class_ || $node instanceof Trait_ || - $node instanceof Interface_) { + $node instanceof Interface_ || + $node instanceof Attribute) { $this->ignoredLines[] = $node->getStartLine(); + + assert($node->name !== null); + + // Workaround for https://github.com/nikic/PHP-Parser/issues/886 + $this->ignoredLines[] = $node->name->getStartLine(); } if (!$this->useAnnotationsForIgnoringCode) { @@ -75,6 +83,19 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract return; } + $this->processDocComment($node); + } + + /** + * @psalm-return list + */ + public function ignoredLines(): array + { + return $this->ignoredLines; + } + + private function processDocComment(Node $node): void + { $docComment = $node->getDocComment(); if ($docComment === null) { @@ -95,12 +116,4 @@ final class IgnoredLinesFindingVisitor extends NodeVisitorAbstract ); } } - - /** - * @psalm-return list - */ - public function ignoredLines(): array - { - return $this->ignoredLines; - } } diff --git a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php index 8edf973e..923b1f50 100644 --- a/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php +++ b/vendor/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php @@ -9,17 +9,19 @@ */ namespace SebastianBergmann\CodeCoverage\StaticAnalysis; +use function array_merge; use function array_unique; use function assert; use function file_get_contents; use function is_array; use function max; +use function range; +use function sort; use function sprintf; use function substr_count; use function token_get_all; use function trim; use PhpParser\Error; -use PhpParser\Lexer; use PhpParser\NodeTraverser; use PhpParser\NodeVisitor\NameResolver; use PhpParser\NodeVisitor\ParentConnectingVisitor; @@ -139,10 +141,7 @@ final class ParsingFileAnalyser implements FileAnalyser $linesOfCode = 1; } - $parser = (new ParserFactory)->create( - ParserFactory::PREFER_PHP7, - new Lexer - ); + $parser = (new ParserFactory)->createForHostVersion(); try { $nodes = $parser->parse($source); @@ -153,7 +152,7 @@ final class ParsingFileAnalyser implements FileAnalyser $codeUnitFindingVisitor = new CodeUnitFindingVisitor; $lineCountingVisitor = new LineCountingVisitor($linesOfCode); $ignoredLinesFindingVisitor = new IgnoredLinesFindingVisitor($this->useAnnotationsForIgnoringCode, $this->ignoreDeprecatedCode); - $executableLinesFindingVisitor = new ExecutableLinesFindingVisitor; + $executableLinesFindingVisitor = new ExecutableLinesFindingVisitor($source); $traverser->addVisitor(new NameResolver); $traverser->addVisitor(new ParentConnectingVisitor); @@ -172,7 +171,7 @@ final class ParsingFileAnalyser implements FileAnalyser $filename, $error->getMessage() ), - (int) $error->getCode(), + $error->getCode(), $error ); } @@ -181,7 +180,7 @@ final class ParsingFileAnalyser implements FileAnalyser $this->classes[$filename] = $codeUnitFindingVisitor->classes(); $this->traits[$filename] = $codeUnitFindingVisitor->traits(); $this->functions[$filename] = $codeUnitFindingVisitor->functions(); - $this->executableLines[$filename] = $executableLinesFindingVisitor->executableLines(); + $this->executableLines[$filename] = $executableLinesFindingVisitor->executableLinesGroupedByBranch(); $this->ignoredLines[$filename] = []; $this->findLinesIgnoredByLineBasedAnnotations($filename, $source, $this->useAnnotationsForIgnoringCode); @@ -206,45 +205,44 @@ final class ParsingFileAnalyser implements FileAnalyser private function findLinesIgnoredByLineBasedAnnotations(string $filename, string $source, bool $useAnnotationsForIgnoringCode): void { - $ignore = false; - $stop = false; + if (!$useAnnotationsForIgnoringCode) { + return; + } + + $start = false; foreach (token_get_all($source) as $token) { - if (!is_array($token)) { + if (!is_array($token) || + !(T_COMMENT === $token[0] || T_DOC_COMMENT === $token[0])) { continue; } - switch ($token[0]) { - case T_COMMENT: - case T_DOC_COMMENT: - if (!$useAnnotationsForIgnoringCode) { - break; - } + $comment = trim($token[1]); - $comment = trim($token[1]); - - if ($comment === '// @codeCoverageIgnore' || - $comment === '//@codeCoverageIgnore') { - $ignore = true; - $stop = true; - } elseif ($comment === '// @codeCoverageIgnoreStart' || - $comment === '//@codeCoverageIgnoreStart') { - $ignore = true; - } elseif ($comment === '// @codeCoverageIgnoreEnd' || - $comment === '//@codeCoverageIgnoreEnd') { - $stop = true; - } - - break; - } - - if ($ignore) { + if ($comment === '// @codeCoverageIgnore' || + $comment === '//@codeCoverageIgnore') { $this->ignoredLines[$filename][] = $token[2]; - if ($stop) { - $ignore = false; - $stop = false; + continue; + } + + if ($comment === '// @codeCoverageIgnoreStart' || + $comment === '//@codeCoverageIgnoreStart') { + $start = $token[2]; + + continue; + } + + if ($comment === '// @codeCoverageIgnoreEnd' || + $comment === '//@codeCoverageIgnoreEnd') { + if (false === $start) { + $start = $token[2]; } + + $this->ignoredLines[$filename] = array_merge( + $this->ignoredLines[$filename], + range($start, $token[2]) + ); } } } diff --git a/vendor/phpunit/php-code-coverage/src/Version.php b/vendor/phpunit/php-code-coverage/src/Version.php index 285279df..1753a97b 100644 --- a/vendor/phpunit/php-code-coverage/src/Version.php +++ b/vendor/phpunit/php-code-coverage/src/Version.php @@ -22,7 +22,7 @@ final class Version public static function id(): string { if (self::$version === null) { - self::$version = (new VersionId('9.2.15', dirname(__DIR__)))->getVersion(); + self::$version = (new VersionId('9.2.31', dirname(__DIR__)))->getVersion(); } return self::$version; diff --git a/vendor/phpunit/phpunit/ChangeLog-8.5.md b/vendor/phpunit/phpunit/ChangeLog-8.5.md deleted file mode 100644 index 75592129..00000000 --- a/vendor/phpunit/phpunit/ChangeLog-8.5.md +++ /dev/null @@ -1,248 +0,0 @@ -# Changes in PHPUnit 8.5 - -All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [8.5.26] - 2022-04-01 - -### Fixed - -* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods - -## [8.5.25] - 2022-03-16 - -### Fixed - -* [#4934](https://github.com/sebastianbergmann/phpunit/issues/4934): Code Coverage does not work with PHPUnit 8.5.24 PHAR on PHP 7 - -## [8.5.24] - 2022-03-05 - #StandWithUkraine - -### Changed - -* [#4874](https://github.com/sebastianbergmann/phpunit/pull/4874): `PHP_FLOAT_EPSILON` is now used instead of hardcoded `0.0000000001` in `PHPUnit\Framework\Constraint\IsIdentical` - -### Fixed - -* When the HTML code coverage report's configured low upper bound is larger than the high lower bound then the default values are used instead - -## [8.5.23] - 2022-01-21 - -### Fixed - -* [#4799](https://github.com/sebastianbergmann/phpunit/pull/4799): Memory leaks in `PHPUnit\Framework\TestSuite` class -* [#4857](https://github.com/sebastianbergmann/phpunit/pull/4857): Result of `debug_backtrace()` is not used correctly - -## [8.5.22] - 2021-12-25 - -### Changed - -* [#4812](https://github.com/sebastianbergmann/phpunit/issues/4812): Do not enforce time limits when a debugging session through DBGp is active -* [#4835](https://github.com/sebastianbergmann/phpunit/issues/4835): Support for `$GLOBALS['_composer_autoload_path']` introduced in Composer 2.2 - -### Fixed - -* [#4840](https://github.com/sebastianbergmann/phpunit/pull/4840): TestDox prettifying for class names does not correctly handle diacritics -* [#4846](https://github.com/sebastianbergmann/phpunit/pull/4846): Composer proxy script is not ignored - -## [8.5.21] - 2021-09-25 - -### Changed - -* PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this) -* The PHPUnit XML configuration file generator now configures `convertDeprecationsToExceptions="true"` - -### Fixed - -* [#4772](https://github.com/sebastianbergmann/phpunit/pull/4772): TestDox HTML report not displayed correctly when browser has custom colour settings - -## [8.5.20] - 2021-08-31 - -### Fixed - -* [#4751](https://github.com/sebastianbergmann/phpunit/issues/4751): Configuration validation fails when using brackets in glob pattern - -## [8.5.19] - 2021-07-31 - -### Fixed - -* [#4740](https://github.com/sebastianbergmann/phpunit/issues/4740): `phpunit.phar` does not work with PHP 8.1 - -## [8.5.18] - 2021-07-19 - -### Fixed - -* [#4720](https://github.com/sebastianbergmann/phpunit/issues/4720): PHPUnit does not verify its own PHP extension requirements - -## [8.5.17] - 2021-06-23 - -### Changed - -* PHPUnit now errors out on startup when `PHP_VERSION` contains a value that is not compatible with `version_compare()`, for instance `X.Y.Z-(to be removed in future macOS)` - -## [8.5.16] - 2021-06-05 - -### Changed - -* The test result cache (the storage for which is implemented in `PHPUnit\Runner\DefaultTestResultCache`) no longer uses PHP's `serialize()` and `unserialize()` functions for persistence. It now uses a versioned JSON format instead that is independent of PHP implementation details (see [#3581](https://github.com/sebastianbergmann/phpunit/issues/3581) and [#4662](https://github.com/sebastianbergmann/phpunit/pull/4662) for examples why this is a problem). When PHPUnit tries to load the test result cache from a file that does not exist, or from a file that does not contain data in JSON format, or from a file that contains data in a JSON format version other than the one used by the currently running PHPUnit version, then this is considered to be a "cache miss". An empty `DefaultTestResultCache` object is created in this case. This should also prevent PHPUnit from crashing when trying to load a test result cache file created by a different version of PHPUnit (see [#4580](https://github.com/sebastianbergmann/phpunit/issues/4580) for example). - -### Fixed - -* [#4663](https://github.com/sebastianbergmann/phpunit/issues/4663): `TestCase::expectError()` works on PHP 7.3, but not on PHP >= 7.4 -* [#4678](https://github.com/sebastianbergmann/phpunit/pull/4678): Stubbed methods with `iterable` return types should return empty array by default -* [#4692](https://github.com/sebastianbergmann/phpunit/issues/4692): Annotations in single-line doc-comments are not handled correctly -* [#4694](https://github.com/sebastianbergmann/phpunit/issues/4694): `TestCase::getMockFromWsdl()` does not work with PHP 8.1-dev - -## [8.5.15] - 2021-03-17 - -### Fixed - -* [#4591](https://github.com/sebastianbergmann/phpunit/issues/4591): TeamCity logger logs warnings as test failures - -## [8.5.14] - 2021-01-17 - -### Fixed - -* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly -* [#4572](https://github.com/sebastianbergmann/phpunit/issues/4572): Schema validation does not work with `%xx` sequences in path to `phpunit.xsd` -* [#4575](https://github.com/sebastianbergmann/phpunit/issues/4575): PHPUnit 8.5 incompatibility with PHP 8.1 - -## [8.5.13] - 2020-12-01 - -### Fixed - -* Running tests in isolated processes did not work with PHP 8 on Windows - -## [8.5.12] - 2020-11-30 - -### Changed - -* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2` to allow the installation of PHPUnit 8.5 on PHP 8. Please note that the code coverage functionality is not available for PHPUnit 8.5 on PHP 8. - -### Fixed - -* [#4529](https://github.com/sebastianbergmann/phpunit/issues/4529): Debug mode of Xdebug 2 is not disabled for PHPT tests - -## [8.5.11] - 2020-11-27 - -### Changed - -* Bumped required version of `phpunit/php-code-coverage` - -## [8.5.10] - 2020-11-27 - -### Added - -* Support for Xdebug 3 - -### Fixed - -* [#4516](https://github.com/sebastianbergmann/phpunit/issues/4516): `phpunit/phpunit-selenium` does not work with PHPUnit 8.5.9 - -## [8.5.9] - 2020-11-10 - -### Fixed - -* [#3965](https://github.com/sebastianbergmann/phpunit/issues/3965): Process Isolation throws exceptions when PHPDBG is used -* [#4470](https://github.com/sebastianbergmann/phpunit/pull/4470): Infinite recursion when `--static-backup --strict-global-state` is used - -## [8.5.8] - 2020-06-22 - -### Fixed - -* [#4312](https://github.com/sebastianbergmann/phpunit/issues/4312): Fix for [#4299](https://github.com/sebastianbergmann/phpunit/issues/4299) breaks backward compatibility - -## [8.5.7] - 2020-06-21 - -### Fixed - -* [#4299](https://github.com/sebastianbergmann/phpunit/issues/4299): "No tests executed" does not always result in exit code `1` -* [#4306](https://github.com/sebastianbergmann/phpunit/issues/4306): Exceptions during code coverage driver initialization are not handled correctly - -## [8.5.6] - 2020-06-15 - -### Fixed - -* [#4211](https://github.com/sebastianbergmann/phpunit/issues/4211): `phpdbg_*()` functions are scoped to `PHPUnit\phpdbg_*()` - -## [8.5.5] - 2020-05-22 - -### Fixed - -* [#4033](https://github.com/sebastianbergmann/phpunit/issues/4033): Unexpected behaviour when `$GLOBALS` is deleted - -## [8.5.4] - 2020-04-23 - -### Changed - -* Changed how `PHPUnit\TextUI\Command` passes warnings to `PHPUnit\TextUI\TestRunner` - -## [8.5.3] - 2020-03-31 - -### Fixed - -* [#4017](https://github.com/sebastianbergmann/phpunit/issues/4017): Do not suggest refactoring to something that is also deprecated -* [#4133](https://github.com/sebastianbergmann/phpunit/issues/4133): `expectExceptionMessageRegExp()` has been removed in PHPUnit 9 without a deprecation warning being given in PHPUnit 8 -* [#4139](https://github.com/sebastianbergmann/phpunit/issues/4139): Cannot double interfaces that declare a constructor with PHP 8 -* [#4144](https://github.com/sebastianbergmann/phpunit/issues/4144): Empty objects are converted to empty arrays in JSON comparison failure diff - -## [8.5.2] - 2020-01-08 - -### Removed - -* `eval-stdin.php` has been removed, it was not used anymore since PHPUnit 7.2.7 - -## [8.5.1] - 2019-12-25 - -### Changed - -* `eval-stdin.php` can now only be executed with `cli` and `phpdbg` - -### Fixed - -* [#3983](https://github.com/sebastianbergmann/phpunit/issues/3983): Deprecation warning given too eagerly - -## [8.5.0] - 2019-12-06 - -### Added - -* [#3911](https://github.com/sebastianbergmann/phpunit/issues/3911): Support combined use of `addMethods()` and `onlyMethods()` -* [#3949](https://github.com/sebastianbergmann/phpunit/issues/3949): Introduce specialized assertions `assertFileEqualsCanonicalizing()`, `assertFileEqualsIgnoringCase()`, `assertStringEqualsFileCanonicalizing()`, `assertStringEqualsFileIgnoringCase()`, `assertFileNotEqualsCanonicalizing()`, `assertFileNotEqualsIgnoringCase()`, `assertStringNotEqualsFileCanonicalizing()`, and `assertStringNotEqualsFileIgnoringCase()` as alternative to using `assertFileEquals()` etc. with optional parameters - -### Changed - -* [#3860](https://github.com/sebastianbergmann/phpunit/pull/3860): Deprecate invoking PHPUnit commandline test runner with just a class name -* [#3950](https://github.com/sebastianbergmann/phpunit/issues/3950): Deprecate optional parameters of `assertFileEquals()` etc. -* [#3955](https://github.com/sebastianbergmann/phpunit/issues/3955): Deprecate support for doubling multiple interfaces - -### Fixed - -* [#3953](https://github.com/sebastianbergmann/phpunit/issues/3953): Code Coverage for test executed in isolation does not work when the PHAR is used -* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable` -* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside - -[8.5.26]: https://github.com/sebastianbergmann/phpunit/compare/8.5.25...8.5.26 -[8.5.25]: https://github.com/sebastianbergmann/phpunit/compare/8.5.24...8.5.25 -[8.5.24]: https://github.com/sebastianbergmann/phpunit/compare/8.5.23...8.5.24 -[8.5.23]: https://github.com/sebastianbergmann/phpunit/compare/8.5.22...8.5.23 -[8.5.22]: https://github.com/sebastianbergmann/phpunit/compare/8.5.21...8.5.22 -[8.5.21]: https://github.com/sebastianbergmann/phpunit/compare/8.5.20...8.5.21 -[8.5.20]: https://github.com/sebastianbergmann/phpunit/compare/8.5.19...8.5.20 -[8.5.19]: https://github.com/sebastianbergmann/phpunit/compare/8.5.18...8.5.19 -[8.5.18]: https://github.com/sebastianbergmann/phpunit/compare/8.5.17...8.5.18 -[8.5.17]: https://github.com/sebastianbergmann/phpunit/compare/8.5.16...8.5.17 -[8.5.16]: https://github.com/sebastianbergmann/phpunit/compare/8.5.15...8.5.16 -[8.5.15]: https://github.com/sebastianbergmann/phpunit/compare/8.5.14...8.5.15 -[8.5.14]: https://github.com/sebastianbergmann/phpunit/compare/8.5.13...8.5.14 -[8.5.13]: https://github.com/sebastianbergmann/phpunit/compare/8.5.12...8.5.13 -[8.5.12]: https://github.com/sebastianbergmann/phpunit/compare/8.5.11...8.5.12 -[8.5.11]: https://github.com/sebastianbergmann/phpunit/compare/8.5.10...8.5.11 -[8.5.10]: https://github.com/sebastianbergmann/phpunit/compare/8.5.9...8.5.10 -[8.5.9]: https://github.com/sebastianbergmann/phpunit/compare/8.5.8...8.5.9 -[8.5.8]: https://github.com/sebastianbergmann/phpunit/compare/8.5.7...8.5.8 -[8.5.7]: https://github.com/sebastianbergmann/phpunit/compare/8.5.6...8.5.7 -[8.5.6]: https://github.com/sebastianbergmann/phpunit/compare/8.5.5...8.5.6 -[8.5.5]: https://github.com/sebastianbergmann/phpunit/compare/8.5.4...8.5.5 -[8.5.4]: https://github.com/sebastianbergmann/phpunit/compare/8.5.3...8.5.4 -[8.5.3]: https://github.com/sebastianbergmann/phpunit/compare/8.5.2...8.5.3 -[8.5.2]: https://github.com/sebastianbergmann/phpunit/compare/8.5.1...8.5.2 -[8.5.1]: https://github.com/sebastianbergmann/phpunit/compare/8.5.0...8.5.1 -[8.5.0]: https://github.com/sebastianbergmann/phpunit/compare/8.4.3...8.5.0 diff --git a/vendor/phpunit/phpunit/ChangeLog-9.5.md b/vendor/phpunit/phpunit/ChangeLog-9.5.md deleted file mode 100644 index 2193963f..00000000 --- a/vendor/phpunit/phpunit/ChangeLog-9.5.md +++ /dev/null @@ -1,180 +0,0 @@ -# Changes in PHPUnit 9.5 - -All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. - -## [9.5.20] - 2022-04-01 - -### Fixed - -* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods -* [#4947](https://github.com/sebastianbergmann/phpunit/issues/4947): Test annotated with `@coversNothing` may lead to files missing from code coverage report - -## [9.5.19] - 2022-03-15 - -### Fixed - -* [#4929](https://github.com/sebastianbergmann/phpunit/issues/4929): Test Double code generator does not handle new expressions inside parameter default values -* [#4932](https://github.com/sebastianbergmann/phpunit/issues/4932): Backport support for intersection types from PHPUnit 10 to PHPUnit 9.5 -* [#4933](https://github.com/sebastianbergmann/phpunit/issues/4933): Backport support for `never` type from PHPUnit 10 to PHPUnit 9.5 - -## [9.5.18] - 2022-03-08 - -### Fixed - -* [#4877](https://github.com/sebastianbergmann/phpunit/issues/4877): No stack trace shown when an error occurs during bootstrap - -## [9.5.17] - 2022-03-05 - #StandWithUkraine - -## [9.5.16] - 2022-02-23 - -### Changed - -* Reverted sync with API change in (now yanked) phpunit/php-code-coverage 9.2.12 - -## [9.5.15] - 2022-02-23 [YANKED] - -### Fixed - -* When the HTML code coverage report's configured low upper bound is larger than the high lower bound then the default values are used instead - -## [9.5.14] - 2022-02-18 - -### Changed - -* [#4874](https://github.com/sebastianbergmann/phpunit/pull/4874): `PHP_FLOAT_EPSILON` is now used instead of hardcoded `0.0000000001` in `PHPUnit\Framework\Constraint\IsIdentical` - -## [9.5.13] - 2022-01-24 - -### Fixed - -* [#4871](https://github.com/sebastianbergmann/phpunit/issues/4871): Class `SebastianBergmann\CodeCoverage\Filter` is not found during PHPT tests when PHPUnit is used from PHAR - -## [9.5.12] - 2022-01-21 - -### Fixed - -* [#4799](https://github.com/sebastianbergmann/phpunit/pull/4799): Memory leaks in `PHPUnit\Framework\TestSuite` class -* [#4857](https://github.com/sebastianbergmann/phpunit/pull/4857): Result of `debug_backtrace()` is not used correctly - -## [9.5.11] - 2021-12-25 - -### Changed - -* [#4812](https://github.com/sebastianbergmann/phpunit/issues/4812): Do not enforce time limits when a debugging session through DBGp is active -* [#4835](https://github.com/sebastianbergmann/phpunit/issues/4835): Support for `$GLOBALS['_composer_autoload_path']` introduced in Composer 2.2 - -### Fixed - -* [#4840](https://github.com/sebastianbergmann/phpunit/pull/4840): TestDox prettifying for class names does not correctly handle diacritics -* [#4846](https://github.com/sebastianbergmann/phpunit/pull/4846): Composer proxy script is not ignored - -## [9.5.10] - 2021-09-25 - -### Changed - -* PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this) -* The PHPUnit XML configuration file generator now configures `convertDeprecationsToExceptions="true"` - -### Fixed - -* [#4772](https://github.com/sebastianbergmann/phpunit/pull/4772): TestDox HTML report not displayed correctly when browser has custom colour settings - -## [9.5.9] - 2021-08-31 - -### Fixed - -* [#4750](https://github.com/sebastianbergmann/phpunit/issues/4750): Automatic return value generation leads to invalid (and superfluous) test double code generation when a stubbed method returns `*|false` -* [#4751](https://github.com/sebastianbergmann/phpunit/issues/4751): Configuration validation fails when using brackets in glob pattern - -## [9.5.8] - 2021-07-31 - -### Fixed - -* [#4740](https://github.com/sebastianbergmann/phpunit/issues/4740): `phpunit.phar` does not work with PHP 8.1 - -## [9.5.7] - 2021-07-19 - -### Fixed - -* [#4720](https://github.com/sebastianbergmann/phpunit/issues/4720): PHPUnit does not verify its own PHP extension requirements -* [#4735](https://github.com/sebastianbergmann/phpunit/issues/4735): Automated return value generation does not work for stubbed methods that return `*|false` - -## [9.5.6] - 2021-06-23 - -### Changed - -* PHPUnit now errors out on startup when `PHP_VERSION` contains a value that is not compatible with `version_compare()`, for instance `X.Y.Z-(to be removed in future macOS)` - -## [9.5.5] - 2021-06-05 - -### Changed - -* The test result cache (the storage for which is implemented in `PHPUnit\Runner\DefaultTestResultCache`) no longer uses PHP's `serialize()` and `unserialize()` functions for persistence. It now uses a versioned JSON format instead that is independent of PHP implementation details (see [#3581](https://github.com/sebastianbergmann/phpunit/issues/3581) and [#4662](https://github.com/sebastianbergmann/phpunit/pull/4662) for examples why this is a problem). When PHPUnit tries to load the test result cache from a file that does not exist, or from a file that does not contain data in JSON format, or from a file that contains data in a JSON format version other than the one used by the currently running PHPUnit version, then this is considered to be a "cache miss". An empty `DefaultTestResultCache` object is created in this case. This should also prevent PHPUnit from crashing when trying to load a test result cache file created by a different version of PHPUnit (see [#4580](https://github.com/sebastianbergmann/phpunit/issues/4580) for example). - -### Fixed - -* [#4632](https://github.com/sebastianbergmann/phpunit/issues/4632): TestDox result printer does not handle repeated test execution correctly -* [#4678](https://github.com/sebastianbergmann/phpunit/pull/4678): Stubbed methods with `iterable` return types should return empty array by default -* [#4692](https://github.com/sebastianbergmann/phpunit/issues/4692): Annotations in single-line doc-comments are not handled correctly -* [#4694](https://github.com/sebastianbergmann/phpunit/issues/4694): `TestCase::getMockFromWsdl()` does not work with PHP 8.1-dev - -## [9.5.4] - 2021-03-23 - -### Fixed - -* [#4630](https://github.com/sebastianbergmann/phpunit/issues/4630): Empty test case class causes error in TestDox XML logger - -## [9.5.3] - 2021-03-17 - -### Fixed - -* [#4591](https://github.com/sebastianbergmann/phpunit/issues/4591): TeamCity logger logs warnings as test failures -* [#4620](https://github.com/sebastianbergmann/phpunit/issues/4620): No useful output when an error occurs in the bootstrap script - -## [9.5.2] - 2021-02-02 - -### Fixed - -* [#4573](https://github.com/sebastianbergmann/phpunit/issues/4573): No stack trace printed when PHPUnit is used from PHAR -* [#4590](https://github.com/sebastianbergmann/phpunit/issues/4590): `--coverage-text` CLI option is documented wrong - -## [9.5.1] - 2021-01-17 - -### Fixed - -* [#4572](https://github.com/sebastianbergmann/phpunit/issues/4572): Schema validation does not work with `%xx` sequences in path to `phpunit.xsd` - -## [9.5.0] - 2020-12-04 - -### Changed - -* [#4490](https://github.com/sebastianbergmann/phpunit/issues/4490): Emit Error instead of Warning when test case class cannot be instantiated -* [#4491](https://github.com/sebastianbergmann/phpunit/issues/4491): Emit Error instead of Warning when data provider does not work correctly -* [#4492](https://github.com/sebastianbergmann/phpunit/issues/4492): Emit Error instead of Warning when test double configuration is invalid -* [#4493](https://github.com/sebastianbergmann/phpunit/issues/4493): Emit error when (configured) test directory does not exist - -### Fixed - -* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly - -[9.5.20]: https://github.com/sebastianbergmann/phpunit/compare/9.5.19...9.5.20 -[9.5.19]: https://github.com/sebastianbergmann/phpunit/compare/9.5.18...9.5.19 -[9.5.18]: https://github.com/sebastianbergmann/phpunit/compare/9.5.17...9.5.18 -[9.5.17]: https://github.com/sebastianbergmann/phpunit/compare/9.5.16...9.5.17 -[9.5.16]: https://github.com/sebastianbergmann/phpunit/compare/dc738383c519243b0a967f63943a848d3fd861aa...9.5.16 -[9.5.15]: https://github.com/sebastianbergmann/phpunit/compare/9.5.14...dc738383c519243b0a967f63943a848d3fd861aa -[9.5.14]: https://github.com/sebastianbergmann/phpunit/compare/9.5.13...9.5.14 -[9.5.13]: https://github.com/sebastianbergmann/phpunit/compare/9.5.12...9.5.13 -[9.5.12]: https://github.com/sebastianbergmann/phpunit/compare/9.5.11...9.5.12 -[9.5.11]: https://github.com/sebastianbergmann/phpunit/compare/9.5.10...9.5.11 -[9.5.10]: https://github.com/sebastianbergmann/phpunit/compare/9.5.9...9.5.10 -[9.5.9]: https://github.com/sebastianbergmann/phpunit/compare/9.5.8...9.5.9 -[9.5.8]: https://github.com/sebastianbergmann/phpunit/compare/9.5.7...9.5.8 -[9.5.7]: https://github.com/sebastianbergmann/phpunit/compare/9.5.6...9.5.7 -[9.5.6]: https://github.com/sebastianbergmann/phpunit/compare/9.5.5...9.5.6 -[9.5.5]: https://github.com/sebastianbergmann/phpunit/compare/9.5.4...9.5.5 -[9.5.4]: https://github.com/sebastianbergmann/phpunit/compare/9.5.3...9.5.4 -[9.5.3]: https://github.com/sebastianbergmann/phpunit/compare/9.5.2...9.5.3 -[9.5.2]: https://github.com/sebastianbergmann/phpunit/compare/9.5.1...9.5.2 -[9.5.1]: https://github.com/sebastianbergmann/phpunit/compare/9.5.0...9.5.1 -[9.5.0]: https://github.com/sebastianbergmann/phpunit/compare/9.4.4...9.5.0 diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE index 78ff6219..bdb57ec6 100644 --- a/vendor/phpunit/phpunit/LICENSE +++ b/vendor/phpunit/phpunit/LICENSE @@ -1,33 +1,29 @@ -PHPUnit +BSD 3-Clause License -Copyright (c) 2001-2022, Sebastian Bergmann . +Copyright (c) 2001-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - * Neither the name of Sebastian Bergmann nor the names of his - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md index cb7739be..98a365f1 100644 --- a/vendor/phpunit/phpunit/README.md +++ b/vendor/phpunit/phpunit/README.md @@ -1,11 +1,11 @@ # PHPUnit -PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. - -[![Latest Stable Version](https://img.shields.io/packagist/v/phpunit/phpunit.svg?style=flat-square)](https://packagist.org/packages/phpunit/phpunit) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg?style=flat-square)](https://php.net/) -[![CI Status](https://github.com/sebastianbergmann/phpunit/workflows/CI/badge.svg?branch=9.5&event=push)](https://phpunit.de/build-status.html) +[![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit/v/stable.png)](https://packagist.org/packages/phpunit/phpunit) +[![CI Status](https://github.com/sebastianbergmann/phpunit/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/phpunit/actions) [![Type Coverage](https://shepherd.dev/github/sebastianbergmann/phpunit/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/phpunit) +[![codecov](https://codecov.io/gh/sebastianbergmann/phpunit/branch/9.6/graph/badge.svg)](https://codecov.io/gh/sebastianbergmann/phpunit) + +PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. ## Installation @@ -19,11 +19,11 @@ $ php phpunit-X.Y.phar --version Please replace `X.Y` with the version of PHPUnit you are interested in. -Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the "[Getting Started](https://phpunit.de/getting-started-with-phpunit.html)" guide for details on how to install PHPUnit. +Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the [documentation](https://phpunit.de/documentation.html) for details on how to install PHPUnit. ## Contribute -Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. +Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/main/.github/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects. ## List of Contributors @@ -32,12 +32,5 @@ Thanks to everyone who has contributed to PHPUnit! You can find a detailed list * [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors) * [php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors) -A very special thanks to everyone who has contributed to the documentation and helps maintain the translations: - -* [English](https://github.com/sebastianbergmann/phpunit-documentation-english/graphs/contributors) -* [Spanish](https://github.com/sebastianbergmann/phpunit-documentation-spanish/graphs/contributors) -* [French](https://github.com/sebastianbergmann/phpunit-documentation-french/graphs/contributors) -* [Japanese](https://github.com/sebastianbergmann/phpunit-documentation-japanese/graphs/contributors) -* [Brazilian Portuguese](https://github.com/sebastianbergmann/phpunit-documentation-brazilian-portuguese/graphs/contributors) -* [Simplified Chinese](https://github.com/sebastianbergmann/phpunit-documentation-chinese/graphs/contributors) +A very special thanks to everyone who has contributed to the [documentation](https://github.com/sebastianbergmann/phpunit-documentation-english/graphs/contributors). diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json index e399e175..42e16c6f 100644 --- a/vendor/phpunit/phpunit/composer.json +++ b/vendor/phpunit/phpunit/composer.json @@ -17,7 +17,8 @@ } ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy" }, "prefer-stable": true, "require": { @@ -28,32 +29,27 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-PDO": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "config": { "platform": { "php": "7.3.0" @@ -62,8 +58,8 @@ "sort-packages": true }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -88,7 +84,7 @@ }, "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } } } diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit old mode 100755 new mode 100644 index c8029566..b9f5cf29 --- a/vendor/phpunit/phpunit/phpunit +++ b/vendor/phpunit/phpunit/phpunit @@ -38,22 +38,31 @@ if (version_compare('7.3.0', PHP_VERSION, '>')) { die(1); } -foreach (['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter'] as $extension) { - if (extension_loaded($extension)) { - continue; - } +$requiredExtensions = ['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter']; +$unavailableExtensions = array_filter( + $requiredExtensions, + static function ($extension) { + return !extension_loaded($extension); + } +); + +if ([] !== $unavailableExtensions) { fwrite( STDERR, sprintf( - 'PHPUnit requires the "%s" extension.' . PHP_EOL, - $extension + 'PHPUnit requires the "%s" extensions, but the "%s" %s not available.' . PHP_EOL, + implode('", "', $requiredExtensions), + implode('", "', $unavailableExtensions), + count($unavailableExtensions) === 1 ? 'extension is' : 'extensions are' ) ); die(1); } +unset($requiredExtensions, $unavailableExtensions); + if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd index cf44e8a4..619434ef 100644 --- a/vendor/phpunit/phpunit/phpunit.xsd +++ b/vendor/phpunit/phpunit/phpunit.xsd @@ -2,7 +2,7 @@ - This Schema file defines the rules by which the XML configuration file of PHPUnit 9.5 may be structured. + This Schema file defines the rules by which the XML configuration file of PHPUnit 9.6 may be structured. @@ -57,7 +57,7 @@ - + @@ -279,8 +279,10 @@ - - + + + + diff --git a/vendor/phpunit/phpunit/schema/8.5.xsd b/vendor/phpunit/phpunit/schema/8.5.xsd index 5881bafe..75e22289 100644 --- a/vendor/phpunit/phpunit/schema/8.5.xsd +++ b/vendor/phpunit/phpunit/schema/8.5.xsd @@ -244,7 +244,7 @@ - + @@ -309,8 +309,10 @@ - - + + + + diff --git a/vendor/phpunit/phpunit/schema/9.2.xsd b/vendor/phpunit/phpunit/schema/9.2.xsd index 883f21bc..d770e8b0 100644 --- a/vendor/phpunit/phpunit/schema/9.2.xsd +++ b/vendor/phpunit/phpunit/schema/9.2.xsd @@ -163,7 +163,7 @@ - + @@ -248,7 +248,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -310,7 +310,7 @@ - + diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php index 8053f284..ea8f17d2 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert.php @@ -37,6 +37,7 @@ use Countable; use DOMAttr; use DOMDocument; use DOMElement; +use Generator; use PHPUnit\Framework\Constraint\ArrayHasKey; use PHPUnit\Framework\Constraint\Callback; use PHPUnit\Framework\Constraint\ClassHasAttribute; @@ -72,6 +73,7 @@ use PHPUnit\Framework\Constraint\LogicalOr; use PHPUnit\Framework\Constraint\LogicalXor; use PHPUnit\Framework\Constraint\ObjectEquals; use PHPUnit\Framework\Constraint\ObjectHasAttribute; +use PHPUnit\Framework\Constraint\ObjectHasProperty; use PHPUnit\Framework\Constraint\RegularExpression; use PHPUnit\Framework\Constraint\SameSize; use PHPUnit\Framework\Constraint\StringContains; @@ -110,14 +112,14 @@ abstract class Assert if (!(is_int($key) || is_string($key))) { throw InvalidArgumentException::create( 1, - 'integer or string' + 'integer or string', ); } if (!(is_array($array) || $array instanceof ArrayAccess)) { throw InvalidArgumentException::create( 2, - 'array or ArrayAccess' + 'array or ArrayAccess', ); } @@ -141,19 +143,19 @@ abstract class Assert if (!(is_int($key) || is_string($key))) { throw InvalidArgumentException::create( 1, - 'integer or string' + 'integer or string', ); } if (!(is_array($array) || $array instanceof ArrayAccess)) { throw InvalidArgumentException::create( 2, - 'array or ArrayAccess' + 'array or ArrayAccess', ); } $constraint = new LogicalNot( - new ArrayHasKey($key) + new ArrayHasKey($key), ); static::assertThat($array, $constraint, $message); @@ -190,7 +192,7 @@ abstract class Assert public static function assertNotContains($needle, iterable $haystack, string $message = ''): void { $constraint = new LogicalNot( - new TraversableContainsIdentical($needle) + new TraversableContainsIdentical($needle), ); static::assertThat($haystack, $constraint, $message); @@ -219,9 +221,9 @@ abstract class Assert $haystack, new TraversableContainsOnly( $type, - $isNativeType + $isNativeType, ), - $message + $message, ); } @@ -237,9 +239,9 @@ abstract class Assert $haystack, new TraversableContainsOnly( $className, - false + false, ), - $message + $message, ); } @@ -260,10 +262,10 @@ abstract class Assert new LogicalNot( new TraversableContainsOnly( $type, - $isNativeType - ) + $isNativeType, + ), ), - $message + $message, ); } @@ -278,6 +280,10 @@ abstract class Assert */ public static function assertCount(int $expectedCount, $haystack, string $message = ''): void { + if ($haystack instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $haystack parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + if (!$haystack instanceof Countable && !is_iterable($haystack)) { throw InvalidArgumentException::create(2, 'countable or iterable'); } @@ -285,7 +291,7 @@ abstract class Assert static::assertThat( $haystack, new Count($expectedCount), - $message + $message, ); } @@ -300,12 +306,16 @@ abstract class Assert */ public static function assertNotCount(int $expectedCount, $haystack, string $message = ''): void { + if ($haystack instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $haystack parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + if (!$haystack instanceof Countable && !is_iterable($haystack)) { throw InvalidArgumentException::create(2, 'countable or iterable'); } $constraint = new LogicalNot( - new Count($expectedCount) + new Count($expectedCount), ); static::assertThat($haystack, $constraint, $message); @@ -360,7 +370,7 @@ abstract class Assert { $constraint = new IsEqualWithDelta( $expected, - $delta + $delta, ); static::assertThat($actual, $constraint, $message); @@ -375,7 +385,7 @@ abstract class Assert public static function assertNotEquals($expected, $actual, string $message = ''): void { $constraint = new LogicalNot( - new IsEqual($expected) + new IsEqual($expected), ); static::assertThat($actual, $constraint, $message); @@ -390,7 +400,7 @@ abstract class Assert public static function assertNotEqualsCanonicalizing($expected, $actual, string $message = ''): void { $constraint = new LogicalNot( - new IsEqualCanonicalizing($expected) + new IsEqualCanonicalizing($expected), ); static::assertThat($actual, $constraint, $message); @@ -405,7 +415,7 @@ abstract class Assert public static function assertNotEqualsIgnoringCase($expected, $actual, string $message = ''): void { $constraint = new LogicalNot( - new IsEqualIgnoringCase($expected) + new IsEqualIgnoringCase($expected), ); static::assertThat($actual, $constraint, $message); @@ -422,8 +432,8 @@ abstract class Assert $constraint = new LogicalNot( new IsEqualWithDelta( $expected, - $delta - ) + $delta, + ), ); static::assertThat($actual, $constraint, $message); @@ -437,7 +447,7 @@ abstract class Assert static::assertThat( $actual, static::objectEquals($expected, $method), - $message + $message, ); } @@ -451,6 +461,10 @@ abstract class Assert */ public static function assertEmpty($actual, string $message = ''): void { + if ($actual instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $actual parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + static::assertThat($actual, static::isEmpty(), $message); } @@ -464,6 +478,10 @@ abstract class Assert */ public static function assertNotEmpty($actual, string $message = ''): void { + if ($actual instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $actual parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + static::assertThat($actual, static::logicalNot(static::isEmpty()), $message); } @@ -489,7 +507,7 @@ abstract class Assert static::assertThat( $actual, static::greaterThanOrEqual($expected), - $message + $message, ); } @@ -545,7 +563,7 @@ abstract class Assert static::assertFileExists($actual, $message); $constraint = new IsEqualCanonicalizing( - file_get_contents($expected) + file_get_contents($expected), ); static::assertThat(file_get_contents($actual), $constraint, $message); @@ -581,7 +599,7 @@ abstract class Assert static::assertFileExists($actual, $message); $constraint = new LogicalNot( - new IsEqual(file_get_contents($expected)) + new IsEqual(file_get_contents($expected)), ); static::assertThat(file_get_contents($actual), $constraint, $message); @@ -600,7 +618,7 @@ abstract class Assert static::assertFileExists($actual, $message); $constraint = new LogicalNot( - new IsEqualCanonicalizing(file_get_contents($expected)) + new IsEqualCanonicalizing(file_get_contents($expected)), ); static::assertThat(file_get_contents($actual), $constraint, $message); @@ -619,7 +637,7 @@ abstract class Assert static::assertFileExists($actual, $message); $constraint = new LogicalNot( - new IsEqualIgnoringCase(file_get_contents($expected)) + new IsEqualIgnoringCase(file_get_contents($expected)), ); static::assertThat(file_get_contents($actual), $constraint, $message); @@ -685,7 +703,7 @@ abstract class Assert static::assertFileExists($expectedFile, $message); $constraint = new LogicalNot( - new IsEqual(file_get_contents($expectedFile)) + new IsEqual(file_get_contents($expectedFile)), ); static::assertThat($actualString, $constraint, $message); @@ -703,7 +721,7 @@ abstract class Assert static::assertFileExists($expectedFile, $message); $constraint = new LogicalNot( - new IsEqualCanonicalizing(file_get_contents($expectedFile)) + new IsEqualCanonicalizing(file_get_contents($expectedFile)), ); static::assertThat($actualString, $constraint, $message); @@ -721,7 +739,7 @@ abstract class Assert static::assertFileExists($expectedFile, $message); $constraint = new LogicalNot( - new IsEqualIgnoringCase(file_get_contents($expectedFile)) + new IsEqualIgnoringCase(file_get_contents($expectedFile)), ); static::assertThat($actualString, $constraint, $message); @@ -1168,9 +1186,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertClassHasAttribute(string $attributeName, string $className, string $message = ''): void { + self::createWarning('assertClassHasAttribute() is deprecated and will be removed in PHPUnit 10.'); + if (!self::isValidClassAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1188,9 +1210,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertClassNotHasAttribute(string $attributeName, string $className, string $message = ''): void { + self::createWarning('assertClassNotHasAttribute() is deprecated and will be removed in PHPUnit 10.'); + if (!self::isValidClassAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1202,9 +1228,9 @@ abstract class Assert static::assertThat( $className, new LogicalNot( - new ClassHasAttribute($attributeName) + new ClassHasAttribute($attributeName), ), - $message + $message, ); } @@ -1214,9 +1240,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertClassHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { + self::createWarning('assertClassHasStaticAttribute() is deprecated and will be removed in PHPUnit 10.'); + if (!self::isValidClassAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1228,7 +1258,7 @@ abstract class Assert static::assertThat( $className, new ClassHasStaticAttribute($attributeName), - $message + $message, ); } @@ -1238,9 +1268,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = ''): void { + self::createWarning('assertClassNotHasStaticAttribute() is deprecated and will be removed in PHPUnit 10.'); + if (!self::isValidClassAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1252,9 +1286,9 @@ abstract class Assert static::assertThat( $className, new LogicalNot( - new ClassHasStaticAttribute($attributeName) + new ClassHasStaticAttribute($attributeName), ), - $message + $message, ); } @@ -1266,9 +1300,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertObjectHasAttribute(string $attributeName, $object, string $message = ''): void { + self::createWarning('assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() instead.'); + if (!self::isValidObjectAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1280,7 +1318,7 @@ abstract class Assert static::assertThat( $object, new ObjectHasAttribute($attributeName), - $message + $message, ); } @@ -1292,9 +1330,13 @@ abstract class Assert * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception * @throws ExpectationFailedException + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ public static function assertObjectNotHasAttribute(string $attributeName, $object, string $message = ''): void { + self::createWarning('assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectNotHasProperty() instead.'); + if (!self::isValidObjectAttributeName($attributeName)) { throw InvalidArgumentException::create(1, 'valid attribute name'); } @@ -1306,9 +1348,39 @@ abstract class Assert static::assertThat( $object, new LogicalNot( - new ObjectHasAttribute($attributeName) + new ObjectHasAttribute($attributeName), ), - $message + $message, + ); + } + + /** + * Asserts that an object has a specified property. + * + * @throws ExpectationFailedException + */ + final public static function assertObjectHasProperty(string $propertyName, object $object, string $message = ''): void + { + static::assertThat( + $object, + new ObjectHasProperty($propertyName), + $message, + ); + } + + /** + * Asserts that an object does not have a specified property. + * + * @throws ExpectationFailedException + */ + final public static function assertObjectNotHasProperty(string $propertyName, object $object, string $message = ''): void + { + static::assertThat( + $object, + new LogicalNot( + new ObjectHasProperty($propertyName), + ), + $message, ); } @@ -1321,7 +1393,9 @@ abstract class Assert * @throws ExpectationFailedException * * @psalm-template ExpectedType + * * @psalm-param ExpectedType $expected + * * @psalm-assert =ExpectedType $actual */ public static function assertSame($expected, $actual, string $message = ''): void @@ -1329,7 +1403,7 @@ abstract class Assert static::assertThat( $actual, new IsIdentical($expected), - $message + $message, ); } @@ -1350,9 +1424,9 @@ abstract class Assert static::assertThat( $actual, new LogicalNot( - new IsIdentical($expected) + new IsIdentical($expected), ), - $message + $message, ); } @@ -1364,7 +1438,9 @@ abstract class Assert * @throws ExpectationFailedException * * @psalm-template ExpectedType of object + * * @psalm-param class-string $expected + * * @psalm-assert =ExpectedType $actual */ public static function assertInstanceOf(string $expected, $actual, string $message = ''): void @@ -1376,7 +1452,7 @@ abstract class Assert static::assertThat( $actual, new IsInstanceOf($expected), - $message + $message, ); } @@ -1388,7 +1464,9 @@ abstract class Assert * @throws ExpectationFailedException * * @psalm-template ExpectedType of object + * * @psalm-param class-string $expected + * * @psalm-assert !ExpectedType $actual */ public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void @@ -1400,9 +1478,9 @@ abstract class Assert static::assertThat( $actual, new LogicalNot( - new IsInstanceOf($expected) + new IsInstanceOf($expected), ), - $message + $message, ); } @@ -1419,7 +1497,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_ARRAY), - $message + $message, ); } @@ -1436,7 +1514,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_BOOL), - $message + $message, ); } @@ -1453,7 +1531,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_FLOAT), - $message + $message, ); } @@ -1470,7 +1548,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_INT), - $message + $message, ); } @@ -1487,7 +1565,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_NUMERIC), - $message + $message, ); } @@ -1504,7 +1582,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_OBJECT), - $message + $message, ); } @@ -1521,7 +1599,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_RESOURCE), - $message + $message, ); } @@ -1538,7 +1616,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_CLOSED_RESOURCE), - $message + $message, ); } @@ -1555,7 +1633,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_STRING), - $message + $message, ); } @@ -1572,7 +1650,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_SCALAR), - $message + $message, ); } @@ -1589,7 +1667,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_CALLABLE), - $message + $message, ); } @@ -1606,7 +1684,7 @@ abstract class Assert static::assertThat( $actual, new IsType(IsType::TYPE_ITERABLE), - $message + $message, ); } @@ -1623,7 +1701,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_ARRAY)), - $message + $message, ); } @@ -1640,7 +1718,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_BOOL)), - $message + $message, ); } @@ -1657,7 +1735,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_FLOAT)), - $message + $message, ); } @@ -1674,7 +1752,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_INT)), - $message + $message, ); } @@ -1691,7 +1769,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_NUMERIC)), - $message + $message, ); } @@ -1708,7 +1786,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_OBJECT)), - $message + $message, ); } @@ -1725,7 +1803,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_RESOURCE)), - $message + $message, ); } @@ -1742,7 +1820,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_CLOSED_RESOURCE)), - $message + $message, ); } @@ -1759,7 +1837,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_STRING)), - $message + $message, ); } @@ -1776,7 +1854,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_SCALAR)), - $message + $message, ); } @@ -1793,7 +1871,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_CALLABLE)), - $message + $message, ); } @@ -1810,7 +1888,7 @@ abstract class Assert static::assertThat( $actual, new LogicalNot(new IsType(IsType::TYPE_ITERABLE)), - $message + $message, ); } @@ -1853,9 +1931,9 @@ abstract class Assert static::assertThat( $string, new LogicalNot( - new RegularExpression($pattern) + new RegularExpression($pattern), ), - $message + $message, ); } @@ -1876,9 +1954,9 @@ abstract class Assert static::assertThat( $string, new LogicalNot( - new RegularExpression($pattern) + new RegularExpression($pattern), ), - $message + $message, ); } @@ -1895,6 +1973,14 @@ abstract class Assert */ public static function assertSameSize($expected, $actual, string $message = ''): void { + if ($expected instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $expected parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + + if ($actual instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $actual parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + if (!$expected instanceof Countable && !is_iterable($expected)) { throw InvalidArgumentException::create(1, 'countable or iterable'); } @@ -1906,7 +1992,7 @@ abstract class Assert static::assertThat( $actual, new SameSize($expected), - $message + $message, ); } @@ -1923,6 +2009,14 @@ abstract class Assert */ public static function assertNotSameSize($expected, $actual, string $message = ''): void { + if ($expected instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $expected parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + + if ($actual instanceof Generator) { + self::createWarning('Passing an argument of type Generator for the $actual parameter is deprecated. Support for this will be removed in PHPUnit 10.'); + } + if (!$expected instanceof Countable && !is_iterable($expected)) { throw InvalidArgumentException::create(1, 'countable or iterable'); } @@ -1934,9 +2028,9 @@ abstract class Assert static::assertThat( $actual, new LogicalNot( - new SameSize($expected) + new SameSize($expected), ), - $message + $message, ); } @@ -1962,9 +2056,9 @@ abstract class Assert static::assertThat( $string, new LogicalNot( - new StringMatchesFormatDescription($format) + new StringMatchesFormatDescription($format), ), - $message + $message, ); } @@ -1981,9 +2075,9 @@ abstract class Assert static::assertThat( $string, new StringMatchesFormatDescription( - file_get_contents($formatFile) + file_get_contents($formatFile), ), - $message + $message, ); } @@ -2001,10 +2095,10 @@ abstract class Assert $string, new LogicalNot( new StringMatchesFormatDescription( - file_get_contents($formatFile) - ) + file_get_contents($formatFile), + ), ), - $message + $message, ); } @@ -2033,9 +2127,9 @@ abstract class Assert static::assertThat( $string, new LogicalNot( - new StringStartsWith($prefix) + new StringStartsWith($prefix), ), - $message + $message, ); } @@ -2105,9 +2199,9 @@ abstract class Assert static::assertThat( $string, new LogicalNot( - new StringEndsWith($suffix) + new StringEndsWith($suffix), ), - $message + $message, ); } @@ -2146,9 +2240,9 @@ abstract class Assert * * @param DOMDocument|string $actualXml * - * @throws \PHPUnit\Util\Xml\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws Xml\Exception */ public static function assertXmlStringEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { @@ -2170,9 +2264,9 @@ abstract class Assert * * @param DOMDocument|string $actualXml * - * @throws \PHPUnit\Util\Xml\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws Xml\Exception */ public static function assertXmlStringNotEqualsXmlFile(string $expectedFile, $actualXml, string $message = ''): void { @@ -2195,9 +2289,9 @@ abstract class Assert * @param DOMDocument|string $expectedXml * @param DOMDocument|string $actualXml * - * @throws \PHPUnit\Util\Xml\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws Xml\Exception */ public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { @@ -2226,9 +2320,9 @@ abstract class Assert * @param DOMDocument|string $expectedXml * @param DOMDocument|string $actualXml * - * @throws \PHPUnit\Util\Xml\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws Xml\Exception */ public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, string $message = ''): void { @@ -2272,7 +2366,7 @@ abstract class Assert static::assertSame( $expectedElement->tagName, $actualElement->tagName, - $message + $message, ); if ($checkAttributes) { @@ -2283,8 +2377,8 @@ abstract class Assert '%s%sNumber of attributes on node "%s" does not match', $message, !empty($message) ? "\n" : '', - $expectedElement->tagName - ) + $expectedElement->tagName, + ), ); for ($i = 0; $i < $expectedElement->attributes->length; $i++) { @@ -2300,8 +2394,8 @@ abstract class Assert $message, !empty($message) ? "\n" : '', $expectedAttribute->name, - $expectedElement->tagName - ) + $expectedElement->tagName, + ), ); } } @@ -2317,8 +2411,8 @@ abstract class Assert '%s%sNumber of child nodes of "%s" differs', $message, !empty($message) ? "\n" : '', - $expectedElement->tagName - ) + $expectedElement->tagName, + ), ); for ($i = 0; $i < $expectedElement->childNodes->length; $i++) { @@ -2326,7 +2420,7 @@ abstract class Assert $expectedElement->childNodes->item($i), $actualElement->childNodes->item($i), $checkAttributes, - $message + $message, ); } } @@ -2386,9 +2480,9 @@ abstract class Assert static::assertThat( $actualJson, new LogicalNot( - new JsonMatches($expectedJson) + new JsonMatches($expectedJson), ), - $message + $message, ); } @@ -2426,9 +2520,9 @@ abstract class Assert static::assertThat( $actualJson, new LogicalNot( - new JsonMatches($expectedJson) + new JsonMatches($expectedJson), ), - $message + $message, ); } @@ -2450,7 +2544,7 @@ abstract class Assert static::assertJson($actualJson, $message); $constraintExpected = new JsonMatches( - $expectedJson + $expectedJson, ); $constraintActual = new JsonMatches($actualJson); @@ -2477,7 +2571,7 @@ abstract class Assert static::assertJson($actualJson, $message); $constraintExpected = new JsonMatches( - $expectedJson + $expectedJson, ); $constraintActual = new JsonMatches($actualJson); @@ -2658,22 +2752,37 @@ abstract class Assert { return static::logicalOr( new IsEqual($value), - new GreaterThan($value) + new GreaterThan($value), ); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ public static function classHasAttribute(string $attributeName): ClassHasAttribute { + self::createWarning('classHasAttribute() is deprecated and will be removed in PHPUnit 10.'); + return new ClassHasAttribute($attributeName); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ public static function classHasStaticAttribute(string $attributeName): ClassHasStaticAttribute { + self::createWarning('classHasStaticAttribute() is deprecated and will be removed in PHPUnit 10.'); + return new ClassHasStaticAttribute($attributeName); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 + */ public static function objectHasAttribute($attributeName): ObjectHasAttribute { + self::createWarning('objectHasAttribute() is deprecated and will be removed in PHPUnit 10.'); + return new ObjectHasAttribute($attributeName); } @@ -2701,7 +2810,7 @@ abstract class Assert { return static::logicalOr( new IsEqual($value), - new LessThan($value) + new LessThan($value), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php index 7c4831d0..5b6cc850 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php @@ -10,6 +10,7 @@ namespace PHPUnit\Framework; use function func_get_args; +use function function_exists; use ArrayAccess; use Countable; use DOMDocument; @@ -69,6 +70,7 @@ use PHPUnit\Framework\MockObject\Stub\ReturnCallback as ReturnCallbackStub; use PHPUnit\Framework\MockObject\Stub\ReturnSelf as ReturnSelfStub; use PHPUnit\Framework\MockObject\Stub\ReturnStub; use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Throwable; if (!function_exists('PHPUnit\Framework\assertArrayHasKey')) { @@ -79,7 +81,7 @@ if (!function_exists('PHPUnit\Framework\assertArrayHasKey')) { * @param array|ArrayAccess $array * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -100,7 +102,7 @@ if (!function_exists('PHPUnit\Framework\assertArrayNotHasKey')) { * @param array|ArrayAccess $array * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -118,7 +120,7 @@ if (!function_exists('PHPUnit\Framework\assertContains')) { * Asserts that a haystack contains a needle. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -143,7 +145,7 @@ if (!function_exists('PHPUnit\Framework\assertNotContains')) { * Asserts that a haystack does not contain a needle. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -168,7 +170,7 @@ if (!function_exists('PHPUnit\Framework\assertContainsOnly')) { * Asserts that a haystack contains only values of a given type. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -185,7 +187,7 @@ if (!function_exists('PHPUnit\Framework\assertContainsOnlyInstancesOf')) { * Asserts that a haystack contains only instances of a given class name. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -202,7 +204,7 @@ if (!function_exists('PHPUnit\Framework\assertNotContainsOnly')) { * Asserts that a haystack does not contain only values of a given type. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -221,7 +223,7 @@ if (!function_exists('PHPUnit\Framework\assertCount')) { * @param Countable|iterable $haystack * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -241,7 +243,7 @@ if (!function_exists('PHPUnit\Framework\assertNotCount')) { * @param Countable|iterable $haystack * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -259,7 +261,7 @@ if (!function_exists('PHPUnit\Framework\assertEquals')) { * Asserts that two variables are equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -276,7 +278,7 @@ if (!function_exists('PHPUnit\Framework\assertEqualsCanonicalizing')) { * Asserts that two variables are equal (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -293,7 +295,7 @@ if (!function_exists('PHPUnit\Framework\assertEqualsIgnoringCase')) { * Asserts that two variables are equal (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -310,7 +312,7 @@ if (!function_exists('PHPUnit\Framework\assertEqualsWithDelta')) { * Asserts that two variables are equal (with delta). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -327,7 +329,7 @@ if (!function_exists('PHPUnit\Framework\assertNotEquals')) { * Asserts that two variables are not equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -344,7 +346,7 @@ if (!function_exists('PHPUnit\Framework\assertNotEqualsCanonicalizing')) { * Asserts that two variables are not equal (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -361,7 +363,7 @@ if (!function_exists('PHPUnit\Framework\assertNotEqualsIgnoringCase')) { * Asserts that two variables are not equal (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -378,7 +380,7 @@ if (!function_exists('PHPUnit\Framework\assertNotEqualsWithDelta')) { * Asserts that two variables are not equal (with delta). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -409,7 +411,7 @@ if (!function_exists('PHPUnit\Framework\assertEmpty')) { * Asserts that a variable is empty. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert empty $actual * @@ -428,7 +430,7 @@ if (!function_exists('PHPUnit\Framework\assertNotEmpty')) { * Asserts that a variable is not empty. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !empty $actual * @@ -447,7 +449,7 @@ if (!function_exists('PHPUnit\Framework\assertGreaterThan')) { * Asserts that a value is greater than another value. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -464,7 +466,7 @@ if (!function_exists('PHPUnit\Framework\assertGreaterThanOrEqual')) { * Asserts that a value is greater than or equal to another value. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -481,7 +483,7 @@ if (!function_exists('PHPUnit\Framework\assertLessThan')) { * Asserts that a value is smaller than another value. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -498,7 +500,7 @@ if (!function_exists('PHPUnit\Framework\assertLessThanOrEqual')) { * Asserts that a value is smaller than or equal to another value. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -516,7 +518,7 @@ if (!function_exists('PHPUnit\Framework\assertFileEquals')) { * file. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -534,7 +536,7 @@ if (!function_exists('PHPUnit\Framework\assertFileEqualsCanonicalizing')) { * file (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -552,7 +554,7 @@ if (!function_exists('PHPUnit\Framework\assertFileEqualsIgnoringCase')) { * file (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -570,7 +572,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotEquals')) { * another file. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -588,7 +590,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotEqualsCanonicalizing')) { * file (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -606,7 +608,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotEqualsIgnoringCase')) { * file (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -624,7 +626,7 @@ if (!function_exists('PHPUnit\Framework\assertStringEqualsFile')) { * to the contents of a file. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -642,7 +644,7 @@ if (!function_exists('PHPUnit\Framework\assertStringEqualsFileCanonicalizing')) * to the contents of a file (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -660,7 +662,7 @@ if (!function_exists('PHPUnit\Framework\assertStringEqualsFileIgnoringCase')) { * to the contents of a file (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -678,7 +680,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFile')) { * to the contents of a file. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -696,7 +698,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileCanonicalizing' * to the contents of a file (canonicalizing). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -714,7 +716,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotEqualsFileIgnoringCase')) * to the contents of a file (ignoring case). * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -731,7 +733,7 @@ if (!function_exists('PHPUnit\Framework\assertIsReadable')) { * Asserts that a file/dir is readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -748,7 +750,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotReadable')) { * Asserts that a file/dir exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -765,7 +767,7 @@ if (!function_exists('PHPUnit\Framework\assertNotIsReadable')) { * Asserts that a file/dir exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -786,7 +788,7 @@ if (!function_exists('PHPUnit\Framework\assertIsWritable')) { * Asserts that a file/dir exists and is writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -803,7 +805,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotWritable')) { * Asserts that a file/dir exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -820,7 +822,7 @@ if (!function_exists('PHPUnit\Framework\assertNotIsWritable')) { * Asserts that a file/dir exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -841,7 +843,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryExists')) { * Asserts that a directory exists. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -858,7 +860,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryDoesNotExist')) { * Asserts that a directory does not exist. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -875,7 +877,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryNotExists')) { * Asserts that a directory does not exist. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -896,7 +898,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryIsReadable')) { * Asserts that a directory exists and is readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -913,7 +915,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotReadable')) { * Asserts that a directory exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -930,7 +932,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryNotIsReadable')) { * Asserts that a directory exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -951,7 +953,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryIsWritable')) { * Asserts that a directory exists and is writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -968,7 +970,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryIsNotWritable')) { * Asserts that a directory exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -985,7 +987,7 @@ if (!function_exists('PHPUnit\Framework\assertDirectoryNotIsWritable')) { * Asserts that a directory exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -1006,7 +1008,7 @@ if (!function_exists('PHPUnit\Framework\assertFileExists')) { * Asserts that a file exists. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1023,7 +1025,7 @@ if (!function_exists('PHPUnit\Framework\assertFileDoesNotExist')) { * Asserts that a file does not exist. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1040,7 +1042,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotExists')) { * Asserts that a file does not exist. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -1061,7 +1063,7 @@ if (!function_exists('PHPUnit\Framework\assertFileIsReadable')) { * Asserts that a file exists and is readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1078,7 +1080,7 @@ if (!function_exists('PHPUnit\Framework\assertFileIsNotReadable')) { * Asserts that a file exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1095,7 +1097,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotIsReadable')) { * Asserts that a file exists and is not readable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -1116,7 +1118,7 @@ if (!function_exists('PHPUnit\Framework\assertFileIsWritable')) { * Asserts that a file exists and is writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1133,7 +1135,7 @@ if (!function_exists('PHPUnit\Framework\assertFileIsNotWritable')) { * Asserts that a file exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1150,7 +1152,7 @@ if (!function_exists('PHPUnit\Framework\assertFileNotIsWritable')) { * Asserts that a file exists and is not writable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -1171,7 +1173,7 @@ if (!function_exists('PHPUnit\Framework\assertTrue')) { * Asserts that a condition is true. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert true $condition * @@ -1190,7 +1192,7 @@ if (!function_exists('PHPUnit\Framework\assertNotTrue')) { * Asserts that a condition is not true. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !true $condition * @@ -1209,7 +1211,7 @@ if (!function_exists('PHPUnit\Framework\assertFalse')) { * Asserts that a condition is false. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert false $condition * @@ -1228,7 +1230,7 @@ if (!function_exists('PHPUnit\Framework\assertNotFalse')) { * Asserts that a condition is not false. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !false $condition * @@ -1247,7 +1249,7 @@ if (!function_exists('PHPUnit\Framework\assertNull')) { * Asserts that a variable is null. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert null $actual * @@ -1266,7 +1268,7 @@ if (!function_exists('PHPUnit\Framework\assertNotNull')) { * Asserts that a variable is not null. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !null $actual * @@ -1285,7 +1287,7 @@ if (!function_exists('PHPUnit\Framework\assertFinite')) { * Asserts that a variable is finite. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1302,7 +1304,7 @@ if (!function_exists('PHPUnit\Framework\assertInfinite')) { * Asserts that a variable is infinite. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1319,7 +1321,7 @@ if (!function_exists('PHPUnit\Framework\assertNan')) { * Asserts that a variable is nan. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1336,7 +1338,7 @@ if (!function_exists('PHPUnit\Framework\assertClassHasAttribute')) { * Asserts that a class has a specified attribute. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1354,7 +1356,7 @@ if (!function_exists('PHPUnit\Framework\assertClassNotHasAttribute')) { * Asserts that a class does not have a specified attribute. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1372,7 +1374,7 @@ if (!function_exists('PHPUnit\Framework\assertClassHasStaticAttribute')) { * Asserts that a class has a specified static attribute. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1390,7 +1392,7 @@ if (!function_exists('PHPUnit\Framework\assertClassNotHasStaticAttribute')) { * Asserts that a class does not have a specified static attribute. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1410,7 +1412,7 @@ if (!function_exists('PHPUnit\Framework\assertObjectHasAttribute')) { * @param object $object * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1430,7 +1432,7 @@ if (!function_exists('PHPUnit\Framework\assertObjectNotHasAttribute')) { * @param object $object * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1443,6 +1445,42 @@ if (!function_exists('PHPUnit\Framework\assertObjectNotHasAttribute')) { } } +if (!function_exists('PHPUnit\Framework\assertObjectHasProperty')) { + /** + * Asserts that an object has a specified property. + * + * @throws ExpectationFailedException + * @throws InvalidArgumentException + * @throws Exception + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertObjectHasProperty + */ + function assertObjectHasProperty(string $attributeName, object $object, string $message = ''): void + { + Assert::assertObjectHasProperty(...func_get_args()); + } +} + +if (!function_exists('PHPUnit\Framework\assertObjectNotHasProperty')) { + /** + * Asserts that an object does not have a specified property. + * + * @throws ExpectationFailedException + * @throws InvalidArgumentException + * @throws Exception + * + * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @see Assert::assertObjectNotHasProperty + */ + function assertObjectNotHasProperty(string $attributeName, object $object, string $message = ''): void + { + Assert::assertObjectNotHasProperty(...func_get_args()); + } +} + if (!function_exists('PHPUnit\Framework\assertSame')) { /** * Asserts that two variables have the same type and value. @@ -1450,10 +1488,12 @@ if (!function_exists('PHPUnit\Framework\assertSame')) { * the same object. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-template ExpectedType + * * @psalm-param ExpectedType $expected + * * @psalm-assert =ExpectedType $actual * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1473,7 +1513,7 @@ if (!function_exists('PHPUnit\Framework\assertNotSame')) { * the same object. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -1490,11 +1530,13 @@ if (!function_exists('PHPUnit\Framework\assertInstanceOf')) { * Asserts that a variable is of a given type. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @psalm-template ExpectedType of object + * * @psalm-param class-string $expected + * * @psalm-assert =ExpectedType $actual * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1512,11 +1554,13 @@ if (!function_exists('PHPUnit\Framework\assertNotInstanceOf')) { * Asserts that a variable is not of a given type. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @psalm-template ExpectedType of object + * * @psalm-param class-string $expected + * * @psalm-assert !ExpectedType $actual * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -1534,7 +1578,7 @@ if (!function_exists('PHPUnit\Framework\assertIsArray')) { * Asserts that a variable is of type array. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert array $actual * @@ -1553,7 +1597,7 @@ if (!function_exists('PHPUnit\Framework\assertIsBool')) { * Asserts that a variable is of type bool. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert bool $actual * @@ -1572,7 +1616,7 @@ if (!function_exists('PHPUnit\Framework\assertIsFloat')) { * Asserts that a variable is of type float. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert float $actual * @@ -1591,7 +1635,7 @@ if (!function_exists('PHPUnit\Framework\assertIsInt')) { * Asserts that a variable is of type int. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert int $actual * @@ -1610,7 +1654,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNumeric')) { * Asserts that a variable is of type numeric. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert numeric $actual * @@ -1629,7 +1673,7 @@ if (!function_exists('PHPUnit\Framework\assertIsObject')) { * Asserts that a variable is of type object. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert object $actual * @@ -1648,7 +1692,7 @@ if (!function_exists('PHPUnit\Framework\assertIsResource')) { * Asserts that a variable is of type resource. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert resource $actual * @@ -1667,7 +1711,7 @@ if (!function_exists('PHPUnit\Framework\assertIsClosedResource')) { * Asserts that a variable is of type resource and is closed. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert resource $actual * @@ -1686,7 +1730,7 @@ if (!function_exists('PHPUnit\Framework\assertIsString')) { * Asserts that a variable is of type string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert string $actual * @@ -1705,7 +1749,7 @@ if (!function_exists('PHPUnit\Framework\assertIsScalar')) { * Asserts that a variable is of type scalar. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert scalar $actual * @@ -1724,7 +1768,7 @@ if (!function_exists('PHPUnit\Framework\assertIsCallable')) { * Asserts that a variable is of type callable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert callable $actual * @@ -1743,7 +1787,7 @@ if (!function_exists('PHPUnit\Framework\assertIsIterable')) { * Asserts that a variable is of type iterable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert iterable $actual * @@ -1762,7 +1806,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotArray')) { * Asserts that a variable is not of type array. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !array $actual * @@ -1781,7 +1825,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotBool')) { * Asserts that a variable is not of type bool. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !bool $actual * @@ -1800,7 +1844,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotFloat')) { * Asserts that a variable is not of type float. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !float $actual * @@ -1819,7 +1863,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotInt')) { * Asserts that a variable is not of type int. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !int $actual * @@ -1838,7 +1882,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotNumeric')) { * Asserts that a variable is not of type numeric. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !numeric $actual * @@ -1857,7 +1901,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotObject')) { * Asserts that a variable is not of type object. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !object $actual * @@ -1876,7 +1920,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotResource')) { * Asserts that a variable is not of type resource. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !resource $actual * @@ -1895,7 +1939,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotClosedResource')) { * Asserts that a variable is not of type resource. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !resource $actual * @@ -1914,7 +1958,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotString')) { * Asserts that a variable is not of type string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !string $actual * @@ -1933,7 +1977,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotScalar')) { * Asserts that a variable is not of type scalar. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !scalar $actual * @@ -1952,7 +1996,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotCallable')) { * Asserts that a variable is not of type callable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !callable $actual * @@ -1971,7 +2015,7 @@ if (!function_exists('PHPUnit\Framework\assertIsNotIterable')) { * Asserts that a variable is not of type iterable. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @psalm-assert !iterable $actual * @@ -1990,7 +2034,7 @@ if (!function_exists('PHPUnit\Framework\assertMatchesRegularExpression')) { * Asserts that a string matches a given regular expression. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2007,7 +2051,7 @@ if (!function_exists('PHPUnit\Framework\assertRegExp')) { * Asserts that a string matches a given regular expression. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -2028,7 +2072,7 @@ if (!function_exists('PHPUnit\Framework\assertDoesNotMatchRegularExpression')) { * Asserts that a string does not match a given regular expression. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2045,7 +2089,7 @@ if (!function_exists('PHPUnit\Framework\assertNotRegExp')) { * Asserts that a string does not match a given regular expression. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -2070,7 +2114,7 @@ if (!function_exists('PHPUnit\Framework\assertSameSize')) { * @param Countable|iterable $actual * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2092,7 +2136,7 @@ if (!function_exists('PHPUnit\Framework\assertNotSameSize')) { * @param Countable|iterable $actual * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2110,7 +2154,7 @@ if (!function_exists('PHPUnit\Framework\assertStringMatchesFormat')) { * Asserts that a string matches a given format string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2127,7 +2171,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormat')) { * Asserts that a string does not match a given format string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2144,7 +2188,7 @@ if (!function_exists('PHPUnit\Framework\assertStringMatchesFormatFile')) { * Asserts that a string matches a given format file. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2161,7 +2205,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotMatchesFormatFile')) { * Asserts that a string does not match a given format string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2178,7 +2222,7 @@ if (!function_exists('PHPUnit\Framework\assertStringStartsWith')) { * Asserts that a string starts with a given prefix. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2198,7 +2242,7 @@ if (!function_exists('PHPUnit\Framework\assertStringStartsNotWith')) { * @param string $string * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2213,7 +2257,7 @@ if (!function_exists('PHPUnit\Framework\assertStringStartsNotWith')) { if (!function_exists('PHPUnit\Framework\assertStringContainsString')) { /** * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2228,7 +2272,7 @@ if (!function_exists('PHPUnit\Framework\assertStringContainsString')) { if (!function_exists('PHPUnit\Framework\assertStringContainsStringIgnoringCase')) { /** * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2243,7 +2287,7 @@ if (!function_exists('PHPUnit\Framework\assertStringContainsStringIgnoringCase') if (!function_exists('PHPUnit\Framework\assertStringNotContainsString')) { /** * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2258,7 +2302,7 @@ if (!function_exists('PHPUnit\Framework\assertStringNotContainsString')) { if (!function_exists('PHPUnit\Framework\assertStringNotContainsStringIgnoringCase')) { /** * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2275,7 +2319,7 @@ if (!function_exists('PHPUnit\Framework\assertStringEndsWith')) { * Asserts that a string ends with a given suffix. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2292,7 +2336,7 @@ if (!function_exists('PHPUnit\Framework\assertStringEndsNotWith')) { * Asserts that a string ends not with a given suffix. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2309,7 +2353,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlFileEqualsXmlFile')) { * Asserts that two XML files are equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2327,7 +2371,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlFileNotEqualsXmlFile')) { * Asserts that two XML files are not equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws \PHPUnit\Util\Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2347,7 +2391,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlFile')) { * @param DOMDocument|string $actualXml * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws \PHPUnit\Util\Xml\Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2367,7 +2411,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlFile')) { * @param DOMDocument|string $actualXml * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws \PHPUnit\Util\Xml\Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2388,7 +2432,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlStringEqualsXmlString')) { * @param DOMDocument|string $actualXml * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws \PHPUnit\Util\Xml\Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2409,7 +2453,7 @@ if (!function_exists('PHPUnit\Framework\assertXmlStringNotEqualsXmlString')) { * @param DOMDocument|string $actualXml * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws \PHPUnit\Util\Xml\Exception * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -2428,7 +2472,7 @@ if (!function_exists('PHPUnit\Framework\assertEqualXMLStructure')) { * * @throws AssertionFailedError * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @codeCoverageIgnore * @@ -2449,7 +2493,7 @@ if (!function_exists('PHPUnit\Framework\assertThat')) { * Evaluates a PHPUnit\Framework\Constraint matcher object. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2466,7 +2510,7 @@ if (!function_exists('PHPUnit\Framework\assertJson')) { * Asserts that a string is a valid JSON string. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2483,7 +2527,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonString')) { * Asserts that two given JSON encoded objects or arrays are equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2503,7 +2547,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonString')) { * @param string $actualJson * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2520,7 +2564,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonStringEqualsJsonFile')) { * Asserts that the generated JSON encoded object and the content of the given file are equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2537,7 +2581,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonStringNotEqualsJsonFile')) { * Asserts that the generated JSON encoded object and the content of the given file are not equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2554,7 +2598,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonFileEqualsJsonFile')) { * Asserts that two JSON files are equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2571,7 +2615,7 @@ if (!function_exists('PHPUnit\Framework\assertJsonFileNotEqualsJsonFile')) { * Asserts that two JSON files are not equal. * * @throws ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * @@ -2920,7 +2964,7 @@ if (!function_exists('PHPUnit\Framework\atLeast')) { function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher { return new InvokedAtLeastCountMatcher( - $requiredInvocations + $requiredInvocations, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php index 8e27fbfd..ff04a698 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php @@ -40,7 +40,7 @@ class Count extends Constraint { return sprintf( 'count matches %d', - $this->expectedCount + $this->expectedCount, ); } @@ -76,7 +76,7 @@ class Count extends Constraint throw new Exception( $e->getMessage(), $e->getCode(), - $e + $e, ); } } @@ -136,7 +136,7 @@ class Count extends Constraint return sprintf( 'actual size %d matches expected size %d', (int) $this->getCountOf($other), - $this->expectedCount + $this->expectedCount, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php index 31df5020..7d079f50 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\Constraint; +use SebastianBergmann\RecursionContext\InvalidArgumentException; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -30,7 +32,7 @@ final class GreaterThan extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php index e6371d53..ee01e93d 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php @@ -64,7 +64,7 @@ final class IsEmpty extends Constraint '%s %s %s', strpos($type, 'a') === 0 || strpos($type, 'o') === 0 ? 'an' : 'a', $type, - $this->toString() + $this->toString(), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php index c7884ba1..4d0184a2 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\Constraint; +use SebastianBergmann\RecursionContext\InvalidArgumentException; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -30,7 +32,7 @@ final class LessThan extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php index f4fab056..2ee73973 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php @@ -15,6 +15,7 @@ use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\SelfDescribing; use SebastianBergmann\Comparator\ComparisonFailure; use SebastianBergmann\Exporter\Exporter; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -36,8 +37,8 @@ abstract class Constraint implements Countable, SelfDescribing * a boolean value instead: true in case of success, false in case of a * failure. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { @@ -82,6 +83,7 @@ abstract class Constraint implements Countable, SelfDescribing * This method can be overridden to implement the evaluation algorithm. * * @param mixed $other value or object to evaluate + * * @codeCoverageIgnore */ protected function matches($other): bool @@ -92,20 +94,19 @@ abstract class Constraint implements Countable, SelfDescribing /** * Throws an exception for the given compared value and test description. * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * @param ComparisonFailure $comparisonFailure + * @param mixed $other evaluated value or object + * @param string $description Additional information about the test * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException * * @psalm-return never-return */ - protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void + protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): void { $failureDescription = sprintf( 'Failed asserting that %s.', - $this->failureDescription($other) + $this->failureDescription($other), ); $additionalFailureDescription = $this->additionalFailureDescription($other); @@ -120,7 +121,7 @@ abstract class Constraint implements Countable, SelfDescribing throw new ExpectationFailedException( $failureDescription, - $comparisonFailure + $comparisonFailure, ); } @@ -148,7 +149,7 @@ abstract class Constraint implements Countable, SelfDescribing * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php index 6a61ebfb..04bfe4e8 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php @@ -16,6 +16,7 @@ use function trim; use PHPUnit\Framework\ExpectationFailedException; use SebastianBergmann\Comparator\ComparisonFailure; use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -61,8 +62,6 @@ final class IsEqual extends Constraint * failure. * * @throws ExpectationFailedException - * - * @return bool */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { @@ -78,7 +77,7 @@ final class IsEqual extends Constraint try { $comparator = $comparatorFactory->getComparatorFor( $this->value, - $other + $other, ); $comparator->assertEquals( @@ -86,7 +85,7 @@ final class IsEqual extends Constraint $other, $this->delta, $this->canonicalize, - $this->ignoreCase + $this->ignoreCase, ); } catch (ComparisonFailure $f) { if ($returnResult) { @@ -95,7 +94,7 @@ final class IsEqual extends Constraint throw new ExpectationFailedException( trim($description . "\n" . $f->getMessage()), - $f + $f, ); } @@ -105,7 +104,7 @@ final class IsEqual extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -118,21 +117,21 @@ final class IsEqual extends Constraint return sprintf( "is equal to '%s'", - $this->value + $this->value, ); } if ($this->delta != 0) { $delta = sprintf( ' with delta <%F>', - $this->delta + $this->delta, ); } return sprintf( 'is equal to %s%s', $this->exporter()->export($this->value), - $delta + $delta, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php index 57bb91ca..6d49c350 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php @@ -16,6 +16,7 @@ use function trim; use PHPUnit\Framework\ExpectationFailedException; use SebastianBergmann\Comparator\ComparisonFailure; use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -58,7 +59,7 @@ final class IsEqualCanonicalizing extends Constraint try { $comparator = $comparatorFactory->getComparatorFor( $this->value, - $other + $other, ); $comparator->assertEquals( @@ -66,7 +67,7 @@ final class IsEqualCanonicalizing extends Constraint $other, 0.0, true, - false + false, ); } catch (ComparisonFailure $f) { if ($returnResult) { @@ -75,7 +76,7 @@ final class IsEqualCanonicalizing extends Constraint throw new ExpectationFailedException( trim($description . "\n" . $f->getMessage()), - $f + $f, ); } @@ -85,7 +86,7 @@ final class IsEqualCanonicalizing extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -96,13 +97,13 @@ final class IsEqualCanonicalizing extends Constraint return sprintf( "is equal to '%s'", - $this->value + $this->value, ); } return sprintf( 'is equal to %s', - $this->exporter()->export($this->value) + $this->exporter()->export($this->value), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php index d657e96a..932b7318 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php @@ -16,6 +16,7 @@ use function trim; use PHPUnit\Framework\ExpectationFailedException; use SebastianBergmann\Comparator\ComparisonFailure; use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -58,7 +59,7 @@ final class IsEqualIgnoringCase extends Constraint try { $comparator = $comparatorFactory->getComparatorFor( $this->value, - $other + $other, ); $comparator->assertEquals( @@ -66,7 +67,7 @@ final class IsEqualIgnoringCase extends Constraint $other, 0.0, false, - true + true, ); } catch (ComparisonFailure $f) { if ($returnResult) { @@ -75,7 +76,7 @@ final class IsEqualIgnoringCase extends Constraint throw new ExpectationFailedException( trim($description . "\n" . $f->getMessage()), - $f + $f, ); } @@ -85,7 +86,7 @@ final class IsEqualIgnoringCase extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -96,13 +97,13 @@ final class IsEqualIgnoringCase extends Constraint return sprintf( "is equal to '%s'", - $this->value + $this->value, ); } return sprintf( 'is equal to %s', - $this->exporter()->export($this->value) + $this->exporter()->export($this->value), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php index 0370b511..0a04ffc8 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php @@ -14,6 +14,7 @@ use function trim; use PHPUnit\Framework\ExpectationFailedException; use SebastianBergmann\Comparator\ComparisonFailure; use SebastianBergmann\Comparator\Factory as ComparatorFactory; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -62,13 +63,13 @@ final class IsEqualWithDelta extends Constraint try { $comparator = $comparatorFactory->getComparatorFor( $this->value, - $other + $other, ); $comparator->assertEquals( $this->value, $other, - $this->delta + $this->delta, ); } catch (ComparisonFailure $f) { if ($returnResult) { @@ -77,7 +78,7 @@ final class IsEqualWithDelta extends Constraint throw new ExpectationFailedException( trim($description . "\n" . $f->getMessage()), - $f + $f, ); } @@ -87,14 +88,14 @@ final class IsEqualWithDelta extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { return sprintf( - 'is equal to %s with delta <%F>>', + 'is equal to %s with delta <%F>', $this->exporter()->export($this->value), - $this->delta + $this->delta, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php index 860c0030..bbaab4af 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php @@ -36,7 +36,7 @@ final class Exception extends Constraint { return sprintf( 'exception of type "%s"', - $this->className + $this->className, ); } @@ -73,13 +73,13 @@ final class Exception extends Constraint 'exception of type "%s" matches expected exception "%s"%s', get_class($other), $this->className, - $message + $message, ); } return sprintf( 'exception of type "%s" is thrown', - $this->className + $this->className, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php index b8054a94..4d65e03b 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php @@ -10,6 +10,7 @@ namespace PHPUnit\Framework\Constraint; use function sprintf; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Throwable; /** @@ -54,14 +55,14 @@ final class ExceptionCode extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { return sprintf( '%s is equal to expected exception code %s', $this->exporter()->export($other->getCode()), - $this->exporter()->export($this->expectedCode) + $this->exporter()->export($this->expectedCode), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php index 030beff9..5139e720 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php @@ -65,14 +65,14 @@ final class ExceptionMessage extends Constraint if ($this->expectedMessage === '') { return sprintf( "exception message is empty but is '%s'", - $other->getMessage() + $other->getMessage(), ); } return sprintf( "exception message '%s' contains '%s'", $other->getMessage(), - $this->expectedMessage + $this->expectedMessage, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php index fd0db1c8..bc737709 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php @@ -48,7 +48,7 @@ final class ExceptionMessageRegularExpression extends Constraint if ($match === false) { throw new \PHPUnit\Framework\Exception( - "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" + "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'", ); } @@ -68,7 +68,7 @@ final class ExceptionMessageRegularExpression extends Constraint return sprintf( "exception message '%s' matches '%s'", $other->getMessage(), - $this->expectedMessageRegExp + $this->expectedMessageRegExp, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php index ef4b2baf..24268c7d 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php @@ -48,7 +48,7 @@ final class DirectoryExists extends Constraint { return sprintf( 'directory "%s" exists', - $other + $other, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php index 41b3136e..6cae9502 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php @@ -48,7 +48,7 @@ final class FileExists extends Constraint { return sprintf( 'file "%s" exists', - $other + $other, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php index e33d7e04..12436938 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php @@ -48,7 +48,7 @@ final class IsReadable extends Constraint { return sprintf( '"%s" is readable', - $other + $other, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php index 93981224..8da02076 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php @@ -48,7 +48,7 @@ final class IsWritable extends Constraint { return sprintf( '"%s" is writable', - $other + $other, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php index 565f1a3a..9eb44a99 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php @@ -9,18 +9,14 @@ */ namespace PHPUnit\Framework\Constraint; -use const PHP_FLOAT_EPSILON; -use function abs; use function get_class; use function is_array; -use function is_float; -use function is_infinite; -use function is_nan; use function is_object; use function is_string; use function sprintf; use PHPUnit\Framework\ExpectationFailedException; use SebastianBergmann\Comparator\ComparisonFailure; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -47,18 +43,12 @@ final class IsIdentical extends Constraint * a boolean value instead: true in case of success, false in case of a * failure. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { - if (is_float($this->value) && is_float($other) && - !is_infinite($this->value) && !is_infinite($other) && - !is_nan($this->value) && !is_nan($other)) { - $success = abs($this->value - $other) < PHP_FLOAT_EPSILON; - } else { - $success = $this->value === $other; - } + $success = $this->value === $other; if ($returnResult) { return $success; @@ -73,7 +63,7 @@ final class IsIdentical extends Constraint $this->value, $other, sprintf("'%s'", $this->value), - sprintf("'%s'", $other) + sprintf("'%s'", $other), ); } @@ -83,7 +73,7 @@ final class IsIdentical extends Constraint $this->value, $other, $this->exporter()->export($this->value), - $this->exporter()->export($other) + $this->exporter()->export($other), ); } @@ -96,7 +86,7 @@ final class IsIdentical extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -116,7 +106,7 @@ final class IsIdentical extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php index 23a4de7e..6fbd38c3 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php @@ -11,9 +11,11 @@ namespace PHPUnit\Framework\Constraint; use function json_decode; use function sprintf; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Util\Json; use SebastianBergmann\Comparator\ComparisonFailure; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -37,7 +39,7 @@ final class JsonMatches extends Constraint { return sprintf( 'matches JSON string "%s"', - $this->value + $this->value, ); } @@ -69,17 +71,16 @@ final class JsonMatches extends Constraint /** * Throws an exception for the given compared value and test description. * - * @param mixed $other evaluated value or object - * @param string $description Additional information about the test - * @param ComparisonFailure $comparisonFailure + * @param mixed $other evaluated value or object + * @param string $description Additional information about the test * - * @throws \PHPUnit\Framework\Exception - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws Exception * @throws ExpectationFailedException + * @throws InvalidArgumentException * * @psalm-return never-return */ - protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void + protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): void { if ($comparisonFailure === null) { [$error, $recodedOther] = Json::canonicalize($other); @@ -100,7 +101,7 @@ final class JsonMatches extends Constraint Json::prettify($recodedValue), Json::prettify($recodedOther), false, - 'Failed asserting that two json values are equal.' + 'Failed asserting that two json values are equal.', ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php index 8ded556c..4bf19e27 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php @@ -30,14 +30,19 @@ final class JsonMatchesErrorMessageProvider switch ($error) { case JSON_ERROR_NONE: return null; + case JSON_ERROR_DEPTH: return $prefix . 'Maximum stack depth exceeded'; + case JSON_ERROR_STATE_MISMATCH: return $prefix . 'Underflow or the modes mismatch'; + case JSON_ERROR_CTRL_CHAR: return $prefix . 'Unexpected control character found'; + case JSON_ERROR_SYNTAX: return $prefix . 'Syntax error, malformed JSON'; + case JSON_ERROR_UTF8: return $prefix . 'Malformed UTF-8 characters, possibly incorrectly encoded'; @@ -56,6 +61,7 @@ final class JsonMatchesErrorMessageProvider $prefix = 'Expected value JSON decode error - '; break; + case 'actual': $prefix = 'Actual value JSON decode error - '; diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php index daa14027..40e1d614 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php @@ -18,6 +18,8 @@ use ReflectionException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ class ClassHasAttribute extends Constraint { @@ -38,7 +40,7 @@ class ClassHasAttribute extends Constraint { return sprintf( 'has attribute "%s"', - $this->attributeName + $this->attributeName, ); } @@ -56,8 +58,8 @@ class ClassHasAttribute extends Constraint } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -77,7 +79,7 @@ class ClassHasAttribute extends Constraint '%sclass "%s" %s', is_object($other) ? 'object of ' : '', is_object($other) ? get_class($other) : $other, - $this->toString() + $this->toString(), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php index cacd0d75..bd5eefe4 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php @@ -16,6 +16,8 @@ use ReflectionException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ final class ClassHasStaticAttribute extends ClassHasAttribute { @@ -26,7 +28,7 @@ final class ClassHasStaticAttribute extends ClassHasAttribute { return sprintf( 'has static attribute "%s"', - $this->attributeName() + $this->attributeName(), ); } @@ -48,8 +50,8 @@ final class ClassHasStaticAttribute extends ClassHasAttribute } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php index 30f3a330..b837b4cd 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php @@ -65,7 +65,7 @@ final class ObjectEquals extends Constraint if (!$object->hasMethod($this->method)) { throw new ComparisonMethodDoesNotExistException( get_class($other), - $this->method + $this->method, ); } @@ -75,7 +75,7 @@ final class ObjectEquals extends Constraint if (!$method->hasReturnType()) { throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( get_class($other), - $this->method + $this->method, ); } @@ -84,28 +84,28 @@ final class ObjectEquals extends Constraint if (!$returnType instanceof ReflectionNamedType) { throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( get_class($other), - $this->method + $this->method, ); } if ($returnType->allowsNull()) { throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( get_class($other), - $this->method + $this->method, ); } if ($returnType->getName() !== 'bool') { throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException( get_class($other), - $this->method + $this->method, ); } if ($method->getNumberOfParameters() !== 1 || $method->getNumberOfRequiredParameters() !== 1) { throw new ComparisonMethodDoesNotDeclareExactlyOneParameterException( get_class($other), - $this->method + $this->method, ); } @@ -114,7 +114,7 @@ final class ObjectEquals extends Constraint if (!$parameter->hasType()) { throw new ComparisonMethodDoesNotDeclareParameterTypeException( get_class($other), - $this->method + $this->method, ); } @@ -123,7 +123,7 @@ final class ObjectEquals extends Constraint if (!$type instanceof ReflectionNamedType) { throw new ComparisonMethodDoesNotDeclareParameterTypeException( get_class($other), - $this->method + $this->method, ); } @@ -137,7 +137,7 @@ final class ObjectEquals extends Constraint throw new ComparisonMethodDoesNotAcceptParameterTypeException( get_class($other), $this->method, - get_class($this->expected) + get_class($this->expected), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php index 5fbc0888..602cb05d 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php @@ -13,6 +13,8 @@ use ReflectionObject; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4601 */ final class ObjectHasAttribute extends ClassHasAttribute { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php index 7560ce2a..586abc50 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php @@ -50,10 +50,17 @@ final class LogicalNot extends UnaryOperator preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); - $positives = array_map(static function (string $s) - { - return '/\\b' . preg_quote($s, '/') . '/'; - }, $positives); + if (count($matches) === 0) { + preg_match('/(\'[\w\W]*\')([\w\W]*)(\'[\w\W]*\')/i', $string, $matches); + } + + $positives = array_map( + static function (string $s) + { + return '/\\b' . preg_quote($s, '/') . '/'; + }, + $positives, + ); if (count($matches) > 0) { $nonInput = $matches[2]; @@ -63,15 +70,15 @@ final class LogicalNot extends UnaryOperator preg_replace( $positives, $negatives, - $nonInput + $nonInput, ), - $string + $string, ); } else { $negatedString = preg_replace( $positives, $negatives, - $string + $string, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php index fbdb479b..ee1b1c29 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php @@ -57,7 +57,7 @@ final class LogicalXor extends BinaryOperator { return $matches xor $constraint->evaluate($other, '', true); }, - $initial->evaluate($other, '', true) + $initial->evaluate($other, '', true), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php index 0a7a5fa2..3f5357be 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php @@ -11,6 +11,8 @@ namespace PHPUnit\Framework\Constraint; use function count; +use SebastianBergmann\RecursionContext\InvalidArgumentException; + /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ @@ -79,7 +81,7 @@ abstract class UnaryOperator extends Operator * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php index 97b29461..08aeaaf9 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php @@ -10,8 +10,10 @@ namespace PHPUnit\Framework\Constraint; use function json_decode; + use function json_last_error; use function sprintf; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -55,7 +57,7 @@ final class IsJson extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { @@ -65,13 +67,13 @@ final class IsJson extends Constraint json_decode($other); $error = (string) JsonMatchesErrorMessageProvider::determineJsonError( - (string) json_last_error() + (string) json_last_error(), ); return sprintf( '%s is valid JSON (%s)', $this->exporter()->shortenedExport($other), - $error + $error, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php index 8e609e79..9ccfb9bd 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php @@ -34,7 +34,7 @@ class RegularExpression extends Constraint { return sprintf( 'matches PCRE pattern "%s"', - $this->pattern + $this->pattern, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php index 6279f37b..5aa2c8e5 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php @@ -48,7 +48,7 @@ final class StringContains extends Constraint return sprintf( 'contains "%s"', - $string + $string, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php index c4f7324e..9c01ecb9 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php @@ -33,8 +33,8 @@ final class StringMatchesFormatDescription extends RegularExpression { parent::__construct( $this->createPatternFromFormat( - $this->convertNewlines($string) - ) + $this->convertNewlines($string), + ), ); $this->string = $string; @@ -49,7 +49,7 @@ final class StringMatchesFormatDescription extends RegularExpression protected function matches($other): bool { return parent::matches( - $this->convertNewlines($other) + $this->convertNewlines($other), ); } @@ -96,7 +96,7 @@ final class StringMatchesFormatDescription extends RegularExpression '%x' => '[0-9a-fA-F]+', '%f' => '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', '%c' => '.', - ] + ], ); return '/^' . $string . '$/s'; diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php index 089545c1..8683e272 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use function strlen; use function strpos; use PHPUnit\Framework\InvalidArgumentException; @@ -25,7 +24,7 @@ final class StringStartsWith extends Constraint public function __construct(string $prefix) { - if (strlen($prefix) === 0) { + if ($prefix === '') { throw InvalidArgumentException::create(1, 'non-empty string'); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php index 44cada3a..98a757a7 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php @@ -12,6 +12,7 @@ namespace PHPUnit\Framework\Constraint; use function array_key_exists; use function is_array; use ArrayAccess; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -34,7 +35,7 @@ final class ArrayHasKey extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -68,7 +69,7 @@ final class ArrayHasKey extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php index 39660a98..829aab41 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php @@ -10,7 +10,9 @@ namespace PHPUnit\Framework\Constraint; use function is_array; + use function sprintf; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -30,7 +32,7 @@ abstract class TraversableContains extends Constraint /** * Returns a string representation of the constraint. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { @@ -45,14 +47,14 @@ abstract class TraversableContains extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { return sprintf( '%s %s', is_array($other) ? 'an array' : 'a traversable', - $this->toString() + $this->toString(), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php index cf4a46b4..4f34f72a 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php @@ -9,7 +9,9 @@ */ namespace PHPUnit\Framework\Constraint; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Traversable; /** @@ -28,7 +30,7 @@ final class TraversableContainsOnly extends Constraint private $type; /** - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct(string $type, bool $isNativeType = true) { @@ -36,7 +38,7 @@ final class TraversableContainsOnly extends Constraint $this->constraint = new IsType($type); } else { $this->constraint = new IsInstanceOf( - $type + $type, ); } @@ -55,8 +57,8 @@ final class TraversableContainsOnly extends Constraint * * @param mixed|Traversable $other * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function evaluate($other, string $description = '', bool $returnResult = false): ?bool { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php index f0fa02b9..c1b73a83 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php @@ -12,6 +12,7 @@ namespace PHPUnit\Framework\Constraint; use function sprintf; use ReflectionClass; use ReflectionException; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -36,7 +37,7 @@ final class IsInstanceOf extends Constraint return sprintf( 'is instance of %s "%s"', $this->getType(), - $this->className + $this->className, ); } @@ -59,7 +60,7 @@ final class IsInstanceOf extends Constraint * * @param mixed $other evaluated value or object * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function failureDescription($other): string { @@ -67,7 +68,7 @@ final class IsInstanceOf extends Constraint '%s is an instance of %s "%s"', $this->exporter()->shortenedExport($other), $this->getType(), - $this->className + $this->className, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php index 5bc691d7..5a968a30 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php @@ -10,6 +10,7 @@ namespace PHPUnit\Framework\Constraint; use function gettype; + use function is_array; use function is_bool; use function is_callable; @@ -21,6 +22,7 @@ use function is_object; use function is_scalar; use function is_string; use function sprintf; +use PHPUnit\Framework\Exception; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -121,17 +123,17 @@ final class IsType extends Constraint private $type; /** - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct(string $type) { if (!isset(self::KNOWN_TYPES[$type])) { - throw new \PHPUnit\Framework\Exception( + throw new Exception( sprintf( 'Type specified for PHPUnit\Framework\Constraint\IsType <%s> ' . 'is not a valid type.', - $type - ) + $type, + ), ); } @@ -145,7 +147,7 @@ final class IsType extends Constraint { return sprintf( 'is of type "%s"', - $this->type + $this->type, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php b/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php index 18b54999..4d7ab859 100644 --- a/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php +++ b/vendor/phpunit/phpunit/src/Framework/DataProviderTestSuite.php @@ -11,6 +11,7 @@ namespace PHPUnit\Framework; use function explode; use PHPUnit\Util\Test as TestUtil; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -64,7 +65,7 @@ final class DataProviderTestSuite extends TestSuite /** * Returns the size of the each test created using the data provider(s). * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function getSize(): int { diff --git a/vendor/phpunit/phpunit/src/Framework/Error/Error.php b/vendor/phpunit/phpunit/src/Framework/Error/Error.php index 2990b360..3163a867 100644 --- a/vendor/phpunit/phpunit/src/Framework/Error/Error.php +++ b/vendor/phpunit/phpunit/src/Framework/Error/Error.php @@ -16,7 +16,7 @@ use PHPUnit\Framework\Exception; */ class Error extends Exception { - public function __construct(string $message, int $code, string $file, int $line, \Exception $previous = null) + public function __construct(string $message, int $code, string $file, int $line, ?\Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php b/vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php index 841247d7..245f0336 100644 --- a/vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/ErrorTestCase.php @@ -15,17 +15,17 @@ namespace PHPUnit\Framework; final class ErrorTestCase extends TestCase { /** - * @var bool + * @var ?bool */ protected $backupGlobals = false; /** - * @var bool + * @var ?bool */ protected $backupStaticAttributes = false; /** - * @var bool + * @var ?bool */ protected $runTestInSeparateProcess = false; diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php index adae2829..4364788c 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php @@ -21,7 +21,7 @@ final class ActualValueIsNotAnObjectException extends Exception parent::__construct( 'Actual value is not an object', 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php index ebd68f34..0c2c1afe 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php @@ -24,10 +24,10 @@ final class ComparisonMethodDoesNotAcceptParameterTypeException extends Exceptio '%s is not an accepted argument type for comparison method %s::%s().', $type, $className, - $methodName + $methodName, ), 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php index 20189cde..4eb9a2fd 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php @@ -23,10 +23,10 @@ final class ComparisonMethodDoesNotDeclareBoolReturnTypeException extends Except sprintf( 'Comparison method %s::%s() does not declare bool return type.', $className, - $methodName + $methodName, ), 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php index bd09d87c..e8cd9787 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php @@ -23,10 +23,10 @@ final class ComparisonMethodDoesNotDeclareExactlyOneParameterException extends E sprintf( 'Comparison method %s::%s() does not declare exactly one parameter.', $className, - $methodName + $methodName, ), 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php index 9bbb112e..68616ba1 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php @@ -23,10 +23,10 @@ final class ComparisonMethodDoesNotDeclareParameterTypeException extends Excepti sprintf( 'Parameter of comparison method %s::%s() does not have a declared type.', $className, - $methodName + $methodName, ), 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php index ad0e2d08..0f1adcbc 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php @@ -23,10 +23,10 @@ final class ComparisonMethodDoesNotExistException extends Exception sprintf( 'Comparison method %s::%s() does not exist.', $className, - $methodName + $methodName, ), 0, - null + null, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php b/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php index 0b21e6de..3ed04927 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/Exception.php @@ -44,7 +44,7 @@ class Exception extends RuntimeException implements \PHPUnit\Exception */ protected $serializableTrace; - public function __construct($message = '', $code = 0, Throwable $previous = null) + public function __construct($message = '', $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php b/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php index b9a595a8..a81d7535 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php @@ -28,7 +28,7 @@ final class ExpectationFailedException extends AssertionFailedError */ protected $comparisonFailure; - public function __construct(string $message, ComparisonFailure $comparisonFailure = null, Exception $previous = null) + public function __construct(string $message, ?ComparisonFailure $comparisonFailure = null, ?Exception $previous = null) { $this->comparisonFailure = $comparisonFailure; diff --git a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php index 77f58079..4181b320 100644 --- a/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php +++ b/vendor/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php @@ -34,12 +34,12 @@ final class InvalidArgumentException extends Exception $argument, $function, in_array(lcfirst($type)[0], ['a', 'e', 'i', 'o', 'u'], true) ? 'an' : 'a', - $type - ) + $type, + ), ); } - private function __construct(string $message = '', int $code = 0, \Exception $previous = null) + private function __construct(string $message = '', int $code = 0, ?\Exception $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php b/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php index d1ff4abc..d30e90b2 100644 --- a/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php +++ b/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php @@ -9,11 +9,13 @@ */ namespace PHPUnit\Framework; +use const PHP_VERSION_ID; use function array_keys; use function get_class; use function spl_object_hash; use PHPUnit\Util\Filter; use Throwable; +use WeakReference; /** * Wraps Exceptions thrown by code under test. @@ -38,6 +40,11 @@ final class ExceptionWrapper extends Exception */ protected $previous; + /** + * @var null|WeakReference + */ + private $originalException; + public function __construct(Throwable $t) { // PDOException::getCode() is a string. @@ -107,16 +114,25 @@ final class ExceptionWrapper extends Exception * * Approach works both for var_dump() and var_export() and print_r(). */ - private function originalException(Throwable $exceptionToStore = null): ?Throwable + private function originalException(?Throwable $exceptionToStore = null): ?Throwable { - static $originalExceptions; + // drop once PHP 7.3 support is removed + if (PHP_VERSION_ID < 70400) { + static $originalExceptions; - $instanceId = spl_object_hash($this); + $instanceId = spl_object_hash($this); - if ($exceptionToStore) { - $originalExceptions[$instanceId] = $exceptionToStore; + if ($exceptionToStore) { + $originalExceptions[$instanceId] = $exceptionToStore; + } + + return $originalExceptions[$instanceId] ?? null; } - return $originalExceptions[$instanceId] ?? null; + if ($exceptionToStore) { + $this->originalException = WeakReference::create($exceptionToStore); + } + + return $this->originalException !== null ? $this->originalException->get() : null; } } diff --git a/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php b/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php index 09c343c1..89ecc5e2 100644 --- a/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php +++ b/vendor/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php @@ -77,8 +77,8 @@ final class ExecutionOrderDependency static function (self $d) { return $d->isValid(); - } - ) + }, + ), ); } @@ -95,7 +95,7 @@ final class ExecutionOrderDependency { return $dependency->getTarget(); }, - $existing + $existing, ); foreach ($additional as $dependency) { @@ -132,7 +132,7 @@ final class ExecutionOrderDependency { return $dependency->getTarget(); }, - $right + $right, ); foreach ($left as $dependency) { diff --git a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php b/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php index ee1e3e9f..8da56794 100644 --- a/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php @@ -9,23 +9,25 @@ */ namespace PHPUnit\Framework; +use SebastianBergmann\RecursionContext\InvalidArgumentException; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class IncompleteTestCase extends TestCase { /** - * @var bool + * @var ?bool */ protected $backupGlobals = false; /** - * @var bool + * @var ?bool */ protected $backupStaticAttributes = false; /** - * @var bool + * @var ?bool */ protected $runTestInSeparateProcess = false; @@ -49,7 +51,7 @@ final class IncompleteTestCase extends TestCase /** * Returns a string representation of the test case. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php index e2f0a280..56e6b69b 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Api.php @@ -42,7 +42,7 @@ trait Api { if (isset(static::$__phpunit_configurableMethods)) { throw new ConfigurableMethodsAlreadyInitializedException( - 'Configurable methods is already initialized and can not be reinitialized' + 'Configurable methods is already initialized and can not be reinitialized', ); } @@ -67,7 +67,7 @@ trait Api if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new InvocationHandler( static::$__phpunit_configurableMethods, - $this->__phpunit_returnValueGeneration + $this->__phpunit_returnValueGeneration, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php index f6df7533..f8be3808 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Api/Method.php @@ -24,7 +24,7 @@ trait Method return call_user_func_array( [$expects, 'method'], - func_get_args() + func_get_args(), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php index 89b1e31a..b23e5e38 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php @@ -16,6 +16,7 @@ use function in_array; use function is_string; use function strtolower; use PHPUnit\Framework\Constraint\Constraint; +use PHPUnit\Framework\InvalidArgumentException; use PHPUnit\Framework\MockObject\ConfigurableMethod; use PHPUnit\Framework\MockObject\IncompatibleReturnValueException; use PHPUnit\Framework\MockObject\InvocationHandler; @@ -194,6 +195,8 @@ final class InvocationMocker implements InvocationStubber, MethodNameMatch * @throws MethodParametersAlreadyConfiguredException * * @return $this + * + * @deprecated */ public function withConsecutive(...$arguments): self { @@ -222,7 +225,7 @@ final class InvocationMocker implements InvocationStubber, MethodNameMatch /** * @param Constraint|string $constraint * - * @throws \PHPUnit\Framework\InvalidArgumentException + * @throws InvalidArgumentException * @throws MethodCannotBeConfiguredException * @throws MethodNameAlreadyConfiguredException * @@ -239,7 +242,7 @@ final class InvocationMocker implements InvocationStubber, MethodNameMatch { return strtolower($configurable->getName()); }, - $this->configurableMethods + $this->configurableMethods, ); if (is_string($constraint) && !in_array(strtolower($constraint), $configurableMethodNames, true)) { @@ -298,7 +301,7 @@ final class InvocationMocker implements InvocationStubber, MethodNameMatch if (!$configuredMethod->mayReturn($value)) { throw new IncompatibleReturnValueException( $configuredMethod, - $value + $value, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php index f32ff0e7..1756cfc0 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php @@ -20,46 +20,46 @@ interface InvocationStubber public function will(Stub $stub): Identity; /** @return self */ - public function willReturn($value, ...$nextValues)/*: self */; + public function willReturn($value, ...$nextValues)/* : self */; /** * @param mixed $reference * * @return self */ - public function willReturnReference(&$reference)/*: self */; + public function willReturnReference(&$reference)/* : self */; /** * @param array> $valueMap * * @return self */ - public function willReturnMap(array $valueMap)/*: self */; + public function willReturnMap(array $valueMap)/* : self */; /** * @param int $argumentIndex * * @return self */ - public function willReturnArgument($argumentIndex)/*: self */; + public function willReturnArgument($argumentIndex)/* : self */; /** * @param callable $callback * * @return self */ - public function willReturnCallback($callback)/*: self */; + public function willReturnCallback($callback)/* : self */; /** @return self */ - public function willReturnSelf()/*: self */; + public function willReturnSelf()/* : self */; /** * @param mixed $values * * @return self */ - public function willReturnOnConsecutiveCalls(...$values)/*: self */; + public function willReturnOnConsecutiveCalls(...$values)/* : self */; /** @return self */ - public function willThrowException(Throwable $exception)/*: self */; + public function willThrowException(Throwable $exception)/* : self */; } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php index 543d596c..a71caf79 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\MockObject\Builder; +use PHPUnit\Framework\Constraint\Constraint; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -18,7 +20,7 @@ interface MethodNameMatch extends ParametersMatch * Adds a new method name match and returns the parameter match object for * further matching possibilities. * - * @param \PHPUnit\Framework\Constraint\Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual + * @param Constraint $constraint Constraint for matching method, if a string is passed it will use the PHPUnit_Framework_Constraint_IsEqual * * @return ParametersMatch */ diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php index 0698870b..848746b5 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php @@ -22,8 +22,8 @@ final class CannotUseAddMethodsException extends \PHPUnit\Framework\Exception im sprintf( 'Trying to configure method "%s" with addMethods(), but it exists in class "%s". Use onlyMethods() for methods that exist in the class', $methodName, - $type - ) + $type, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php index 35a29b73..0efcd02a 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php @@ -22,8 +22,8 @@ final class CannotUseOnlyMethodsException extends \PHPUnit\Framework\Exception i sprintf( 'Trying to configure method "%s" with onlyMethods(), but it does not exist in class "%s". Use addMethods() for methods that do not exist in the class', $methodName, - $type - ) + $type, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php index 0ba9a187..8c9c0a52 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php @@ -21,8 +21,8 @@ final class ClassAlreadyExistsException extends \PHPUnit\Framework\Exception imp parent::__construct( sprintf( 'Class "%s" already exists', - $className - ) + $className, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php index e648f026..2bce2d88 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php @@ -21,8 +21,8 @@ final class ClassIsFinalException extends \PHPUnit\Framework\Exception implement parent::__construct( sprintf( 'Class "%s" is declared "final" and cannot be doubled', - $className - ) + $className, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php index 864523ac..f96a04ac 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\MockObject; +use function array_diff_assoc; +use function array_unique; +use function implode; use function sprintf; /** @@ -25,8 +28,8 @@ final class DuplicateMethodException extends \PHPUnit\Framework\Exception implem sprintf( 'Cannot double using a method list that contains duplicates: "%s" (duplicate: "%s")', implode(', ', $methods), - implode(', ', array_unique(array_diff_assoc($methods, array_unique($methods)))) - ) + implode(', ', array_unique(array_diff_assoc($methods, array_unique($methods)))), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php index 00febaf5..1ca8e9c9 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php @@ -9,6 +9,9 @@ */ namespace PHPUnit\Framework\MockObject; +use function get_class; +use function gettype; +use function is_object; use function sprintf; /** @@ -26,8 +29,8 @@ final class IncompatibleReturnValueException extends \PHPUnit\Framework\Exceptio 'Method %s may not return value of type %s, its declared return type is "%s"', $method->getName(), is_object($value) ? get_class($value) : gettype($value), - $method->getReturnTypeDeclaration() - ) + $method->getReturnTypeDeclaration(), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php index d2444cf1..0ab74cbb 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php @@ -21,8 +21,8 @@ final class InvalidMethodNameException extends \PHPUnit\Framework\Exception impl parent::__construct( sprintf( 'Cannot double method with invalid name "%s"', - $method - ) + $method, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php index c05b2bce..f2e1a31e 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php @@ -21,8 +21,8 @@ final class MatchBuilderNotFoundException extends \PHPUnit\Framework\Exception i parent::__construct( sprintf( 'No builder found for match builder identification <%s>', - $id - ) + $id, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php index efcc13ed..0972ffaf 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php @@ -21,8 +21,8 @@ final class MatcherAlreadyRegisteredException extends \PHPUnit\Framework\Excepti parent::__construct( sprintf( 'Matcher with id <%s> is already registered', - $id - ) + $id, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php index 70729043..2f0bb5a6 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php @@ -21,8 +21,8 @@ final class MethodCannotBeConfiguredException extends \PHPUnit\Framework\Excepti parent::__construct( sprintf( 'Trying to configure method "%s" which cannot be configured because it does not exist, has not been specified, is final, or is static', - $method - ) + $method, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php index 8121e369..2bc4e882 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\MockObject; +use function sprintf; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -20,8 +22,8 @@ final class ReturnValueNotConfiguredException extends \PHPUnit\Framework\Excepti sprintf( 'Return value inference disabled and no expectation set up for %s::%s()', $invocation->getClassName(), - $invocation->getMethodName() - ) + $invocation->getMethodName(), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php index 98837c95..6ec5057a 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php @@ -17,7 +17,7 @@ final class SoapExtensionNotAvailableException extends \PHPUnit\Framework\Except public function __construct() { parent::__construct( - 'The SOAP extension is required to generate a test double from WSDL' + 'The SOAP extension is required to generate a test double from WSDL', ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php index e124f9b1..b08dead0 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php @@ -21,8 +21,8 @@ final class UnknownClassException extends \PHPUnit\Framework\Exception implement parent::__construct( sprintf( 'Class "%s" does not exist', - $className - ) + $className, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php index 90fc8d84..c689dae9 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php @@ -21,8 +21,8 @@ final class UnknownTraitException extends \PHPUnit\Framework\Exception implement parent::__construct( sprintf( 'Trait "%s" does not exist', - $traitName - ) + $traitName, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php index b1a70edd..c50b6911 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php @@ -21,8 +21,8 @@ final class UnknownTypeException extends \PHPUnit\Framework\Exception implements parent::__construct( sprintf( 'Class or interface "%s" does not exist', - $type - ) + $type, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php index ff74cb6b..49211ad7 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator.php @@ -27,6 +27,7 @@ use function interface_exists; use function is_array; use function is_object; use function md5; +use function method_exists; use function mt_rand; use function preg_match; use function preg_match_all; @@ -71,7 +72,6 @@ trait MockedCloneMethodWithVoidReturnType } } EOT; - private const MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT' namespace PHPUnit\Framework\MockObject; @@ -83,7 +83,6 @@ trait MockedCloneMethodWithoutReturnType } } EOT; - private const UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT' namespace PHPUnit\Framework\MockObject; @@ -97,7 +96,6 @@ trait UnmockedCloneMethodWithVoidReturnType } } EOT; - private const UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT' namespace PHPUnit\Framework\MockObject; @@ -143,17 +141,18 @@ EOT; * * @param null|array $methods * - * @throws \PHPUnit\Framework\InvalidArgumentException * @throws ClassAlreadyExistsException * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws DuplicateMethodException + * @throws InvalidArgumentException * @throws InvalidMethodNameException * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException * @throws RuntimeException * @throws UnknownTypeException */ - public function getMock(string $type, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): MockObject + public function getMock(string $type, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $allowMockingUnknownTypes = true, bool $returnValueGeneration = true): MockObject { if (!is_array($methods) && null !== $methods) { throw InvalidArgumentException::create(2, 'array'); @@ -186,8 +185,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -208,7 +207,7 @@ EOT; $callOriginalClone, $callAutoload, $cloneArguments, - $callOriginalMethods + $callOriginalMethods, ); return $this->getObject( @@ -219,7 +218,7 @@ EOT; $arguments, $callOriginalMethods, $proxyTarget, - $returnValueGeneration + $returnValueGeneration, ); } @@ -266,7 +265,7 @@ EOT; $intersectionName = sprintf( 'Intersection_%s_%s', implode('_', $unqualifiedNames), - substr(md5((string) mt_rand()), 0, 8) + substr(md5((string) mt_rand()), 0, 8), ); } while (interface_exists($intersectionName, false)); @@ -276,7 +275,7 @@ EOT; [ 'intersection' => $intersectionName, 'interfaces' => implode(', ', $interfaces), - ] + ], ); eval($template->render()); @@ -291,13 +290,16 @@ EOT; * Concrete methods to mock can be specified with the $mockedMethods parameter. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType * - * @throws \PHPUnit\Framework\InvalidArgumentException * @throws ClassAlreadyExistsException * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws DuplicateMethodException + * @throws InvalidArgumentException * @throws InvalidMethodNameException * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException @@ -305,7 +307,7 @@ EOT; * @throws UnknownClassException * @throws UnknownTypeException */ - public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject + public function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): MockObject { if (class_exists($originalClassName, $callAutoload) || interface_exists($originalClassName, $callAutoload)) { @@ -315,8 +317,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -341,7 +343,7 @@ EOT; $callOriginalConstructor, $callOriginalClone, $callAutoload, - $cloneArguments + $cloneArguments, ); } @@ -355,10 +357,11 @@ EOT; * * @psalm-param trait-string $traitName * - * @throws \PHPUnit\Framework\InvalidArgumentException * @throws ClassAlreadyExistsException * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws DuplicateMethodException + * @throws InvalidArgumentException * @throws InvalidMethodNameException * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException @@ -367,7 +370,7 @@ EOT; * @throws UnknownTraitException * @throws UnknownTypeException */ - public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = null, bool $cloneArguments = true): MockObject + public function getMockForTrait(string $traitName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, ?array $mockedMethods = null, bool $cloneArguments = true): MockObject { if (!trait_exists($traitName, $callAutoload)) { throw new UnknownTraitException($traitName); @@ -376,7 +379,7 @@ EOT; $className = $this->generateClassName( $traitName, '', - 'Trait_' + 'Trait_', ); $classTemplate = $this->getTemplate('trait_class.tpl'); @@ -386,7 +389,7 @@ EOT; 'prologue' => 'abstract ', 'class_name' => $className['className'], 'trait_name' => $traitName, - ] + ], ); $mockTrait = new MockTrait($classTemplate->render(), $className['className']); @@ -413,7 +416,7 @@ EOT; $className = $this->generateClassName( $traitName, $traitClassName, - 'Trait_' + 'Trait_', ); $classTemplate = $this->getTemplate('trait_class.tpl'); @@ -423,27 +426,28 @@ EOT; 'prologue' => '', 'class_name' => $className['className'], 'trait_name' => $traitName, - ] + ], ); return $this->getObject( new MockTrait( $classTemplate->render(), - $className['className'] + $className['className'], ), '', $callOriginalConstructor, $callAutoload, - $arguments + $arguments, ); } /** * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws ReflectionException * @throws RuntimeException */ - public function generate(string $type, array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass + public function generate(string $type, ?array $methods = null, string $mockClassName = '', bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = true, bool $callOriginalMethods = false): MockClass { if ($mockClassName !== '') { return $this->generateMock( @@ -453,7 +457,7 @@ EOT; $callOriginalClone, $callAutoload, $cloneArguments, - $callOriginalMethods + $callOriginalMethods, ); } @@ -462,7 +466,7 @@ EOT; serialize($methods) . serialize($callOriginalClone) . serialize($cloneArguments) . - serialize($callOriginalMethods) + serialize($callOriginalMethods), ); if (!isset(self::$cache[$key])) { @@ -473,7 +477,7 @@ EOT; $callOriginalClone, $callAutoload, $cloneArguments, - $callOriginalMethods + $callOriginalMethods, ); } @@ -499,8 +503,8 @@ EOT; } catch (SoapFault $e) { throw new RuntimeException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } @@ -519,7 +523,7 @@ EOT; if (empty($methods) || in_array($name, $methods, true)) { $args = explode( ',', - str_replace(')', '', substr($method, $nameEnd + 1)) + str_replace(')', '', substr($method, $nameEnd + 1)), ); foreach (range(0, count($args) - 1) as $i) { @@ -536,7 +540,7 @@ EOT; [ 'method_name' => $name, 'arguments' => implode(', ', $args), - ] + ], ); $methodsBuffer .= $methodTemplate->render(); @@ -567,7 +571,7 @@ EOT; 'wsdl' => $wsdlFile, 'options' => $optionsBuffer, 'methods' => $methodsBuffer, - ] + ], ); return $classTemplate->render(); @@ -586,8 +590,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -616,8 +620,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -646,8 +650,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -676,8 +680,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -699,7 +703,7 @@ EOT; * @throws ReflectionException * @throws RuntimeException */ - private function getObject(MockType $mockClass, $type = '', bool $callOriginalConstructor = false, bool $callAutoload = false, array $arguments = [], bool $callOriginalMethods = false, object $proxyTarget = null, bool $returnValueGeneration = true) + private function getObject(MockType $mockClass, $type = '', bool $callOriginalConstructor = false, bool $callAutoload = false, array $arguments = [], bool $callOriginalMethods = false, ?object $proxyTarget = null, bool $returnValueGeneration = true) { $className = $mockClass->generate(); @@ -713,8 +717,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -740,8 +744,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -762,6 +766,7 @@ EOT; /** * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws ReflectionException * @throws RuntimeException */ @@ -779,7 +784,7 @@ EOT; $_mockClassName = $this->generateClassName( $type, $mockClassName, - 'Mock_' + 'Mock_', ); if (class_exists($_mockClassName['fullClassName'], $callAutoload)) { @@ -807,8 +812,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -817,6 +822,10 @@ EOT; throw new ClassIsFinalException($_mockClassName['fullClassName']); } + if (method_exists($class, 'isReadOnly') && $class->isReadOnly()) { + throw new ClassIsReadonlyException($_mockClassName['fullClassName']); + } + // @see https://github.com/sebastianbergmann/phpunit/issues/2995 if ($isInterface && $class->implementsInterface(Throwable::class)) { $actualClassName = Exception::class; @@ -829,8 +838,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -845,8 +854,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -857,14 +866,14 @@ EOT; } $mockMethods->addMethods( - MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments) + MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments), ); } $_mockClassName = $this->generateClassName( $actualClassName, $_mockClassName['className'], - 'Mock_' + 'Mock_', ); } @@ -875,7 +884,7 @@ EOT; $additionalInterfaces[] = Iterator::class; $mockMethods->addMethods( - ...$this->mockClassMethods(Iterator::class, $callOriginalMethods, $cloneArguments) + ...$this->mockClassMethods(Iterator::class, $callOriginalMethods, $cloneArguments), ); } @@ -886,8 +895,8 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -906,13 +915,13 @@ EOT; if ($isClass && $explicitMethods === []) { $mockMethods->addMethods( - ...$this->mockClassMethods($_mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments) + ...$this->mockClassMethods($_mockClassName['fullClassName'], $callOriginalMethods, $cloneArguments), ); } if ($isInterface && ($explicitMethods === [] || $explicitMethods === null)) { $mockMethods->addMethods( - ...$this->mockInterfaceMethods($_mockClassName['fullClassName'], $cloneArguments) + ...$this->mockInterfaceMethods($_mockClassName['fullClassName'], $cloneArguments), ); } @@ -925,15 +934,15 @@ EOT; } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd if ($this->canMockMethod($method)) { $mockMethods->addMethods( - MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments) + MockMethod::fromReflection($method, $callOriginalMethods, $cloneArguments), ); } } else { @@ -941,8 +950,8 @@ EOT; MockMethod::fromName( $_mockClassName['fullClassName'], $methodName, - $cloneArguments - ) + $cloneArguments, + ), ); } } @@ -979,19 +988,19 @@ EOT; 'class_declaration' => $this->generateMockClassDeclaration( $_mockClassName, $isInterface, - $additionalInterfaces + $additionalInterfaces, ), 'clone' => $cloneTrait, 'mock_class_name' => $_mockClassName['className'], 'mocked_methods' => $mockedMethods, 'method' => $method, - ] + ], ); return new MockClass( $classTemplate->render(), $_mockClassName['className'], - $configurable + $configurable, ); } @@ -1038,7 +1047,7 @@ EOT; $buffer .= sprintf( '%s implements %s', $mockClassName['className'], - $interfaces + $interfaces, ); if (!in_array($mockClassName['originalClassName'], $additionalInterfaces, true)) { @@ -1056,7 +1065,7 @@ EOT; $mockClassName['className'], !empty($mockClassName['namespaceName']) ? $mockClassName['namespaceName'] . '\\' : '', $mockClassName['originalClassName'], - $interfaces + $interfaces, ); } @@ -1086,8 +1095,8 @@ EOT; } catch (TemplateException $e) { throw new RuntimeException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php index 0166c58c..ed8c4e92 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Invocation.php @@ -13,6 +13,8 @@ use function array_map; use function explode; use function get_class; use function implode; +use function in_array; +use function interface_exists; use function is_object; use function sprintf; use function strpos; @@ -20,7 +22,7 @@ use function strtolower; use function substr; use Doctrine\Instantiator\Instantiator; use PHPUnit\Framework\SelfDescribing; -use PHPUnit\Util\Type; +use PHPUnit\Util\Cloner; use SebastianBergmann\Exporter\Exporter; use stdClass; use Throwable; @@ -90,7 +92,7 @@ final class Invocation implements SelfDescribing foreach ($this->parameters as $key => $value) { if (is_object($value)) { - $this->parameters[$key] = $this->cloneObject($value); + $this->parameters[$key] = Cloner::clone($value); } } } @@ -121,12 +123,17 @@ final class Invocation implements SelfDescribing return null; } - $intersection = false; - $union = false; + $intersection = false; + $union = false; + $unionContainsIntersections = false; if (strpos($this->returnType, '|') !== false) { $types = explode('|', $this->returnType); $union = true; + + if (strpos($this->returnType, '(') !== false) { + $unionContainsIntersections = true; + } } elseif (strpos($this->returnType, '&') !== false) { $types = explode('&', $this->returnType); $intersection = true; @@ -136,7 +143,7 @@ final class Invocation implements SelfDescribing $types = array_map('strtolower', $types); - if (!$intersection) { + if (!$intersection && !$unionContainsIntersections) { if (in_array('', $types, true) || in_array('null', $types, true) || in_array('mixed', $types, true) || @@ -144,6 +151,10 @@ final class Invocation implements SelfDescribing return null; } + if (in_array('true', $types, true)) { + return true; + } + if (in_array('false', $types, true) || in_array('bool', $types, true)) { return false; @@ -172,7 +183,7 @@ final class Invocation implements SelfDescribing throw new RuntimeException( $t->getMessage(), (int) $t->getCode(), - $t + $t, ); } } @@ -210,44 +221,34 @@ final class Invocation implements SelfDescribing throw new RuntimeException( $t->getMessage(), (int) $t->getCode(), - $t + $t, ); } } } + if ($intersection && $this->onlyInterfaces($types)) { + try { + return (new Generator)->getMockForInterfaces($types); + } catch (Throwable $t) { + throw new RuntimeException( + sprintf( + 'Return value for %s::%s() cannot be generated: %s', + $this->className, + $this->methodName, + $t->getMessage(), + ), + (int) $t->getCode(), + ); + } + } + $reason = ''; if ($union) { $reason = ' because the declared return type is a union'; } elseif ($intersection) { $reason = ' because the declared return type is an intersection'; - - $onlyInterfaces = true; - - foreach ($types as $type) { - if (!interface_exists($type)) { - $onlyInterfaces = false; - - break; - } - } - - if ($onlyInterfaces) { - try { - return (new Generator)->getMockForInterfaces($types); - } catch (Throwable $t) { - throw new RuntimeException( - sprintf( - 'Return value for %s::%s() cannot be generated: %s', - $this->className, - $this->methodName, - $t->getMessage(), - ), - (int) $t->getCode(), - ); - } - } } throw new RuntimeException( @@ -255,8 +256,8 @@ final class Invocation implements SelfDescribing 'Return value for %s::%s() cannot be generated%s, please configure a return value for this method', $this->className, $this->methodName, - $reason - ) + $reason, + ), ); } @@ -272,10 +273,10 @@ final class Invocation implements SelfDescribing ', ', array_map( [$exporter, 'shortenedExport'], - $this->parameters - ) + $this->parameters, + ), ), - $this->returnType ? sprintf(': %s', $this->returnType) : '' + $this->returnType ? sprintf(': %s', $this->returnType) : '', ); } @@ -284,12 +285,17 @@ final class Invocation implements SelfDescribing return $this->object; } - private function cloneObject(object $original): object + /** + * @psalm-param non-empty-list $types + */ + private function onlyInterfaces(array $types): bool { - if (Type::isCloneable($original)) { - return clone $original; + foreach ($types as $type) { + if (!interface_exists($type)) { + return false; + } } - return $original; + return true; } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php b/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php index b9d62610..f8ee16e0 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php @@ -102,7 +102,7 @@ final class InvocationHandler return new InvocationMocker( $this, $matcher, - ...$this->configurableMethods + ...$this->configurableMethods, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php index a0f8817b..cc8be058 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Matcher.php @@ -16,11 +16,13 @@ use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\MockObject\Rule\AnyInvokedCount; use PHPUnit\Framework\MockObject\Rule\AnyParameters; use PHPUnit\Framework\MockObject\Rule\InvocationOrder; +use PHPUnit\Framework\MockObject\Rule\InvokedAtMostCount; use PHPUnit\Framework\MockObject\Rule\InvokedCount; use PHPUnit\Framework\MockObject\Rule\MethodName; use PHPUnit\Framework\MockObject\Rule\ParametersRule; use PHPUnit\Framework\MockObject\Stub\Stub; use PHPUnit\Framework\TestFailure; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -116,8 +118,8 @@ final class Matcher if ($this->afterMatchBuilderId !== null) { $matcher = $invocation->getObject() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); + ->__phpunit_getInvocationHandler() + ->lookupMatcher($this->afterMatchBuilderId); if (!$matcher) { throw new MatchBuilderNotFoundException($this->afterMatchBuilderId); @@ -142,9 +144,9 @@ final class Matcher "Expectation failed for %s when %s\n%s", $this->methodNameRule->toString(), $this->invocationRule->toString(), - $e->getMessage() + $e->getMessage(), ), - $e->getComparisonFailure() + $e->getComparisonFailure(), ); } @@ -156,8 +158,8 @@ final class Matcher } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException * @throws MatchBuilderNotFoundException * @throws MethodNameNotConfiguredException * @throws RuntimeException @@ -166,8 +168,8 @@ final class Matcher { if ($this->afterMatchBuilderId !== null) { $matcher = $invocation->getObject() - ->__phpunit_getInvocationHandler() - ->lookupMatcher($this->afterMatchBuilderId); + ->__phpunit_getInvocationHandler() + ->lookupMatcher($this->afterMatchBuilderId); if (!$matcher) { throw new MatchBuilderNotFoundException($this->afterMatchBuilderId); @@ -198,9 +200,9 @@ final class Matcher "Expectation failed for %s when %s\n%s", $this->methodNameRule->toString(), $this->invocationRule->toString(), - $e->getMessage() + $e->getMessage(), ), - $e->getComparisonFailure() + $e->getComparisonFailure(), ); } @@ -208,8 +210,8 @@ final class Matcher } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException * @throws MethodNameNotConfiguredException */ public function verify(): void @@ -225,10 +227,11 @@ final class Matcher $this->parametersRule = new AnyParameters; } - $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; - $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); + $invocationIsAny = $this->invocationRule instanceof AnyInvokedCount; + $invocationIsNever = $this->invocationRule instanceof InvokedCount && $this->invocationRule->isNever(); + $invocationIsAtMost = $this->invocationRule instanceof InvokedAtMostCount; - if (!$invocationIsAny && !$invocationIsNever) { + if (!$invocationIsAny && !$invocationIsNever && !$invocationIsAtMost) { $this->parametersRule->verify(); } } catch (ExpectationFailedException $e) { @@ -237,8 +240,8 @@ final class Matcher "Expectation failed for %s when %s.\n%s", $this->methodNameRule->toString(), $this->invocationRule->toString(), - TestFailure::exceptionToString($e) - ) + TestFailure::exceptionToString($e), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php index 3082ab38..e5c955d3 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php @@ -33,7 +33,7 @@ final class MethodNameConstraint extends Constraint { return sprintf( 'is "%s"', - $this->methodName + $this->methodName, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php index aec32a2d..487ea16a 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php @@ -11,6 +11,8 @@ namespace PHPUnit\Framework\MockObject; use function array_diff; use function array_merge; +use PHPUnit\Framework\Exception; +use PHPUnit\Framework\InvalidArgumentException; use PHPUnit\Framework\TestCase; use ReflectionClass; @@ -111,10 +113,11 @@ final class MockBuilder /** * Creates a mock object using a fluent interface. * - * @throws \PHPUnit\Framework\InvalidArgumentException * @throws ClassAlreadyExistsException * @throws ClassIsFinalException + * @throws ClassIsReadonlyException * @throws DuplicateMethodException + * @throws InvalidArgumentException * @throws InvalidMethodNameException * @throws OriginalConstructorInvocationRequiredException * @throws ReflectionException @@ -137,7 +140,7 @@ final class MockBuilder $this->callOriginalMethods, $this->proxyTarget, $this->allowMockingUnknownTypes, - $this->returnValueGeneration + $this->returnValueGeneration, ); $this->testCase->registerMockObject($object); @@ -150,7 +153,7 @@ final class MockBuilder * * @psalm-return MockObject&MockedType * - * @throws \PHPUnit\Framework\Exception + * @throws Exception * @throws ReflectionException * @throws RuntimeException */ @@ -164,7 +167,7 @@ final class MockBuilder $this->originalClone, $this->autoload, $this->methods, - $this->cloneArguments + $this->cloneArguments, ); $this->testCase->registerMockObject($object); @@ -177,7 +180,7 @@ final class MockBuilder * * @psalm-return MockObject&MockedType * - * @throws \PHPUnit\Framework\Exception + * @throws Exception * @throws ReflectionException * @throws RuntimeException */ @@ -191,7 +194,7 @@ final class MockBuilder $this->originalClone, $this->autoload, $this->methods, - $this->cloneArguments + $this->cloneArguments, ); $this->testCase->registerMockObject($object); @@ -241,8 +244,8 @@ final class MockBuilder } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -283,8 +286,8 @@ final class MockBuilder } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -312,8 +315,8 @@ final class MockBuilder return $this->setMethods( array_diff( $this->generator->getClassMethods($this->type), - $methods - ) + $methods, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php index 253d7846..8f5c276d 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/MockClass.php @@ -55,7 +55,7 @@ final class MockClass implements MockType $this->mockName, '__phpunit_initConfigurableMethods', ], - ...$this->configurableMethods + ...$this->configurableMethods, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php b/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php index d3bd3266..88462dfe 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php @@ -23,11 +23,8 @@ use function substr; use function substr_count; use function trim; use function var_export; -use ReflectionIntersectionType; use ReflectionMethod; -use ReflectionNamedType; use ReflectionParameter; -use ReflectionUnionType; use SebastianBergmann\Template\Exception as TemplateException; use SebastianBergmann\Template\Template; use SebastianBergmann\Type\ReflectionMapper; @@ -143,7 +140,7 @@ final class MockMethod $reference, $callOriginalMethod, $method->isStatic(), - $deprecation + $deprecation, ); } @@ -160,7 +157,7 @@ final class MockMethod '', false, false, - null + null, ); } @@ -194,12 +191,12 @@ final class MockMethod } elseif ($this->returnType->isNever() || $this->returnType->isVoid()) { $templateFile = sprintf( '%s_method_never_or_void.tpl', - $this->callOriginalMethod ? 'proxied' : 'mocked' + $this->callOriginalMethod ? 'proxied' : 'mocked', ); } else { $templateFile = sprintf( '%s_method.tpl', - $this->callOriginalMethod ? 'proxied' : 'mocked' + $this->callOriginalMethod ? 'proxied' : 'mocked', ); } @@ -212,7 +209,7 @@ final class MockMethod $deprecationTemplate->setVar( [ 'deprecation' => var_export($deprecation, true), - ] + ], ); $deprecation = $deprecationTemplate->render(); @@ -233,7 +230,7 @@ final class MockMethod 'reference' => $this->reference, 'clone_arguments' => $this->cloneArguments ? 'true' : 'false', 'deprecation' => $deprecation, - ] + ], ); return $template->render(); @@ -257,8 +254,8 @@ final class MockMethod } catch (TemplateException $e) { throw new RuntimeException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } } @@ -274,6 +271,7 @@ final class MockMethod private static function getMethodParametersForDeclaration(ReflectionMethod $method): string { $parameters = []; + $types = (new ReflectionMapper)->fromParameterTypes($method); foreach ($method->getParameters() as $i => $parameter) { $name = '$' . $parameter->getName(); @@ -285,19 +283,16 @@ final class MockMethod $name = '$arg' . $i; } - $nullable = ''; $default = ''; $reference = ''; $typeDeclaration = ''; - $type = null; - $typeName = null; - if ($parameter->hasType()) { - $type = $parameter->getType(); + if (!$types[$i]->type()->isUnknown()) { + $typeDeclaration = $types[$i]->type()->asString() . ' '; + } - if ($type instanceof ReflectionNamedType) { - $typeName = $type->getName(); - } + if ($parameter->isPassedByReference()) { + $reference = '&'; } if ($parameter->isVariadic()) { @@ -308,30 +303,7 @@ final class MockMethod $default = ' = null'; } - if ($type !== null) { - if ($typeName !== 'mixed' && $parameter->allowsNull() && !$type instanceof ReflectionIntersectionType && !$type instanceof ReflectionUnionType) { - $nullable = '?'; - } - - if ($typeName === 'self') { - $typeDeclaration = $method->getDeclaringClass()->getName() . ' '; - } elseif ($typeName !== null) { - $typeDeclaration = $typeName . ' '; - } elseif ($type instanceof ReflectionUnionType) { - $typeDeclaration = self::unionTypeAsString( - $type, - $method->getDeclaringClass()->getName() - ); - } elseif ($type instanceof ReflectionIntersectionType) { - $typeDeclaration = self::intersectionTypeAsString($type); - } - } - - if ($parameter->isPassedByReference()) { - $reference = '&'; - } - - $parameters[] = $nullable . $typeDeclaration . $reference . $name . $default; + $parameters[] = $typeDeclaration . $reference . $name . $default; } return implode(', ', $parameters); @@ -389,46 +361,20 @@ final class MockMethod substr( substr( $parameterAsString, - strpos($parameterAsString, ' ') + strlen(' ') + strpos($parameterAsString, ' ') + strlen(' '), ), 0, - -2 - ) + -2, + ), )[1]; // @codeCoverageIgnoreStart } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd } - - private static function unionTypeAsString(ReflectionUnionType $union, string $self): string - { - $types = []; - - foreach ($union->getTypes() as $type) { - if ((string) $type === 'self') { - $types[] = $self; - } else { - $types[] = $type; - } - } - - return implode('|', $types) . ' '; - } - - private static function intersectionTypeAsString(ReflectionIntersectionType $intersection): string - { - $types = []; - - foreach ($intersection->getTypes() as $type) { - $types[] = $type; - } - - return implode('&', $types) . ' '; - } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php index 6025c0a1..9d3ab720 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php @@ -15,12 +15,16 @@ use function is_iterable; use function sprintf; use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\Constraint\IsEqual; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\InvalidParameterGroupException; use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @deprecated */ final class ConsecutiveParameters implements ParametersRule { @@ -35,7 +39,7 @@ final class ConsecutiveParameters implements ParametersRule private $invocations = []; /** - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct(array $parameterGroups) { @@ -45,8 +49,8 @@ final class ConsecutiveParameters implements ParametersRule sprintf( 'Parameter group #%d must be an array or Traversable, got %s', $index, - gettype($parameters) - ) + gettype($parameters), + ), ); } @@ -66,8 +70,8 @@ final class ConsecutiveParameters implements ParametersRule } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function apply(BaseInvocation $invocation): void { @@ -78,8 +82,8 @@ final class ConsecutiveParameters implements ParametersRule } /** - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function verify(): void { @@ -93,8 +97,8 @@ final class ConsecutiveParameters implements ParametersRule * * @param int $callIndex * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ private function verifyInvocation(BaseInvocation $invocation, $callIndex): void { @@ -109,8 +113,8 @@ final class ConsecutiveParameters implements ParametersRule throw new ExpectationFailedException( sprintf( 'Parameter count for invocation %s is too low.', - $invocation->toString() - ) + $invocation->toString(), + ), ); } @@ -122,8 +126,8 @@ final class ConsecutiveParameters implements ParametersRule 'value.', $i, $callIndex, - $invocation->toString() - ) + $invocation->toString(), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php index 2a6625e2..d56618cb 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php @@ -17,6 +17,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; * @internal This class is not covered by the backward compatibility promise for PHPUnit * * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * * @codeCoverageIgnore */ final class InvokedAtIndex extends InvocationOrder @@ -63,8 +64,8 @@ final class InvokedAtIndex extends InvocationOrder throw new ExpectationFailedException( sprintf( 'The expected invocation at index %s was never reached.', - $this->sequenceIndex - ) + $this->sequenceIndex, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php index a84aa655..afc880e1 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php @@ -48,7 +48,7 @@ final class InvokedAtLeastCount extends InvocationOrder if ($count < $this->requiredInvocations) { throw new ExpectationFailedException( 'Expected invocation at least ' . $this->requiredInvocations . - ' times but it occurred ' . $count . ' time(s).' + ' times but it occurred ' . $count . ' time(s).', ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php index d0ad1f80..645ed309 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php @@ -34,7 +34,7 @@ final class InvokedAtLeastOnce extends InvocationOrder if ($count < 1) { throw new ExpectationFailedException( - 'Expected invocation at least once but it never occurred.' + 'Expected invocation at least once but it never occurred.', ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php index c3b815aa..df81a613 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php @@ -48,7 +48,7 @@ final class InvokedAtMostCount extends InvocationOrder if ($count > $this->allowedInvocations) { throw new ExpectationFailedException( 'Expected invocation at most ' . $this->allowedInvocations . - ' times but it occurred ' . $count . ' time(s).' + ' times but it occurred ' . $count . ' time(s).', ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php index 188326c9..a962118e 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php @@ -62,8 +62,8 @@ final class InvokedCount extends InvocationOrder 'Method was expected to be called %d times, ' . 'actually called %d times.', $this->expectedCount, - $count - ) + $count, + ), ); } } @@ -92,7 +92,7 @@ final class InvokedCount extends InvocationOrder default: $message .= sprintf( 'was not expected to be called more than %d times.', - $this->expectedCount + $this->expectedCount, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php index 83ba3b8d..53c63887 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php @@ -11,6 +11,7 @@ namespace PHPUnit\Framework\MockObject\Rule; use function is_string; use PHPUnit\Framework\Constraint\Constraint; +use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\InvalidArgumentException; use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; use PHPUnit\Framework\MockObject\MethodNameConstraint; @@ -49,8 +50,8 @@ final class MethodName } /** - * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ public function matches(BaseInvocation $invocation): bool { @@ -58,8 +59,8 @@ final class MethodName } /** - * @throws \PHPUnit\Framework\ExpectationFailedException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws ExpectationFailedException */ public function matchesName(string $methodName): bool { diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php index 3f1cc53a..c03671c7 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php @@ -18,6 +18,7 @@ use PHPUnit\Framework\Constraint\IsAnything; use PHPUnit\Framework\Constraint\IsEqual; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\MockObject\Invocation as BaseInvocation; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -47,7 +48,7 @@ final class Parameters implements ParametersRule foreach ($parameters as $parameter) { if (!($parameter instanceof Constraint)) { $parameter = new IsEqual( - $parameter + $parameter, ); } @@ -92,8 +93,8 @@ final class Parameters implements ParametersRule * does the rule will get the invoked() method called which should check * if an expectation is met. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ public function verify(): void { @@ -101,8 +102,8 @@ final class Parameters implements ParametersRule } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws ExpectationFailedException + * @throws InvalidArgumentException */ private function doVerify(): bool { @@ -127,7 +128,7 @@ final class Parameters implements ParametersRule } throw new ExpectationFailedException( - sprintf($message, $this->invocation->toString()) + sprintf($message, $this->invocation->toString()), ); } @@ -138,8 +139,8 @@ final class Parameters implements ParametersRule 'Parameter %s for invocation %s does not match expected ' . 'value.', $i, - $this->invocation->toString() - ) + $this->invocation->toString(), + ), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php index 0dcf386b..8b01656f 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php @@ -51,7 +51,7 @@ final class ConsecutiveCalls implements Stub return sprintf( 'return user-specified value %s', - $exporter->export($this->value) + $exporter->export($this->value), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php index 5d64c96a..aa9074eb 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php @@ -40,7 +40,7 @@ final class Exception implements Stub return sprintf( 'raise user-specified exception %s', - $exporter->export($this->exception) + $exporter->export($this->exception), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php index e02181e9..0f24aafc 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php @@ -49,7 +49,7 @@ final class ReturnCallback implements Stub 'passed arguments', $class, $type, - $this->callback[1] + $this->callback[1], ); } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php index 0d288ceb..ea2bb735 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php @@ -39,7 +39,7 @@ final class ReturnReference implements Stub return sprintf( 'return user-specified reference %s', - $exporter->export($this->reference) + $exporter->export($this->reference), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php index fbcd0a07..4ecbc3b9 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php @@ -39,7 +39,7 @@ final class ReturnStub implements Stub return sprintf( 'return user-specified value %s', - $exporter->export($this->value) + $exporter->export($this->value), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php b/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php index 51c00619..49d73759 100644 --- a/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php @@ -9,23 +9,25 @@ */ namespace PHPUnit\Framework; +use SebastianBergmann\RecursionContext\InvalidArgumentException; + /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class SkippedTestCase extends TestCase { /** - * @var bool + * @var ?bool */ protected $backupGlobals = false; /** - * @var bool + * @var ?bool */ protected $backupStaticAttributes = false; /** - * @var bool + * @var ?bool */ protected $runTestInSeparateProcess = false; @@ -49,7 +51,7 @@ final class SkippedTestCase extends TestCase /** * Returns a string representation of the test case. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function toString(): string { diff --git a/vendor/phpunit/phpunit/src/Framework/Test.php b/vendor/phpunit/phpunit/src/Framework/Test.php index be0dcd0e..2f218ad9 100644 --- a/vendor/phpunit/phpunit/src/Framework/Test.php +++ b/vendor/phpunit/phpunit/src/Framework/Test.php @@ -19,5 +19,5 @@ interface Test extends Countable /** * Runs a test and collects its result in a TestResult instance. */ - public function run(TestResult $result = null): TestResult; + public function run(?TestResult $result = null): TestResult; } diff --git a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php index 5dd91e21..77404df0 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestBuilder.php +++ b/vendor/phpunit/phpunit/src/Framework/TestBuilder.php @@ -31,28 +31,28 @@ final class TestBuilder if (!$theClass->isInstantiable()) { return new ErrorTestCase( - sprintf('Cannot instantiate class "%s".', $className) + sprintf('Cannot instantiate class "%s".', $className), ); } $backupSettings = TestUtil::getBackupSettings( $className, - $methodName + $methodName, ); $preserveGlobalState = TestUtil::getPreserveGlobalStateSettings( $className, - $methodName + $methodName, ); $runTestInSeparateProcess = TestUtil::getProcessIsolationSettings( $className, - $methodName + $methodName, ); $runClassInSeparateProcess = TestUtil::getClassProcessIsolationSettings( $className, - $methodName + $methodName, ); $constructor = $theClass->getConstructor(); @@ -71,14 +71,14 @@ final class TestBuilder try { $data = TestUtil::getProvidedData( $className, - $methodName + $methodName, ); } catch (IncompleteTestError $e) { $message = sprintf( "Test for %s::%s marked incomplete by data provider\n%s", $className, $methodName, - $this->throwableToString($e) + $this->throwableToString($e), ); $data = new IncompleteTestCase($className, $methodName, $message); @@ -87,7 +87,7 @@ final class TestBuilder "Test for %s::%s skipped by data provider\n%s", $className, $methodName, - $this->throwableToString($e) + $this->throwableToString($e), ); $data = new SkippedTestCase($className, $methodName, $message); @@ -96,7 +96,7 @@ final class TestBuilder "The data provider specified for %s::%s is invalid.\n%s", $className, $methodName, - $this->throwableToString($t) + $this->throwableToString($t), ); $data = new ErrorTestCase($message); @@ -111,7 +111,7 @@ final class TestBuilder $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, - $backupSettings + $backupSettings, ); } else { $test = $this->buildTestWithoutData($className); @@ -125,7 +125,7 @@ final class TestBuilder $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, - $backupSettings + $backupSettings, ); } @@ -149,7 +149,7 @@ final class TestBuilder array $backupSettings ): DataProviderTestSuite { $dataProviderTestSuite = new DataProviderTestSuite( - $className . '::' . $methodName + $className . '::' . $methodName, ); $groups = TestUtil::getGroups($className, $methodName); @@ -169,7 +169,7 @@ final class TestBuilder $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, - $backupSettings + $backupSettings, ); $dataProviderTestSuite->addTest($_test, $groups); @@ -208,7 +208,7 @@ final class TestBuilder if ($backupSettings['backupStaticAttributes'] !== null) { $test->setBackupStaticAttributes( - $backupSettings['backupStaticAttributes'] + $backupSettings['backupStaticAttributes'], ); } } @@ -225,7 +225,7 @@ final class TestBuilder return sprintf( "%s\n%s", $message, - Filter::getFilteredStacktrace($t) + Filter::getFilteredStacktrace($t), ); } @@ -233,7 +233,7 @@ final class TestBuilder "%s: %s\n%s", get_class($t), $message, - Filter::getFilteredStacktrace($t) + Filter::getFilteredStacktrace($t), ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php index f90245bd..28b5b245 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -60,6 +60,8 @@ use function setlocale; use function sprintf; use function strpos; use function substr; +use function sys_get_temp_dir; +use function tempnam; use function trim; use function var_export; use DeepCopy\DeepCopy; @@ -91,17 +93,21 @@ use PHPUnit\Framework\MockObject\Stub\ReturnStub; use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub; use PHPUnit\Runner\BaseTestRunner; use PHPUnit\Runner\PhptTestCase; +use PHPUnit\Util\Cloner; use PHPUnit\Util\Exception as UtilException; use PHPUnit\Util\GlobalState; use PHPUnit\Util\PHP\AbstractPhpProcess; use PHPUnit\Util\Test as TestUtil; -use PHPUnit\Util\Type; +use Prophecy\Exception\Doubler\ClassNotFoundException; +use Prophecy\Exception\Doubler\DoubleException; +use Prophecy\Exception\Doubler\InterfaceNotFoundException; use Prophecy\Exception\Prediction\PredictionException; use Prophecy\Prophecy\MethodProphecy; use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophet; use ReflectionClass; use ReflectionException; +use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; use SebastianBergmann\Comparator\Comparator; use SebastianBergmann\Comparator\Factory as ComparatorFactory; use SebastianBergmann\Diff\Differ; @@ -110,6 +116,7 @@ use SebastianBergmann\GlobalState\ExcludeList; use SebastianBergmann\GlobalState\Restorer; use SebastianBergmann\GlobalState\Snapshot; use SebastianBergmann\ObjectEnumerator\Enumerator; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use SebastianBergmann\Template\Template; use SoapClient; use Throwable; @@ -139,7 +146,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T protected $backupGlobalsBlacklist = []; /** - * @var bool + * @var ?bool */ protected $backupStaticAttributes; @@ -156,7 +163,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T protected $backupStaticAttributesBlacklist = []; /** - * @var bool + * @var ?bool */ protected $runTestInSeparateProcess; @@ -171,7 +178,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T protected $providedTests = []; /** - * @var bool + * @var ?bool */ private $runClassInSeparateProcess; @@ -311,7 +318,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T private $snapshot; /** - * @var \Prophecy\Prophet + * @var Prophet */ private $prophet; @@ -374,7 +381,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T public static function atLeast(int $requiredInvocations): InvokedAtLeastCountMatcher { return new InvokedAtLeastCountMatcher( - $requiredInvocations + $requiredInvocations, ); } @@ -417,6 +424,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * at the given index. * * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297 + * * @codeCoverageIgnore */ public static function at(int $index): InvokedAtIndexMatcher @@ -428,7 +436,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T if (isset($frame['object']) && $frame['object'] instanceof self) { $frame['object']->addWarning( - 'The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.' + 'The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.', ); break; @@ -542,8 +550,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * Returns a string representation of the test case. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception + * @throws InvalidArgumentException */ public function toString(): string { @@ -553,8 +561,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -562,7 +570,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $buffer = sprintf( '%s::%s', $class->name, - $this->getName(false) + $this->getName(false), ); return $buffer . $this->getDataSetAsString(); @@ -598,24 +606,24 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T // @codeCoverageIgnoreStart switch ($exception) { case Deprecated::class: - $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Deprecated is deprecated and will be removed in PHPUnit 10. Use expectDeprecation() instead.'); + $this->addWarning('Expecting E_DEPRECATED and E_USER_DEPRECATED is deprecated and will no longer be possible in PHPUnit 10.'); - break; + break; case Error::class: - $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Error is deprecated and will be removed in PHPUnit 10. Use expectError() instead.'); + $this->addWarning('Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.'); - break; + break; case Notice::class: - $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Notice is deprecated and will be removed in PHPUnit 10. Use expectNotice() instead.'); + $this->addWarning('Expecting E_STRICT, E_NOTICE, and E_USER_NOTICE is deprecated and will no longer be possible in PHPUnit 10.'); - break; + break; case WarningError::class: - $this->addWarning('Support for using expectException() with PHPUnit\Framework\Error\Warning is deprecated and will be removed in PHPUnit 10. Use expectWarning() instead.'); + $this->addWarning('Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10.'); - break; + break; } // @codeCoverageIgnoreEnd @@ -657,63 +665,123 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->doesNotPerformAssertions = true; } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectDeprecation(): void { + $this->addWarning('Expecting E_DEPRECATED and E_USER_DEPRECATED is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectedException = Deprecated::class; } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectDeprecationMessage(string $message): void { + $this->addWarning('Expecting E_DEPRECATED and E_USER_DEPRECATED is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessage($message); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectDeprecationMessageMatches(string $regularExpression): void { + $this->addWarning('Expecting E_DEPRECATED and E_USER_DEPRECATED is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessageMatches($regularExpression); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectNotice(): void { + $this->addWarning('Expecting E_STRICT, E_NOTICE, and E_USER_NOTICE is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectedException = Notice::class; } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectNoticeMessage(string $message): void { + $this->addWarning('Expecting E_STRICT, E_NOTICE, and E_USER_NOTICE is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessage($message); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectNoticeMessageMatches(string $regularExpression): void { + $this->addWarning('Expecting E_STRICT, E_NOTICE, and E_USER_NOTICE is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessageMatches($regularExpression); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectWarning(): void { + $this->addWarning('Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectedException = WarningError::class; } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectWarningMessage(string $message): void { + $this->addWarning('Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessage($message); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectWarningMessageMatches(string $regularExpression): void { + $this->addWarning('Expecting E_WARNING and E_USER_WARNING is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessageMatches($regularExpression); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectError(): void { + $this->addWarning('Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectedException = Error::class; } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectErrorMessage(string $message): void { + $this->addWarning('Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessage($message); } + /** + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/5062 + */ public function expectErrorMessageMatches(string $regularExpression): void { + $this->addWarning('Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be possible in PHPUnit 10.'); + $this->expectExceptionMessageMatches($regularExpression); } @@ -744,12 +812,12 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * If no TestResult object is passed a new one will be created. * * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws CodeCoverageException + * @throws InvalidArgumentException + * @throws UnintentionallyCoveredCodeException * @throws UtilException */ - public function run(TestResult $result = null): TestResult + public function run(?TestResult $result = null): TestResult { if ($result === null) { $result = $this->createResult(); @@ -775,19 +843,19 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd if ($runEntireClass) { $template = new Template( - __DIR__ . '/../Util/PHP/Template/TestCaseClass.tpl' + __DIR__ . '/../Util/PHP/Template/TestCaseClass.tpl', ); } else { $template = new Template( - __DIR__ . '/../Util/PHP/Template/TestCaseMethod.tpl' + __DIR__ . '/../Util/PHP/Template/TestCaseMethod.tpl', ); } @@ -863,6 +931,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $codeCoverageCacheDirectory = "'." . $codeCoverageCacheDirectory . ".'"; $configurationFilePath = $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] ?? ''; + $processResultFile = tempnam(sys_get_temp_dir(), 'phpunit_'); $var = [ 'composerAutoload' => $composerAutoload, @@ -889,6 +958,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T 'codeCoverageFilter' => $codeCoverageFilter, 'configurationFilePath' => $configurationFilePath, 'name' => $this->getName(false), + 'processResultFile' => $processResultFile, ]; if (!$runEntireClass) { @@ -898,7 +968,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $template->setVar($var); $php = AbstractPhpProcess::factory(); - $php->runTestJob($template->render(), $this, $result); + $php->runTestJob($template->render(), $this, $result, $processResultFile); } else { $result->run($this); } @@ -912,7 +982,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * Returns a builder object to create mock objects using a fluent interface. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $className + * * @psalm-return MockBuilder */ public function getMockBuilder(string $className): MockBuilder @@ -956,7 +1028,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -972,7 +1044,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * Returns the size of the test. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -980,12 +1052,12 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T { return TestUtil::getSize( static::class, - $this->getName(false) + $this->getName(false), ); } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -995,7 +1067,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -1005,7 +1077,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -1015,7 +1087,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * * @internal This method is not covered by the backward compatibility promise for PHPUnit */ @@ -1159,8 +1231,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T throw new Warning( implode( "\n", - array_unique($this->warnings) - ) + array_unique($this->warnings), + ), ); } @@ -1533,7 +1605,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T { if (trim($this->name) === '') { throw new Exception( - 'PHPUnit\Framework\TestCase::$name must be a non-blank string.' + 'PHPUnit\Framework\TestCase::$name must be a non-blank string.', ); } @@ -1554,15 +1626,15 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $exception, LogicalOr::fromConstraints( new ExceptionConstraint(Error::class), - new ExceptionConstraint(\Error::class) - ) + new ExceptionConstraint(\Error::class), + ), ); } else { $this->assertThat( $exception, new ExceptionConstraint( - $this->expectedException - ) + $this->expectedException, + ), ); } } @@ -1571,8 +1643,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->assertThat( $exception, new ExceptionMessage( - $this->expectedExceptionMessage - ) + $this->expectedExceptionMessage, + ), ); } @@ -1580,8 +1652,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->assertThat( $exception, new ExceptionMessageRegularExpression( - $this->expectedExceptionMessageRegExp - ) + $this->expectedExceptionMessageRegExp, + ), ); } @@ -1589,8 +1661,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->assertThat( $exception, new ExceptionCode( - $this->expectedExceptionCode - ) + $this->expectedExceptionCode, + ), ); } @@ -1601,8 +1673,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->assertThat( null, new ExceptionConstraint( - $this->expectedException - ) + $this->expectedException, + ), ); } elseif ($this->expectedExceptionMessage !== null) { $this->numAssertions++; @@ -1610,8 +1682,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T throw new AssertionFailedError( sprintf( 'Failed asserting that exception with message "%s" is thrown', - $this->expectedExceptionMessage - ) + $this->expectedExceptionMessage, + ), ); } elseif ($this->expectedExceptionMessageRegExp !== null) { $this->numAssertions++; @@ -1619,8 +1691,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T throw new AssertionFailedError( sprintf( 'Failed asserting that exception with message matching "%s" is thrown', - $this->expectedExceptionMessageRegExp - ) + $this->expectedExceptionMessageRegExp, + ), ); } elseif ($this->expectedExceptionCode !== null) { $this->numAssertions++; @@ -1628,8 +1700,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T throw new AssertionFailedError( sprintf( 'Failed asserting that exception with code "%s" is thrown', - $this->expectedExceptionCode - ) + $this->expectedExceptionCode, + ), ); } @@ -1654,8 +1726,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T sprintf( 'INI setting "%s" could not be set to "%s".', $varName, - $newValue - ) + $newValue, + ), ); } } @@ -1690,7 +1762,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T throw new Exception( 'The locale functionality is not implemented on your platform, ' . 'the specified locale does not exist or the category name is ' . - 'invalid.' + 'invalid.', ); } } @@ -1699,7 +1771,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * Makes configurable stub for the specified class. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return Stub&RealInstanceType */ protected function createStub(string $originalClassName): Stub @@ -1711,7 +1785,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * Returns a mock object for the specified class. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function createMock(string $originalClassName): MockObject @@ -1723,7 +1799,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * Returns a configured mock object for the specified class. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject @@ -1743,7 +1821,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * @param string[] $methods * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function createPartialMock(string $originalClassName, array $methods): MockObject @@ -1754,8 +1834,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -1765,7 +1845,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T static function (string $method) use ($reflector) { return !$reflector->hasMethod($method); - } + }, ); if ($mockedMethodsThatDontExist) { @@ -1773,33 +1853,35 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T sprintf( 'createPartialMock() called with method(s) %s that do not exist in %s. This will not be allowed in future versions of PHPUnit.', implode(', ', $mockedMethodsThatDontExist), - $originalClassName - ) + $originalClassName, + ), ); } return $this->getMockBuilder($originalClassName) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->disableArgumentCloning() - ->disallowMockingUnknownTypes() - ->setMethods(empty($methods) ? null : $methods) - ->getMock(); + ->disableOriginalConstructor() + ->disableOriginalClone() + ->disableArgumentCloning() + ->disallowMockingUnknownTypes() + ->setMethods(empty($methods) ? null : $methods) + ->getMock(); } /** * Returns a test proxy for the specified class. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject { return $this->getMockBuilder($originalClassName) - ->setConstructorArgs($constructorArguments) - ->enableProxyingToOriginalMethods() - ->getMock(); + ->setConstructorArgs($constructorArguments) + ->enableProxyingToOriginalMethods() + ->getMock(); } /** @@ -1808,11 +1890,17 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * @param null|array $methods $methods * * @psalm-template RealInstanceType of object + * * @psalm-param class-string|string $originalClassName + * * @psalm-return class-string + * + * @deprecated */ protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string { + $this->addWarning('PHPUnit\Framework\TestCase::getMockClass() is deprecated and will be removed in PHPUnit 10.'); + $this->recordDoubledType($originalClassName); $mock = $this->getMockObjectGenerator()->getMock( @@ -1823,7 +1911,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $callOriginalConstructor, $callOriginalClone, $callAutoload, - $cloneArguments + $cloneArguments, ); return get_class($mock); @@ -1835,7 +1923,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * To mock concrete methods, use the 7th parameter ($mockedMethods). * * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject @@ -1850,7 +1940,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $callOriginalClone, $callAutoload, $mockedMethods, - $cloneArguments + $cloneArguments, ); $this->registerMockObject($mockObject); @@ -1862,7 +1952,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T * Returns a mock object based on the given WSDL file. * * @psalm-template RealInstanceType of object + * * @psalm-param class-string|string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): MockObject @@ -1880,7 +1972,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $wsdlFile, $originalClassName, $methods, - $options + $options, ) ); } @@ -1892,7 +1984,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $mockClassName, $callOriginalConstructor, false, - false + false, ); $this->registerMockObject($mockObject); @@ -1919,7 +2011,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $callOriginalClone, $callAutoload, $mockedMethods, - $cloneArguments + $cloneArguments, ); $this->registerMockObject($mockObject); @@ -1941,19 +2033,25 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $traitClassName, $callAutoload, $callOriginalConstructor, - $arguments + $arguments, ); } /** - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException + * @throws ClassNotFoundException + * @throws DoubleException + * @throws InterfaceNotFoundException * * @psalm-param class-string|null $classOrInterface + * + * @deprecated https://github.com/sebastianbergmann/phpunit/issues/4141 */ protected function prophesize(?string $classOrInterface = null): ObjectProphecy { + if (!class_exists(Prophet::class)) { + throw new Exception('This test uses TestCase::prophesize(), but phpspec/prophecy is not installed. Please run "composer require --dev phpspec/prophecy".'); + } + $this->addWarning('PHPUnit\Framework\TestCase::prophesize() is deprecated and will be removed in PHPUnit 10. Please use the trait provided by phpspec/prophecy-phpunit.'); if (is_string($classOrInterface)) { @@ -1999,7 +2097,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } $mockObject->__phpunit_verify( - $this->shouldInvocationMockerBeReset($mockObject) + $this->shouldInvocationMockerBeReset($mockObject), ); } @@ -2032,7 +2130,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $missingRequirements = TestUtil::getMissingRequirements( static::class, - $this->name + $this->name, ); if (!empty($missingRequirements)) { @@ -2092,15 +2190,15 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } if (isset($passed[$dependencyTarget])) { - if ($passed[$dependencyTarget]['size'] != \PHPUnit\Util\Test::UNKNOWN && - $this->getSize() != \PHPUnit\Util\Test::UNKNOWN && + if ($passed[$dependencyTarget]['size'] != TestUtil::UNKNOWN && + $this->getSize() != TestUtil::UNKNOWN && $passed[$dependencyTarget]['size'] > $this->getSize()) { $this->result->addError( $this, new SkippedTestError( - 'This test depends on a test that is larger than itself.' + 'This test depends on a test that is larger than itself.', ), - 0 + 0, ); return false; @@ -2133,9 +2231,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->result->addError( $this, new SkippedTestError( - 'This method has an invalid @depends annotation.' + 'This method has an invalid @depends annotation.', ), - 0 + 0, ); $this->result->endTest($this, 0); @@ -2152,10 +2250,10 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T new SkippedTestError( sprintf( 'This test depends on "%s" to pass.', - $dependency->getTarget() - ) + $dependency->getTarget(), + ), ), - 0 + 0, ); $this->result->endTest($this, 0); @@ -2172,10 +2270,10 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T new Warning( sprintf( 'This test depends on "%s" which does not exist.', - $dependency->getTarget() - ) + $dependency->getTarget(), + ), ), - 0 + 0, ); $this->result->endTest($this, 0); @@ -2212,7 +2310,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } throw new RiskyTestError( - 'Test code or tested code did not (only) close its own output buffers' + 'Test code or tested code did not (only) close its own output buffers', ); } @@ -2239,7 +2337,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws RiskyTestError */ private function restoreGlobalState(): void @@ -2252,7 +2350,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T try { $this->compareGlobalStateSnapshots( $this->snapshot, - $this->createGlobalStateSnapshot($this->backupGlobals === true) + $this->createGlobalStateSnapshot($this->backupGlobals === true), ); } catch (RiskyTestError $rte) { // Intentionally left empty @@ -2299,7 +2397,6 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $excludeList->addClassNamePrefix('SebastianBergmann\Invoker'); $excludeList->addClassNamePrefix('SebastianBergmann\Template'); $excludeList->addClassNamePrefix('SebastianBergmann\Timer'); - $excludeList->addClassNamePrefix('Symfony'); $excludeList->addClassNamePrefix('Doctrine\Instantiator'); $excludeList->addClassNamePrefix('Prophecy'); $excludeList->addStaticAttribute(ComparatorFactory::class, 'instance'); @@ -2331,12 +2428,12 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T false, false, false, - false + false, ); } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException * @throws RiskyTestError */ private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after): void @@ -2347,13 +2444,13 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->compareGlobalStateSnapshotPart( $before->globalVariables(), $after->globalVariables(), - "--- Global variables before the test\n+++ Global variables after the test\n" + "--- Global variables before the test\n+++ Global variables after the test\n", ); $this->compareGlobalStateSnapshotPart( $before->superGlobalVariables(), $after->superGlobalVariables(), - "--- Super-global variables before the test\n+++ Super-global variables after the test\n" + "--- Super-global variables before the test\n+++ Super-global variables after the test\n", ); } @@ -2361,7 +2458,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->compareGlobalStateSnapshotPart( $before->staticAttributes(), $after->staticAttributes(), - "--- Static attributes before the test\n+++ Static attributes after the test\n" + "--- Static attributes before the test\n+++ Static attributes after the test\n", ); } } @@ -2377,11 +2474,11 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $diff = $differ->diff( $exporter->export($before), - $exporter->export($after) + $exporter->export($after), ); throw new RiskyTestError( - $diff + $diff, ); } } @@ -2418,7 +2515,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * @throws \SebastianBergmann\ObjectEnumerator\InvalidArgumentException * @throws \SebastianBergmann\ObjectReflector\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function registerMockObjectsFromTestArguments(array $testArguments, array &$visited = []): void { @@ -2431,9 +2528,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } else { foreach ($testArguments as $testArgument) { if ($testArgument instanceof MockObject) { - if (Type::isCloneable($testArgument)) { - $testArgument = clone $testArgument; - } + $testArgument = Cloner::clone($testArgument); $this->registerMockObject($testArgument); } elseif (is_array($testArgument) && !in_array($testArgument, $visited, true)) { @@ -2441,7 +2536,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T $this->registerMockObjectsFromTestArguments( $testArgument, - $visited + $visited, ); } } @@ -2452,7 +2547,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T { $annotations = TestUtil::parseTestMethodAnnotations( static::class, - $this->name + $this->name, ); if (isset($annotations['method']['doesNotPerformAssertions'])) { @@ -2511,8 +2606,8 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -2566,16 +2661,18 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T /** * @psalm-template RealInstanceType of object + * * @psalm-param class-string $originalClassName + * * @psalm-return MockObject&RealInstanceType */ private function createMockObject(string $originalClassName): MockObject { return $this->getMockBuilder($originalClassName) - ->disableOriginalConstructor() - ->disableOriginalClone() - ->disableArgumentCloning() - ->disallowMockingUnknownTypes() - ->getMock(); + ->disableOriginalConstructor() + ->disableOriginalClone() + ->disableArgumentCloning() + ->disallowMockingUnknownTypes() + ->getMock(); } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestFailure.php b/vendor/phpunit/phpunit/src/Framework/TestFailure.php index 0764bc78..f49dfc35 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestFailure.php +++ b/vendor/phpunit/phpunit/src/Framework/TestFailure.php @@ -95,7 +95,7 @@ final class TestFailure return sprintf( '%s: %s', $this->testName, - $this->thrownException->getMessage() + $this->thrownException->getMessage(), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php b/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php index 3e56708b..5731d98d 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php +++ b/vendor/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php @@ -13,6 +13,7 @@ use Throwable; /** * @deprecated The `TestListener` interface is deprecated + * * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit */ trait TestListenerDefaultImplementation diff --git a/vendor/phpunit/phpunit/src/Framework/TestResult.php b/vendor/phpunit/phpunit/src/Framework/TestResult.php index 99b4246c..0049117d 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestResult.php +++ b/vendor/phpunit/phpunit/src/Framework/TestResult.php @@ -10,7 +10,9 @@ namespace PHPUnit\Framework; use const PHP_EOL; +use function class_exists; use function count; +use function extension_loaded; use function function_exists; use function get_class; use function sprintf; @@ -32,6 +34,7 @@ use SebastianBergmann\CodeCoverage\Exception as OriginalCodeCoverageException; use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; use SebastianBergmann\Invoker\Invoker; use SebastianBergmann\Invoker\TimeoutException; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use SebastianBergmann\ResourceOperations\ResourceOperations; use SebastianBergmann\Timer\Timer; use Throwable; @@ -442,7 +445,7 @@ final class TestResult implements Countable /** * Informs the result that a test was completed. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function endTest(Test $test, float $time): void { @@ -458,7 +461,7 @@ final class TestResult implements Countable 'result' => $test->getResult(), 'size' => TestUtil::getSize( $class, - $test->getName(false) + $test->getName(false), ), ]; @@ -632,8 +635,8 @@ final class TestResult implements Countable * Runs a TestCase. * * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws CodeCoverageException + * @throws InvalidArgumentException * @throws UnintentionallyCoveredCodeException */ public function run(Test $test): void @@ -644,7 +647,7 @@ final class TestResult implements Countable if ($test instanceof TestCase) { $test->setRegisterMockObjectsFromTestArgumentsRecursively( - $this->registerMockObjectsFromTestArgumentsRecursively + $this->registerMockObjectsFromTestArgumentsRecursively, ); $isAnyCoverageRequired = TestUtil::requiresCodeCoverageDataCollection($test); @@ -665,7 +668,7 @@ final class TestResult implements Countable $this->convertDeprecationsToExceptions, $this->convertErrorsToExceptions, $this->convertNoticesToExceptions, - $this->convertWarningsToExceptions + $this->convertWarningsToExceptions, ); $errorHandler->register(); @@ -729,9 +732,9 @@ final class TestResult implements Countable $this->addFailure( $test, new RiskyTestError( - $e->getMessage() + $e->getMessage(), ), - $_timeout + $_timeout, ); $risky = true; @@ -756,8 +759,10 @@ final class TestResult implements Countable '%s in %s:%s', $e->getMessage(), $frame['file'] ?? $e->getFile(), - $frame['line'] ?? $e->getLine() - ) + $frame['line'] ?? $e->getLine(), + ), + 0, + $e, ); } catch (Warning $e) { $warning = true; @@ -790,16 +795,17 @@ final class TestResult implements Countable '%s() used in %s:%s', $function['function'], $function['filename'], - $function['lineno'] - ) + $function['lineno'], + ), ), - $time + $time, ); } } } if ($this->beStrictAboutTestsThatDoNotTestAnything && + !$test->doesNotPerformAssertions() && $test->getNumAssertions() === 0) { $risky = true; } @@ -807,7 +813,7 @@ final class TestResult implements Countable if ($this->forceCoversAnnotation && !$error && !$failure && !$warning && !$incomplete && !$skipped && !$risky) { $annotations = TestUtil::parseTestMethodAnnotations( get_class($test), - $test->getName(false) + $test->getName(false), ); if (!isset($annotations['class']['covers']) && @@ -817,9 +823,9 @@ final class TestResult implements Countable $this->addFailure( $test, new MissingCoversAnnotationException( - 'This test does not have a @covers annotation but is expected to have one' + 'This test does not have a @covers annotation but is expected to have one', ), - $time + $time, ); $risky = true; @@ -835,20 +841,20 @@ final class TestResult implements Countable try { $linesToBeCovered = TestUtil::getLinesToBeCovered( get_class($test), - $test->getName(false) + $test->getName(false), ); $linesToBeUsed = TestUtil::getLinesToBeUsed( get_class($test), - $test->getName(false) + $test->getName(false), ); } catch (InvalidCoversTargetException $cce) { $this->addWarning( $test, new Warning( - $cce->getMessage() + $cce->getMessage(), ), - $time + $time, ); } } @@ -857,12 +863,12 @@ final class TestResult implements Countable $this->codeCoverage->stop( $append, $linesToBeCovered, - $linesToBeUsed + $linesToBeUsed, ); } catch (UnintentionallyCoveredCodeException $cce) { $unintentionallyCoveredCodeError = new UnintentionallyCoveredCodeError( 'This test executed code that is not listed as code to be covered or used:' . - PHP_EOL . $cce->getMessage() + PHP_EOL . $cce->getMessage(), ); } catch (OriginalCodeCoverageException $cce) { $error = true; @@ -887,7 +893,7 @@ final class TestResult implements Countable $this->addFailure( $test, $unintentionallyCoveredCodeError, - $time + $time, ); } elseif ($this->beStrictAboutTestsThatDoNotTestAnything && !$test->doesNotPerformAssertions() && @@ -898,8 +904,8 @@ final class TestResult implements Countable } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -913,8 +919,8 @@ final class TestResult implements Countable } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -926,10 +932,10 @@ final class TestResult implements Countable sprintf( "This test did not perform any assertions\n\n%s:%d", $reflected->getFileName(), - $reflected->getStartLine() - ) + $reflected->getStartLine(), + ), ), - $time + $time, ); } elseif ($this->beStrictAboutTestsThatDoNotTestAnything && $test->doesNotPerformAssertions() && @@ -939,10 +945,10 @@ final class TestResult implements Countable new RiskyTestError( sprintf( 'This test is annotated with "@doesNotPerformAssertions" but performed %d assertions', - $test->getNumAssertions() - ) + $test->getNumAssertions(), + ), ), - $time + $time, ); } elseif ($this->beStrictAboutOutputDuringTests && $test->hasOutput()) { $this->addFailure( @@ -950,24 +956,24 @@ final class TestResult implements Countable new OutputError( sprintf( 'This test printed output: %s', - $test->getActualOutput() - ) + $test->getActualOutput(), + ), ), - $time + $time, ); } elseif ($this->beStrictAboutTodoAnnotatedTests && $test instanceof TestCase) { $annotations = TestUtil::parseTestMethodAnnotations( get_class($test), - $test->getName(false) + $test->getName(false), ); if (isset($annotations['method']['todo'])) { $this->addFailure( $test, new RiskyTestError( - 'Test method is annotated with @todo' + 'Test method is annotated with @todo', ), - $time + $time, ); } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 0bb81844..3fa0ba52 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -13,6 +13,7 @@ use const PHP_EOL; use function array_keys; use function array_map; use function array_merge; +use function array_slice; use function array_unique; use function basename; use function call_user_func; @@ -38,13 +39,17 @@ use PHPUnit\Runner\BaseTestRunner; use PHPUnit\Runner\Filter\Factory; use PHPUnit\Runner\PhptTestCase; use PHPUnit\Util\FileLoader; +use PHPUnit\Util\Reflection; use PHPUnit\Util\Test as TestUtil; use ReflectionClass; use ReflectionException; use ReflectionMethod; +use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; use Throwable; /** + * @template-implements IteratorAggregate + * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test @@ -162,7 +167,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test if (!is_string($theClass) && !$theClass instanceof ReflectionClass) { throw InvalidArgumentException::create( 1, - 'ReflectionClass object or string' + 'ReflectionClass object or string', ); } @@ -179,8 +184,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -211,23 +216,15 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test new WarningTestCase( sprintf( 'Class "%s" has no public constructor.', - $theClass->getName() - ) - ) + $theClass->getName(), + ), + ), ); return; } - foreach ($theClass->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === Assert::class) { - continue; - } - - if ($method->getDeclaringClass()->getName() === TestCase::class) { - continue; - } - + foreach ((new Reflection)->publicMethodsInTestClass($theClass) as $method) { if (!TestUtil::isTestMethod($method)) { continue; } @@ -240,9 +237,9 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test new WarningTestCase( sprintf( 'No tests found in class "%s".', - $theClass->getName() - ) - ) + $theClass->getName(), + ), + ), ); } @@ -270,8 +267,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -314,7 +311,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test if (!(is_object($testClass) || (is_string($testClass) && class_exists($testClass)))) { throw InvalidArgumentException::create( 1, - 'class name or object' + 'class name or object', ); } @@ -325,8 +322,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -340,21 +337,21 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test if (!$testClass->isAbstract() && $testClass->hasMethod(BaseTestRunner::SUITE_METHODNAME)) { try { $method = $testClass->getMethod( - BaseTestRunner::SUITE_METHODNAME + BaseTestRunner::SUITE_METHODNAME, ); // @codeCoverageIgnoreStart } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd if ($method->isStatic()) { $this->addTest( - $method->invoke(null, $testClass->getName()) + $method->invoke(null, $testClass->getName()), ); $suiteMethod = true; @@ -428,8 +425,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -450,8 +447,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -460,18 +457,27 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test continue; } + if ($class->isAbstract() && $class->isSubclassOf(TestCase::class)) { + $this->addWarning( + sprintf( + 'Abstract test case classes with "Test" suffix are deprecated (%s)', + $class->getName(), + ), + ); + } + if (!$class->isAbstract()) { if ($class->hasMethod(BaseTestRunner::SUITE_METHODNAME)) { try { $method = $class->getMethod( - BaseTestRunner::SUITE_METHODNAME + BaseTestRunner::SUITE_METHODNAME, ); // @codeCoverageIgnoreStart } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -480,13 +486,15 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test $this->addTest($method->invoke(null, $className)); } } elseif ($class->implementsInterface(Test::class)) { - $expectedClassName = $shortName; + // Do we have modern namespacing ('Foo\Bar\WhizBangTest') or old-school namespacing ('Foo_Bar_WhizBangTest')? + $isPsr0 = (!$class->inNamespace()) && (strpos($class->getName(), '_') !== false); + $expectedClassName = $isPsr0 ? $className : $shortName; if (($pos = strpos($expectedClassName, '.')) !== false) { $expectedClassName = substr( $expectedClassName, 0, - $pos + $pos, ); } @@ -496,8 +504,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test "Test case class not matching filename is deprecated\n in %s\n Class name was '%s', expected '%s'", $filename, $class->getShortName(), - $expectedClassName - ) + $expectedClassName, + ), ); } @@ -510,8 +518,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test $this->addWarning( sprintf( "Multiple test case classes per file is deprecated\n in %s", - $filename - ) + $filename, + ), ); } @@ -566,7 +574,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test { return (string) $key; }, - array_keys($this->groups) + array_keys($this->groups), ); } @@ -586,13 +594,13 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test /** * Runs the tests and collects their result in a TestResult. * - * @throws \PHPUnit\Framework\CodeCoverageException * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws CodeCoverageException + * @throws UnintentionallyCoveredCodeException * @throws Warning */ - public function run(TestResult $result = null): TestResult + public function run(?TestResult $result = null): TestResult { if ($result === null) { $result = $this->createResult(); @@ -621,7 +629,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test call_user_func([$this->name, $beforeClassMethod]); } } - } catch (SkippedTestSuiteError $error) { + } catch (SkippedTestError|SkippedTestSuiteError $error) { foreach ($this->tests() as $test) { $result->startTest($test); $result->addFailure($test, $error, 0); @@ -649,7 +657,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test $result->addFailure( $test, new SkippedTestError('Test skipped because of an error in hook method'), - 0 + 0, ); } @@ -850,7 +858,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } $this->requiredTests = ExecutionOrderDependency::mergeUnique( ExecutionOrderDependency::filterInvalid($this->requiredTests), - $test->requires() + $test->requires(), ); } @@ -884,13 +892,13 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test if ($test instanceof TestCase || $test instanceof DataProviderTestSuite) { $test->setDependencies( - TestUtil::getDependencies($class->getName(), $methodName) + TestUtil::getDependencies($class->getName(), $methodName), ); } $this->addTest( $test, - TestUtil::getGroups($class->getName(), $methodName) + TestUtil::getGroups($class->getName(), $methodName), ); } diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php b/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php index e351622f..27c9d8b4 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php +++ b/vendor/phpunit/phpunit/src/Framework/TestSuiteIterator.php @@ -14,6 +14,8 @@ use function count; use RecursiveIterator; /** + * @template-implements RecursiveIterator + * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class TestSuiteIterator implements RecursiveIterator @@ -65,7 +67,7 @@ final class TestSuiteIterator implements RecursiveIterator { if (!$this->hasChildren()) { throw new NoChildTestSuiteException( - 'The current item is not a TestSuite instance and therefore does not have any children.' + 'The current item is not a TestSuite instance and therefore does not have any children.', ); } diff --git a/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php b/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php index e1e41bc4..d27c6b57 100644 --- a/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/WarningTestCase.php @@ -15,17 +15,17 @@ namespace PHPUnit\Framework; final class WarningTestCase extends TestCase { /** - * @var bool + * @var ?bool */ protected $backupGlobals = false; /** - * @var bool + * @var ?bool */ protected $backupStaticAttributes = false; /** - * @var bool + * @var ?bool */ protected $runTestInSeparateProcess = false; diff --git a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php index 75a70ca5..bbef329f 100644 --- a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php +++ b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php @@ -91,7 +91,7 @@ abstract class BaseTestRunner /** @var string[] $files */ $files = (new FileIteratorFacade)->getFilesAsArray( $suiteClassFile, - $suffixes + $suffixes, ); $suite = new TestSuite($suiteClassFile); @@ -109,7 +109,7 @@ abstract class BaseTestRunner try { $testClass = $this->loadSuiteClass( - $suiteClassFile + $suiteClassFile, ); } catch (\PHPUnit\Exception $e) { $this->runFailed($e->getMessage()); @@ -122,7 +122,7 @@ abstract class BaseTestRunner if (!$suiteMethod->isStatic()) { $this->runFailed( - 'suite() method must be static.' + 'suite() method must be static.', ); return null; diff --git a/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php b/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php index 19278cc0..f9d8a90d 100644 --- a/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php +++ b/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php @@ -21,6 +21,7 @@ use function is_dir; use function is_file; use function json_decode; use function json_encode; +use function sprintf; use PHPUnit\Util\Filesystem; /** @@ -106,7 +107,7 @@ final class DefaultTestResultCache implements TestResultCache $data = json_decode( file_get_contents($this->cacheFilename), - true + true, ); if ($data === null) { @@ -137,8 +138,8 @@ final class DefaultTestResultCache implements TestResultCache throw new Exception( sprintf( 'Cannot create directory "%s" for result cache file', - $this->cacheFilename - ) + $this->cacheFilename, + ), ); } @@ -149,9 +150,9 @@ final class DefaultTestResultCache implements TestResultCache 'version' => self::VERSION, 'defects' => $this->defects, 'times' => $this->times, - ] + ], ), - LOCK_EX + LOCK_EX, ); } } diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php b/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php index 286f717e..c57e70e7 100644 --- a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php +++ b/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php @@ -35,8 +35,8 @@ final class ExtensionHandler throw new Exception( sprintf( 'Class "%s" does not implement a PHPUnit\Runner\Hook interface', - $extensionConfiguration->className() - ) + $extensionConfiguration->className(), + ), ); } @@ -56,8 +56,8 @@ final class ExtensionHandler throw new Exception( sprintf( 'Class "%s" does not implement the PHPUnit\Framework\TestListener interface', - $listenerConfiguration->className() - ) + $listenerConfiguration->className(), + ), ); } @@ -76,8 +76,8 @@ final class ExtensionHandler } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } @@ -100,6 +100,7 @@ final class ExtensionHandler if ($extensionConfiguration->hasSourceFile()) { /** * @noinspection PhpIncludeInspection + * * @psalm-suppress UnresolvableInclude */ require_once $extensionConfiguration->sourceFile(); @@ -109,8 +110,8 @@ final class ExtensionHandler throw new Exception( sprintf( 'Class "%s" does not exist', - $extensionConfiguration->className() - ) + $extensionConfiguration->className(), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php b/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php index adc4cd77..c65b1948 100644 --- a/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php +++ b/vendor/phpunit/phpunit/src/Runner/Extension/PharLoader.php @@ -9,6 +9,11 @@ */ namespace PHPUnit\Runner\Extension; +use function count; +use function explode; +use function implode; +use function is_file; +use function strpos; use PharIo\Manifest\ApplicationName; use PharIo\Manifest\Exception as ManifestException; use PharIo\Manifest\ManifestLoader; @@ -38,7 +43,7 @@ final class PharLoader try { $applicationName = new ApplicationName('phpunit/phpunit'); - $version = new PharIoVersion(Version::series()); + $version = new PharIoVersion($this->phpunitVersion()); $manifest = ManifestLoader::fromFile('phar://' . $file . '/manifest.xml'); if (!$manifest->isExtensionFor($applicationName)) { @@ -60,6 +65,7 @@ final class PharLoader /** * @noinspection PhpIncludeInspection + * * @psalm-suppress UnresolvableInclude */ require $file; @@ -72,4 +78,21 @@ final class PharLoader 'notLoadedExtensions' => $notLoadedExtensions, ]; } + + private function phpunitVersion(): string + { + $version = Version::id(); + + if (strpos($version, '-') === false) { + return $version; + } + + $parts = explode('.', explode('-', $version)[0]); + + if (count($parts) === 2) { + $parts[] = 0; + } + + return implode('.', $parts); + } } diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php index 3f79da54..b7d83b9f 100644 --- a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php +++ b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php @@ -39,8 +39,8 @@ final class Factory throw new Exception( sprintf( 'Class "%s" does not extend RecursiveFilterIterator', - $filter->name - ) + $filter->name, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php index 42ca77a3..b203c196 100644 --- a/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php +++ b/vendor/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php @@ -35,7 +35,7 @@ abstract class GroupFilterIterator extends RecursiveFilterIterator if (in_array((string) $group, $groups, true)) { $testHashes = array_map( 'spl_object_hash', - $tests + $tests, ); $this->groupTests = array_merge($this->groupTests, $testHashes); diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php b/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php index 7057e1c4..80ab5817 100644 --- a/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php +++ b/vendor/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php @@ -19,8 +19,10 @@ use PHPUnit\Framework\ErrorTestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Framework\WarningTestCase; use PHPUnit\Util\RegularExpression; +use PHPUnit\Util\Test; use RecursiveFilterIterator; use RecursiveIterator; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -53,7 +55,7 @@ final class NameFilterIterator extends RecursiveFilterIterator } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function accept(): bool { @@ -63,7 +65,7 @@ final class NameFilterIterator extends RecursiveFilterIterator return true; } - $tmp = \PHPUnit\Util\Test::describe($test); + $tmp = Test::describe($test); if ($test instanceof ErrorTestCase || $test instanceof WarningTestCase) { $name = $test->getMessage(); @@ -96,7 +98,7 @@ final class NameFilterIterator extends RecursiveFilterIterator if (isset($matches[3]) && $matches[2] < $matches[3]) { $filter = sprintf( '%s.*with data set #(\d+)$', - $matches[1] + $matches[1], ); $this->filterMin = (int) $matches[2]; @@ -105,7 +107,7 @@ final class NameFilterIterator extends RecursiveFilterIterator $filter = sprintf( '%s.*with data set #%s$', $matches[1], - $matches[2] + $matches[2], ); } } // Handles: @@ -115,7 +117,7 @@ final class NameFilterIterator extends RecursiveFilterIterator $filter = sprintf( '%s.*with data set "%s"$', $matches[1], - $matches[2] + $matches[2], ); } @@ -126,8 +128,8 @@ final class NameFilterIterator extends RecursiveFilterIterator str_replace( '/', '\\/', - $filter - ) + $filter, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php b/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php index 6590102d..7855b002 100644 --- a/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php +++ b/vendor/phpunit/phpunit/src/Runner/PhptTestCase.php @@ -55,7 +55,9 @@ use PHPUnit\Framework\SyntheticSkippedError; use PHPUnit\Framework\Test; use PHPUnit\Framework\TestResult; use PHPUnit\Util\PHP\AbstractPhpProcess; +use SebastianBergmann\CodeCoverage\InvalidArgumentException; use SebastianBergmann\CodeCoverage\RawCodeCoverageData; +use SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException; use SebastianBergmann\Template\Template; use SebastianBergmann\Timer\Timer; use Throwable; @@ -85,14 +87,14 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test * * @throws Exception */ - public function __construct(string $filename, AbstractPhpProcess $phpUtil = null) + public function __construct(string $filename, ?AbstractPhpProcess $phpUtil = null) { if (!is_file($filename)) { throw new Exception( sprintf( 'File "%s" does not exist.', - $filename - ) + $filename, + ), ); } @@ -111,12 +113,12 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test /** * Runs a test and collects its result in a TestResult instance. * - * @throws \SebastianBergmann\CodeCoverage\InvalidArgumentException - * @throws \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception + * @throws InvalidArgumentException + * @throws UnintentionallyCoveredCodeException */ - public function run(TestResult $result = null): TestResult + public function run(?TestResult $result = null): TestResult { if ($result === null) { $result = new TestResult; @@ -223,7 +225,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test $trace[0]['file'], $trace[0]['line'], $trace, - $comparisonFailure ? $diff : '' + $comparisonFailure ? $diff : '', ); } @@ -408,7 +410,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test $result->addFailure( $this, new SyntheticSkippedError($message, 0, $trace[0]['file'], $trace[0]['line'], $trace), - 0 + 0, ); $result->endTest($this, 0); @@ -489,7 +491,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test foreach ($unsupportedSections as $section) { if (isset($sections[$section])) { throw new Exception( - "PHPUnit does not support PHPT {$section} sections" + "PHPUnit does not support PHPT {$section} sections", ); } } @@ -520,8 +522,8 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test sprintf( 'Could not load --%s-- %s for PHPT file', $section . '_EXTERNAL', - $testDirectory . $externalFilename - ) + $testDirectory . $externalFilename, + ), ); } @@ -579,7 +581,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test "'" . dirname($this->filename) . "'", "'" . $this->filename . "'", ], - $code + $code, ); } @@ -599,7 +601,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test $files = $this->getCoverageFiles(); $template = new Template( - __DIR__ . '/../Util/PHP/Template/PhptTestCase.tpl' + __DIR__ . '/../Util/PHP/Template/PhptTestCase.tpl', ); $composerAutoload = '\'\''; @@ -619,7 +621,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test if (!empty($GLOBALS['__PHPUNIT_BOOTSTRAP'])) { $globals = '$GLOBALS[\'__PHPUNIT_BOOTSTRAP\'] = ' . var_export( $GLOBALS['__PHPUNIT_BOOTSTRAP'], - true + true, ) . ";\n"; } @@ -638,7 +640,7 @@ final class PhptTestCase implements Reorderable, SelfDescribing, Test 'coverageFile' => $files['coverage'], 'driverMethod' => $pathCoverage ? 'forLineAndPathCoverage' : 'forLineCoverage', 'codeCoverageCacheDirectory' => $codeCoverageCacheDirectory, - ] + ], ); file_put_contents($files['job'], $job); diff --git a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php b/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php index f6de4e93..f957e81a 100644 --- a/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php +++ b/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php @@ -43,20 +43,27 @@ final class StandardTestSuiteLoader implements TestSuiteLoader FileLoader::checkAndLoad($suiteClassFile); $loadedClasses = array_values( - array_diff(get_declared_classes(), $loadedClasses) + array_diff(get_declared_classes(), $loadedClasses), ); if (empty($loadedClasses)) { - throw $this->exceptionFor($suiteClassName, $suiteClassFile); + throw new Exception( + sprintf( + 'Class %s could not be found in %s', + $suiteClassName, + $suiteClassFile, + ), + ); } } if (!class_exists($suiteClassName, false)) { - // this block will handle namespaced classes $offset = 0 - strlen($suiteClassName); foreach ($loadedClasses as $loadedClass) { - if (stripos(substr($loadedClass, $offset - 1), '\\' . $suiteClassName) === 0) { + // @see https://github.com/sebastianbergmann/phpunit/issues/5020 + if (stripos(substr($loadedClass, $offset - 1), '\\' . $suiteClassName) === 0 || + stripos(substr($loadedClass, $offset - 1), '_' . $suiteClassName) === 0) { $suiteClassName = $loadedClass; break; @@ -65,7 +72,13 @@ final class StandardTestSuiteLoader implements TestSuiteLoader } if (!class_exists($suiteClassName, false)) { - throw $this->exceptionFor($suiteClassName, $suiteClassFile); + throw new Exception( + sprintf( + 'Class %s could not be found in %s', + $suiteClassName, + $suiteClassFile, + ), + ); } try { @@ -74,13 +87,23 @@ final class StandardTestSuiteLoader implements TestSuiteLoader } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd - if ($class->isSubclassOf(TestCase::class) && !$class->isAbstract()) { + if ($class->isSubclassOf(TestCase::class)) { + if ($class->isAbstract()) { + throw new Exception( + sprintf( + 'Class %s declared in %s is abstract', + $suiteClassName, + $suiteClassFile, + ), + ); + } + return $class; } @@ -90,34 +113,40 @@ final class StandardTestSuiteLoader implements TestSuiteLoader // @codeCoverageIgnoreStart } catch (ReflectionException $e) { throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e + sprintf( + 'Method %s::suite() declared in %s is abstract', + $suiteClassName, + $suiteClassFile, + ), ); } - // @codeCoverageIgnoreEnd - if (!$method->isAbstract() && $method->isPublic() && $method->isStatic()) { - return $class; + if (!$method->isPublic()) { + throw new Exception( + sprintf( + 'Method %s::suite() declared in %s is not public', + $suiteClassName, + $suiteClassFile, + ), + ); + } + + if (!$method->isStatic()) { + throw new Exception( + sprintf( + 'Method %s::suite() declared in %s is not static', + $suiteClassName, + $suiteClassFile, + ), + ); } } - throw $this->exceptionFor($suiteClassName, $suiteClassFile); + return $class; } public function reload(ReflectionClass $aClass): ReflectionClass { return $aClass; } - - private function exceptionFor(string $className, string $filename): Exception - { - return new Exception( - sprintf( - "Class '%s' could not be found in '%s'.", - $className, - $filename - ) - ); - } } diff --git a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php index 64ad845c..a48a7db6 100644 --- a/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php +++ b/vendor/phpunit/phpunit/src/Runner/TestSuiteSorter.php @@ -24,6 +24,7 @@ use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Util\Test as TestUtil; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -108,8 +109,8 @@ final class TestSuiteSorter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException * @throws Exception + * @throws InvalidArgumentException */ public function reorderTestsInSuite(Test $suite, int $order, bool $resolveDependencies, int $orderDefects, bool $isRootTestSuite = true): void { @@ -123,7 +124,7 @@ final class TestSuiteSorter if (!in_array($order, $allowedOrders, true)) { throw new Exception( - '$order must be one of TestSuiteSorter::ORDER_[DEFAULT|REVERSED|RANDOMIZED|DURATION|SIZE]' + '$order must be one of TestSuiteSorter::ORDER_[DEFAULT|REVERSED|RANDOMIZED|DURATION|SIZE]', ); } @@ -134,7 +135,7 @@ final class TestSuiteSorter if (!in_array($orderDefects, $allowedOrderDefects, true)) { throw new Exception( - '$orderDefects must be one of TestSuiteSorter::ORDER_DEFAULT, TestSuiteSorter::ORDER_DEFECTS_FIRST' + '$orderDefects must be one of TestSuiteSorter::ORDER_DEFAULT, TestSuiteSorter::ORDER_DEFECTS_FIRST', ); } @@ -198,7 +199,7 @@ final class TestSuiteSorter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function addSuiteToDefectSortOrder(TestSuite $suite): void { @@ -235,12 +236,12 @@ final class TestSuiteSorter usort( $tests, /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ function ($left, $right) { return $this->cmpDefectPriorityAndTime($left, $right); - } + }, ); return $tests; @@ -251,12 +252,12 @@ final class TestSuiteSorter usort( $tests, /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ function ($left, $right) { return $this->cmpDuration($left, $right); - } + }, ); return $tests; @@ -267,12 +268,12 @@ final class TestSuiteSorter usort( $tests, /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ function ($left, $right) { return $this->cmpSize($left, $right); - } + }, ); return $tests; @@ -285,7 +286,7 @@ final class TestSuiteSorter * 2. when tests are equally defective, sort the fastest to the front * 3. do not reorder successful tests * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function cmpDefectPriorityAndTime(Test $a, Test $b): int { @@ -312,7 +313,7 @@ final class TestSuiteSorter /** * Compares test duration for sorting tests by duration ascending. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function cmpDuration(Test $a, Test $b): int { @@ -373,7 +374,7 @@ final class TestSuiteSorter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function calculateTestExecutionOrder(Test $suite): array { diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php index 3f637e47..c6c5adc1 100644 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/vendor/phpunit/phpunit/src/Runner/Version.php @@ -10,6 +10,7 @@ namespace PHPUnit\Runner; use function array_slice; +use function assert; use function dirname; use function explode; use function implode; @@ -33,6 +34,8 @@ final class Version /** * Returns the current version of PHPUnit. + * + * @psalm-return non-empty-string */ public static function id(): string { @@ -41,12 +44,17 @@ final class Version } if (self::$version === '') { - self::$version = (new VersionId('9.5.20', dirname(__DIR__, 2)))->getVersion(); + self::$version = (new VersionId('9.6.19', dirname(__DIR__, 2)))->getVersion(); + + assert(!empty(self::$version)); } return self::$version; } + /** + * @psalm-return non-empty-string + */ public static function series(): string { if (strpos(self::id(), '-')) { @@ -58,8 +66,11 @@ final class Version return implode('.', array_slice(explode('.', $version), 0, 2)); } + /** + * @psalm-return non-empty-string + */ public static function getVersionString(): string { - return 'PHPUnit ' . self::id() . ' #StandWithUkraine'; + return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.'; } } diff --git a/vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php b/vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php index 7d5e1b5b..51f0a513 100644 --- a/vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php +++ b/vendor/phpunit/phpunit/src/TextUI/CliArguments/Builder.php @@ -121,7 +121,6 @@ final class Builder 'whitelist=', 'dump-xdebug-filter=', ]; - private const SHORT_OPTIONS = 'd:c:hv'; public function fromParameters(array $parameters, array $additionalLongOptions): Configuration @@ -130,13 +129,13 @@ final class Builder $options = (new CliParser)->parse( $parameters, self::SHORT_OPTIONS, - array_merge(self::LONG_OPTIONS, $additionalLongOptions) + array_merge(self::LONG_OPTIONS, $additionalLongOptions), ); } catch (CliParserException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } @@ -881,7 +880,7 @@ final class Builder $verbose, $version, $coverageFilter, - $xdebugFilterFile + $xdebugFilterFile, ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php index b220dd7a..51bf5cb8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php +++ b/vendor/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Extension; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Configuration diff --git a/vendor/phpunit/phpunit/src/TextUI/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command.php index df8ac0f9..7b963f0a 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Command.php +++ b/vendor/phpunit/phpunit/src/TextUI/Command.php @@ -16,6 +16,7 @@ use function array_keys; use function assert; use function class_exists; use function copy; +use function explode; use function extension_loaded; use function fgets; use function file_get_contents; @@ -24,6 +25,7 @@ use function get_class; use function getcwd; use function ini_get; use function ini_set; +use function is_array; use function is_callable; use function is_dir; use function is_file; @@ -59,6 +61,7 @@ use PHPUnit\Util\XmlTestListRenderer; use ReflectionClass; use SebastianBergmann\CodeCoverage\Filter; use SebastianBergmann\CodeCoverage\StaticAnalysis\CacheWarmer; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use SebastianBergmann\Timer\Timer; use Throwable; @@ -98,7 +101,7 @@ class Command throw new RuntimeException( $t->getMessage(), (int) $t->getCode(), - $t + $t, ); } } @@ -117,7 +120,7 @@ class Command } else { $suite = $runner->getTest( $this->arguments['test'], - $this->arguments['testSuffixes'] + $this->arguments['testSuffixes'], ); } @@ -255,8 +258,8 @@ class Command $this->exitWithErrorMessage( sprintf( 'unrecognized --order-by option: %s', - $arguments->unrecognizedOrderBy() - ) + $arguments->unrecognizedOrderBy(), + ), ); } @@ -269,7 +272,7 @@ class Command if ($arguments->hasIncludePath()) { ini_set( 'include_path', - $arguments->includePath() . PATH_SEPARATOR . ini_get('include_path') + $arguments->includePath() . PATH_SEPARATOR . ini_get('include_path'), ); } @@ -289,8 +292,8 @@ class Command $this->exitWithErrorMessage( sprintf( 'Cannot open file "%s".', - $arguments->argument() - ) + $arguments->argument(), + ), ); } } @@ -366,7 +369,7 @@ class Command $this->arguments['printer'] = $this->handlePrinter( $phpunitConfiguration->printerClass(), - $file + $file, ); } @@ -375,7 +378,7 @@ class Command $this->arguments['loader'] = $this->handleLoader( $phpunitConfiguration->testSuiteLoaderClass(), - $file + $file, ); } @@ -387,7 +390,7 @@ class Command try { $this->arguments['test'] = (new TestSuiteMapper)->map( $this->arguments['configurationObject']->testSuite(), - $this->arguments['testsuite'] ?? '' + $this->arguments['testsuite'] ?? '', ); } catch (Exception $e) { $this->printVersionString(); @@ -428,7 +431,7 @@ class Command if (!class_exists($loaderClass, false)) { if ($loaderFile == '') { $loaderFile = Filesystem::classNameToFilename( - $loaderClass + $loaderClass, ); } @@ -437,6 +440,7 @@ class Command if ($loaderFile) { /** * @noinspection PhpIncludeInspection + * * @psalm-suppress UnresolvableInclude */ require $loaderFile; @@ -450,8 +454,8 @@ class Command } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -472,8 +476,8 @@ class Command $this->exitWithErrorMessage( sprintf( 'Could not use "%s" as loader.', - $loaderClass - ) + $loaderClass, + ), ); return null; @@ -489,7 +493,7 @@ class Command if (!class_exists($printerClass, false)) { if ($printerFile === '') { $printerFile = Filesystem::classNameToFilename( - $printerClass + $printerClass, ); } @@ -498,6 +502,7 @@ class Command if ($printerFile) { /** * @noinspection PhpIncludeInspection + * * @psalm-suppress UnresolvableInclude */ require $printerFile; @@ -508,8 +513,8 @@ class Command $this->exitWithErrorMessage( sprintf( 'Could not use "%s" as printer: class does not exist', - $printerClass - ) + $printerClass, + ), ); } @@ -519,8 +524,8 @@ class Command } catch (\ReflectionException $e) { throw new ReflectionException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); // @codeCoverageIgnoreEnd } @@ -530,8 +535,8 @@ class Command sprintf( 'Could not use "%s" as printer: class does not implement %s', $printerClass, - ResultPrinter::class - ) + ResultPrinter::class, + ), ); } @@ -539,8 +544,8 @@ class Command $this->exitWithErrorMessage( sprintf( 'Could not use "%s" as printer: class cannot be instantiated', - $printerClass - ) + $printerClass, + ), ); } @@ -565,16 +570,29 @@ class Command $this->exitWithErrorMessage($t->getMessage()); } - $this->exitWithErrorMessage( - sprintf( - 'Error in bootstrap script: %s:%s%s%s%s', + $message = sprintf( + 'Error in bootstrap script: %s:%s%s%s%s', + get_class($t), + PHP_EOL, + $t->getMessage(), + PHP_EOL, + $t->getTraceAsString(), + ); + + while ($t = $t->getPrevious()) { + $message .= sprintf( + '%s%sPrevious error: %s:%s%s%s%s', + PHP_EOL, + PHP_EOL, get_class($t), PHP_EOL, $t->getMessage(), PHP_EOL, - $t->getTraceAsString() - ) - ); + $t->getTraceAsString(), + ); + } + + $this->exitWithErrorMessage($message); } } @@ -582,19 +600,33 @@ class Command { $this->printVersionString(); - $latestVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit'); - $isOutdated = version_compare($latestVersion, Version::id(), '>'); + $latestVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit'); + $latestCompatibleVersion = file_get_contents('https://phar.phpunit.de/latest-version-of/phpunit-' . explode('.', Version::series())[0]); - if ($isOutdated) { - printf( - 'You are not using the latest version of PHPUnit.' . PHP_EOL . - 'The latest version is PHPUnit %s.' . PHP_EOL, - $latestVersion - ); + $notLatest = version_compare($latestVersion, Version::id(), '>'); + $notLatestCompatible = version_compare($latestCompatibleVersion, Version::id(), '>'); + + if ($notLatest || $notLatestCompatible) { + print 'You are not using the latest version of PHPUnit.' . PHP_EOL; } else { print 'You are using the latest version of PHPUnit.' . PHP_EOL; } + if ($notLatestCompatible) { + printf( + 'The latest version compatible with PHPUnit %s is PHPUnit %s.' . PHP_EOL, + Version::id(), + $latestCompatibleVersion, + ); + } + + if ($notLatest) { + printf( + 'The latest version is PHPUnit %s.' . PHP_EOL, + $latestVersion, + ); + } + exit(TestRunner::SUCCESS_EXIT); } @@ -638,6 +670,16 @@ class Command { $this->printVersionString(); + $this->warnAboutConflictingOptions( + 'listGroups', + [ + 'filter', + 'groups', + 'excludeGroups', + 'testsuite', + ], + ); + print 'Available test group(s):' . PHP_EOL; $groups = $suite->getGroups(); @@ -650,7 +692,7 @@ class Command printf( ' - %s' . PHP_EOL, - $group + $group, ); } @@ -663,18 +705,28 @@ class Command /** * @throws \PHPUnit\Framework\Exception - * @throws \PHPUnit\TextUI\XmlConfiguration\Exception + * @throws XmlConfiguration\Exception */ private function handleListSuites(bool $exit): int { $this->printVersionString(); + $this->warnAboutConflictingOptions( + 'listSuites', + [ + 'filter', + 'groups', + 'excludeGroups', + 'testsuite', + ], + ); + print 'Available test suite(s):' . PHP_EOL; foreach ($this->arguments['configurationObject']->testSuite() as $testSuite) { printf( ' - %s' . PHP_EOL, - $testSuite->name() + $testSuite->name(), ); } @@ -686,12 +738,21 @@ class Command } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function handleListTests(TestSuite $suite, bool $exit): int { $this->printVersionString(); + $this->warnAboutConflictingOptions( + 'listTests', + [ + 'filter', + 'groups', + 'excludeGroups', + ], + ); + $renderer = new TextTestListRenderer; print $renderer->render($suite); @@ -704,19 +765,28 @@ class Command } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function handleListTestsXml(TestSuite $suite, string $target, bool $exit): int { $this->printVersionString(); + $this->warnAboutConflictingOptions( + 'listTestsXml', + [ + 'filter', + 'groups', + 'excludeGroups', + ], + ); + $renderer = new XmlTestListRenderer; file_put_contents($target, $renderer->render($suite)); printf( 'Wrote list of tests that would have been run to %s' . PHP_EOL, - $target + $target, ); if ($exit) { @@ -772,8 +842,8 @@ class Command $bootstrapScript, $testsDirectory, $src, - $cacheDirectory - ) + $cacheDirectory, + ), ); print PHP_EOL . 'Generated phpunit.xml in ' . getcwd() . '.' . PHP_EOL; @@ -786,7 +856,16 @@ class Command { $this->printVersionString(); - if (!(new SchemaDetector)->detect($filename)->detected()) { + $result = (new SchemaDetector)->detect($filename); + + if (!$result->detected()) { + print $filename . ' does not validate against any known schema.' . PHP_EOL; + + exit(TestRunner::EXCEPTION_EXIT); + } + + /** @psalm-suppress MissingThrowsDocblock */ + if ($result->version() === Version::series()) { print $filename . ' does not need to be migrated.' . PHP_EOL; exit(TestRunner::EXCEPTION_EXIT); @@ -799,7 +878,7 @@ class Command try { file_put_contents( $filename, - (new Migrator)->migrate($filename) + (new Migrator)->migrate($filename), ); print 'Migrated configuration: ' . $filename . PHP_EOL; @@ -852,7 +931,7 @@ class Command if ($configuration->codeCoverage()->hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport()) { (new FilterMapper)->map( $filter, - $configuration->codeCoverage() + $configuration->codeCoverage(), ); } elseif (isset($this->arguments['coverageFilter'])) { if (!is_array($this->arguments['coverageFilter'])) { @@ -879,7 +958,7 @@ class Command $cacheDirectory, !$configuration->codeCoverage()->disableCodeCoverageIgnore(), $configuration->codeCoverage()->ignoreDeprecatedCodeUnits(), - $filter + $filter, ); print 'done [' . $timer->stop()->asString() . ']' . PHP_EOL; @@ -902,4 +981,62 @@ class Command return null; } + + /** + * @psalm-param "listGroups"|"listSuites"|"listTests"|"listTestsXml"|"filter"|"groups"|"excludeGroups"|"testsuite" $key + * @psalm-param list<"listGroups"|"listSuites"|"listTests"|"listTestsXml"|"filter"|"groups"|"excludeGroups"|"testsuite"> $keys + */ + private function warnAboutConflictingOptions(string $key, array $keys): void + { + $warningPrinted = false; + + foreach ($keys as $_key) { + if (!empty($this->arguments[$_key])) { + printf( + 'The %s and %s options cannot be combined, %s is ignored' . PHP_EOL, + $this->mapKeyToOptionForWarning($_key), + $this->mapKeyToOptionForWarning($key), + $this->mapKeyToOptionForWarning($_key), + ); + + $warningPrinted = true; + } + } + + if ($warningPrinted) { + print PHP_EOL; + } + } + + /** + * @psalm-param "listGroups"|"listSuites"|"listTests"|"listTestsXml"|"filter"|"groups"|"excludeGroups"|"testsuite" $key + */ + private function mapKeyToOptionForWarning(string $key): string + { + switch ($key) { + case 'listGroups': + return '--list-groups'; + + case 'listSuites': + return '--list-suites'; + + case 'listTests': + return '--list-tests'; + + case 'listTestsXml': + return '--list-tests-xml'; + + case 'filter': + return '--filter'; + + case 'groups': + return '--group'; + + case 'excludeGroups': + return '--exclude-group'; + + case 'testsuite': + return '--testsuite'; + } + } } diff --git a/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php index 6a0ad2c7..09de8588 100644 --- a/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php +++ b/vendor/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php @@ -23,6 +23,7 @@ use function sprintf; use function str_pad; use function str_repeat; use function strlen; +use function trim; use function vsprintf; use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\Exception; @@ -46,23 +47,15 @@ use Throwable; */ class DefaultResultPrinter extends Printer implements ResultPrinter { - public const EVENT_TEST_START = 0; - - public const EVENT_TEST_END = 1; - + public const EVENT_TEST_START = 0; + public const EVENT_TEST_END = 1; public const EVENT_TESTSUITE_START = 2; - - public const EVENT_TESTSUITE_END = 3; - - public const COLOR_NEVER = 'never'; - - public const COLOR_AUTO = 'auto'; - - public const COLOR_ALWAYS = 'always'; - - public const COLOR_DEFAULT = self::COLOR_NEVER; - - private const AVAILABLE_COLORS = [self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS]; + public const EVENT_TESTSUITE_END = 3; + public const COLOR_NEVER = 'never'; + public const COLOR_AUTO = 'auto'; + public const COLOR_ALWAYS = 'always'; + public const COLOR_DEFAULT = self::COLOR_NEVER; + private const AVAILABLE_COLORS = [self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS]; /** * @var int @@ -149,7 +142,7 @@ class DefaultResultPrinter extends Printer implements ResultPrinter if (!in_array($colors, self::AVAILABLE_COLORS, true)) { throw InvalidArgumentException::create( 3, - vsprintf('value from "%s", "%s" or "%s"', self::AVAILABLE_COLORS) + vsprintf('value from "%s", "%s" or "%s"', self::AVAILABLE_COLORS), ); } @@ -278,8 +271,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->write( sprintf( "Test '%s' started\n", - \PHPUnit\Util\Test::describeAsString($test) - ) + \PHPUnit\Util\Test::describeAsString($test), + ), ); } } @@ -293,8 +286,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->write( sprintf( "Test '%s' ended\n", - \PHPUnit\Util\Test::describeAsString($test) - ) + \PHPUnit\Util\Test::describeAsString($test), + ), ); } @@ -333,8 +326,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter ($count == 1) ? 'was' : 'were', $count, $type, - ($count == 1) ? '' : 's' - ) + ($count == 1) ? '' : 's', + ), ); $i = 1; @@ -362,8 +355,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter sprintf( "\n%d) %s\n", $count, - $defect->getTestName() - ) + $defect->getTestName(), + ), ); } @@ -374,7 +367,7 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->write((string) $e); while ($e = $e->getPrevious()) { - $this->write("\nCaused by\n" . $e); + $this->write("\nCaused by\n" . trim((string) $e) . "\n"); } } @@ -420,7 +413,7 @@ class DefaultResultPrinter extends Printer implements ResultPrinter if (count($result) === 0) { $this->writeWithColor( 'fg-black, bg-yellow', - 'No tests executed!' + 'No tests executed!', ); return; @@ -434,8 +427,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter count($result), (count($result) === 1) ? '' : 's', $this->numAssertions, - ($this->numAssertions === 1) ? '' : 's' - ) + ($this->numAssertions === 1) ? '' : 's', + ), ); return; @@ -450,7 +443,7 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->writeWithColor( $color, - 'OK, but incomplete, skipped, or risky tests!' + 'OK, but incomplete, skipped, or risky tests!', ); } else { $this->write("\n"); @@ -460,21 +453,21 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->writeWithColor( $color, - 'ERRORS!' + 'ERRORS!', ); } elseif ($result->failureCount()) { $color = 'fg-white, bg-red'; $this->writeWithColor( $color, - 'FAILURES!' + 'FAILURES!', ); } elseif ($result->warningCount()) { $color = 'fg-black, bg-yellow'; $this->writeWithColor( $color, - 'WARNINGS!' + 'WARNINGS!', ); } } @@ -511,8 +504,8 @@ class DefaultResultPrinter extends Printer implements ResultPrinter $this->numTestsWidth . 'd (%3s%%)', $this->numTestsRun, $this->numTests, - floor(($this->numTestsRun / $this->numTests) * 100) - ) + floor(($this->numTestsRun / $this->numTests) * 100), + ), ); if ($this->column == $this->maxColumn) { @@ -581,9 +574,9 @@ class DefaultResultPrinter extends Printer implements ResultPrinter '%s%s: %d', !$first ? ', ' : '', $name, - $count + $count, ), - false + false, ); $first = false; diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php index 770ad874..af387bea 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php +++ b/vendor/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php @@ -22,8 +22,8 @@ final class TestDirectoryNotFoundException extends RuntimeException implements E parent::__construct( sprintf( 'Test directory "%s" not found', - $path - ) + $path, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php b/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php index 7ffd2c78..3b534f7e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php +++ b/vendor/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php @@ -22,8 +22,8 @@ final class TestFileNotFoundException extends RuntimeException implements Except parent::__construct( sprintf( 'Test file "%s" not found', - $path - ) + $path, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Help.php b/vendor/phpunit/phpunit/src/TextUI/Help.php index 084f2a21..cfa51acb 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Help.php +++ b/vendor/phpunit/phpunit/src/TextUI/Help.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI; use const PHP_EOL; use function count; +use function defined; use function explode; use function max; use function preg_replace_callback; @@ -28,125 +29,6 @@ final class Help { private const LEFT_MARGIN = ' '; - private const HELP_TEXT = [ - 'Usage' => [ - ['text' => 'phpunit [options] UnitTest.php'], - ['text' => 'phpunit [options] '], - ], - - 'Code Coverage Options' => [ - ['arg' => '--coverage-clover ', 'desc' => 'Generate code coverage report in Clover XML format'], - ['arg' => '--coverage-cobertura ', 'desc' => 'Generate code coverage report in Cobertura XML format'], - ['arg' => '--coverage-crap4j ', 'desc' => 'Generate code coverage report in Crap4J XML format'], - ['arg' => '--coverage-html ', 'desc' => 'Generate code coverage report in HTML format'], - ['arg' => '--coverage-php ', 'desc' => 'Export PHP_CodeCoverage object to file'], - ['arg' => '--coverage-text=', 'desc' => 'Generate code coverage report in text format [default: standard output]'], - ['arg' => '--coverage-xml ', 'desc' => 'Generate code coverage report in PHPUnit XML format'], - ['arg' => '--coverage-cache ', 'desc' => 'Cache static analysis results'], - ['arg' => '--warm-coverage-cache', 'desc' => 'Warm static analysis cache'], - ['arg' => '--coverage-filter ', 'desc' => 'Include in code coverage analysis'], - ['arg' => '--path-coverage', 'desc' => 'Perform path coverage analysis'], - ['arg' => '--disable-coverage-ignore', 'desc' => 'Disable annotations for ignoring code coverage'], - ['arg' => '--no-coverage', 'desc' => 'Ignore code coverage configuration'], - ], - - 'Logging Options' => [ - ['arg' => '--log-junit ', 'desc' => 'Log test execution in JUnit XML format to file'], - ['arg' => '--log-teamcity ', 'desc' => 'Log test execution in TeamCity format to file'], - ['arg' => '--testdox-html ', 'desc' => 'Write agile documentation in HTML format to file'], - ['arg' => '--testdox-text ', 'desc' => 'Write agile documentation in Text format to file'], - ['arg' => '--testdox-xml ', 'desc' => 'Write agile documentation in XML format to file'], - ['arg' => '--reverse-list', 'desc' => 'Print defects in reverse order'], - ['arg' => '--no-logging', 'desc' => 'Ignore logging configuration'], - ], - - 'Test Selection Options' => [ - ['arg' => '--list-suites', 'desc' => 'List available test suites'], - ['arg' => '--testsuite ', 'desc' => 'Filter which testsuite to run'], - ['arg' => '--list-groups', 'desc' => 'List available test groups'], - ['arg' => '--group ', 'desc' => 'Only runs tests from the specified group(s)'], - ['arg' => '--exclude-group ', 'desc' => 'Exclude tests from the specified group(s)'], - ['arg' => '--covers ', 'desc' => 'Only runs tests annotated with "@covers "'], - ['arg' => '--uses ', 'desc' => 'Only runs tests annotated with "@uses "'], - ['arg' => '--list-tests', 'desc' => 'List available tests'], - ['arg' => '--list-tests-xml ', 'desc' => 'List available tests in XML format'], - ['arg' => '--filter ', 'desc' => 'Filter which tests to run'], - ['arg' => '--test-suffix ', 'desc' => 'Only search for test in files with specified suffix(es). Default: Test.php,.phpt'], - ], - - 'Test Execution Options' => [ - ['arg' => '--dont-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'], - ['arg' => '--strict-coverage', 'desc' => 'Be strict about @covers annotation usage'], - ['arg' => '--strict-global-state', 'desc' => 'Be strict about changes to global state'], - ['arg' => '--disallow-test-output', 'desc' => 'Be strict about output during tests'], - ['arg' => '--disallow-resource-usage', 'desc' => 'Be strict about resource usage during small tests'], - ['arg' => '--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'], - ['arg' => '--default-time-limit ', 'desc' => 'Timeout in seconds for tests without @small, @medium or @large'], - ['arg' => '--disallow-todo-tests', 'desc' => 'Disallow @todo-annotated tests'], - ['spacer' => ''], - - ['arg' => '--process-isolation', 'desc' => 'Run each test in a separate PHP process'], - ['arg' => '--globals-backup', 'desc' => 'Backup and restore $GLOBALS for each test'], - ['arg' => '--static-backup', 'desc' => 'Backup and restore static attributes for each test'], - ['spacer' => ''], - - ['arg' => '--colors ', 'desc' => 'Use colors in output ("never", "auto" or "always")'], - ['arg' => '--columns ', 'desc' => 'Number of columns to use for progress output'], - ['arg' => '--columns max', 'desc' => 'Use maximum number of columns for progress output'], - ['arg' => '--stderr', 'desc' => 'Write to STDERR instead of STDOUT'], - ['arg' => '--stop-on-defect', 'desc' => 'Stop execution upon first not-passed test'], - ['arg' => '--stop-on-error', 'desc' => 'Stop execution upon first error'], - ['arg' => '--stop-on-failure', 'desc' => 'Stop execution upon first error or failure'], - ['arg' => '--stop-on-warning', 'desc' => 'Stop execution upon first warning'], - ['arg' => '--stop-on-risky', 'desc' => 'Stop execution upon first risky test'], - ['arg' => '--stop-on-skipped', 'desc' => 'Stop execution upon first skipped test'], - ['arg' => '--stop-on-incomplete', 'desc' => 'Stop execution upon first incomplete test'], - ['arg' => '--fail-on-incomplete', 'desc' => 'Treat incomplete tests as failures'], - ['arg' => '--fail-on-risky', 'desc' => 'Treat risky tests as failures'], - ['arg' => '--fail-on-skipped', 'desc' => 'Treat skipped tests as failures'], - ['arg' => '--fail-on-warning', 'desc' => 'Treat tests with warnings as failures'], - ['arg' => '-v|--verbose', 'desc' => 'Output more verbose information'], - ['arg' => '--debug', 'desc' => 'Display debugging information'], - ['spacer' => ''], - - ['arg' => '--repeat ', 'desc' => 'Runs the test(s) repeatedly'], - ['arg' => '--teamcity', 'desc' => 'Report test execution progress in TeamCity format'], - ['arg' => '--testdox', 'desc' => 'Report test execution progress in TestDox format'], - ['arg' => '--testdox-group', 'desc' => 'Only include tests from the specified group(s)'], - ['arg' => '--testdox-exclude-group', 'desc' => 'Exclude tests from the specified group(s)'], - ['arg' => '--no-interaction', 'desc' => 'Disable TestDox progress animation'], - ['arg' => '--printer ', 'desc' => 'TestListener implementation to use'], - ['spacer' => ''], - - ['arg' => '--order-by ', 'desc' => 'Run tests in order: default|defects|duration|no-depends|random|reverse|size'], - ['arg' => '--random-order-seed ', 'desc' => 'Use a specific random seed for random order'], - ['arg' => '--cache-result', 'desc' => 'Write test results to cache file'], - ['arg' => '--do-not-cache-result', 'desc' => 'Do not write test results to cache file'], - ], - - 'Configuration Options' => [ - ['arg' => '--prepend ', 'desc' => 'A PHP script that is included as early as possible'], - ['arg' => '--bootstrap ', 'desc' => 'A PHP script that is included before the tests run'], - ['arg' => '-c|--configuration ', 'desc' => 'Read configuration from XML file'], - ['arg' => '--no-configuration', 'desc' => 'Ignore default configuration file (phpunit.xml)'], - ['arg' => '--extensions ', 'desc' => 'A comma separated list of PHPUnit extensions to load'], - ['arg' => '--no-extensions', 'desc' => 'Do not load PHPUnit extensions'], - ['arg' => '--include-path ', 'desc' => 'Prepend PHP\'s include_path with given path(s)'], - ['arg' => '-d ', 'desc' => 'Sets a php.ini value'], - ['arg' => '--cache-result-file ', 'desc' => 'Specify result cache path and filename'], - ['arg' => '--generate-configuration', 'desc' => 'Generate configuration file with suggested settings'], - ['arg' => '--migrate-configuration', 'desc' => 'Migrate configuration file to current format'], - ], - - 'Miscellaneous Options' => [ - ['arg' => '-h|--help', 'desc' => 'Prints this usage information'], - ['arg' => '--version', 'desc' => 'Prints the version and exits'], - ['arg' => '--atleast-version ', 'desc' => 'Checks that version is greater than min and exits'], - ['arg' => '--check-version', 'desc' => 'Check whether PHPUnit is the latest version'], - ], - - ]; - /** * @var int Number of columns required to write the longest option name to the console */ @@ -174,7 +56,7 @@ final class Help $this->hasColor = $withColor; } - foreach (self::HELP_TEXT as $options) { + foreach ($this->elements() as $options) { foreach ($options as $option) { if (isset($option['arg'])) { $this->maxArgLength = max($this->maxArgLength, isset($option['arg']) ? strlen($option['arg']) : 0); @@ -199,7 +81,7 @@ final class Help private function writePlaintext(): void { - foreach (self::HELP_TEXT as $section => $options) { + foreach ($this->elements() as $section => $options) { print "{$section}:" . PHP_EOL; if ($section !== 'Usage') { @@ -227,7 +109,7 @@ final class Help private function writeWithColor(): void { - foreach (self::HELP_TEXT as $section => $options) { + foreach ($this->elements() as $section => $options) { print Color::colorize('fg-yellow', "{$section}:") . PHP_EOL; foreach ($options as $option) { @@ -247,7 +129,7 @@ final class Help { return Color::colorize('fg-cyan', $matches[0]); }, - $arg + $arg, ); $desc = explode(PHP_EOL, wordwrap($option['desc'], $this->maxDescLength, PHP_EOL)); @@ -262,4 +144,138 @@ final class Help print PHP_EOL; } } + + /** + * @psalm-return array> + */ + private function elements(): array + { + $elements = [ + 'Usage' => [ + ['text' => 'phpunit [options] UnitTest.php'], + ['text' => 'phpunit [options] '], + ], + + 'Code Coverage Options' => [ + ['arg' => '--coverage-clover ', 'desc' => 'Generate code coverage report in Clover XML format'], + ['arg' => '--coverage-cobertura ', 'desc' => 'Generate code coverage report in Cobertura XML format'], + ['arg' => '--coverage-crap4j ', 'desc' => 'Generate code coverage report in Crap4J XML format'], + ['arg' => '--coverage-html ', 'desc' => 'Generate code coverage report in HTML format'], + ['arg' => '--coverage-php ', 'desc' => 'Export PHP_CodeCoverage object to file'], + ['arg' => '--coverage-text=', 'desc' => 'Generate code coverage report in text format [default: standard output]'], + ['arg' => '--coverage-xml ', 'desc' => 'Generate code coverage report in PHPUnit XML format'], + ['arg' => '--coverage-cache ', 'desc' => 'Cache static analysis results'], + ['arg' => '--warm-coverage-cache', 'desc' => 'Warm static analysis cache'], + ['arg' => '--coverage-filter ', 'desc' => 'Include in code coverage analysis'], + ['arg' => '--path-coverage', 'desc' => 'Perform path coverage analysis'], + ['arg' => '--disable-coverage-ignore', 'desc' => 'Disable annotations for ignoring code coverage'], + ['arg' => '--no-coverage', 'desc' => 'Ignore code coverage configuration'], + ], + + 'Logging Options' => [ + ['arg' => '--log-junit ', 'desc' => 'Log test execution in JUnit XML format to file'], + ['arg' => '--log-teamcity ', 'desc' => 'Log test execution in TeamCity format to file'], + ['arg' => '--testdox-html ', 'desc' => 'Write agile documentation in HTML format to file'], + ['arg' => '--testdox-text ', 'desc' => 'Write agile documentation in Text format to file'], + ['arg' => '--testdox-xml ', 'desc' => 'Write agile documentation in XML format to file'], + ['arg' => '--reverse-list', 'desc' => 'Print defects in reverse order'], + ['arg' => '--no-logging', 'desc' => 'Ignore logging configuration'], + ], + + 'Test Selection Options' => [ + ['arg' => '--list-suites', 'desc' => 'List available test suites'], + ['arg' => '--testsuite ', 'desc' => 'Filter which testsuite to run'], + ['arg' => '--list-groups', 'desc' => 'List available test groups'], + ['arg' => '--group ', 'desc' => 'Only runs tests from the specified group(s)'], + ['arg' => '--exclude-group ', 'desc' => 'Exclude tests from the specified group(s)'], + ['arg' => '--covers ', 'desc' => 'Only runs tests annotated with "@covers "'], + ['arg' => '--uses ', 'desc' => 'Only runs tests annotated with "@uses "'], + ['arg' => '--list-tests', 'desc' => 'List available tests'], + ['arg' => '--list-tests-xml ', 'desc' => 'List available tests in XML format'], + ['arg' => '--filter ', 'desc' => 'Filter which tests to run'], + ['arg' => '--test-suffix ', 'desc' => 'Only search for test in files with specified suffix(es). Default: Test.php,.phpt'], + ], + + 'Test Execution Options' => [ + ['arg' => '--dont-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'], + ['arg' => '--strict-coverage', 'desc' => 'Be strict about @covers annotation usage'], + ['arg' => '--strict-global-state', 'desc' => 'Be strict about changes to global state'], + ['arg' => '--disallow-test-output', 'desc' => 'Be strict about output during tests'], + ['arg' => '--disallow-resource-usage', 'desc' => 'Be strict about resource usage during small tests'], + ['arg' => '--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'], + ['arg' => '--default-time-limit ', 'desc' => 'Timeout in seconds for tests without @small, @medium or @large'], + ['arg' => '--disallow-todo-tests', 'desc' => 'Disallow @todo-annotated tests'], + ['spacer' => ''], + + ['arg' => '--process-isolation', 'desc' => 'Run each test in a separate PHP process'], + ['arg' => '--globals-backup', 'desc' => 'Backup and restore $GLOBALS for each test'], + ['arg' => '--static-backup', 'desc' => 'Backup and restore static attributes for each test'], + ['spacer' => ''], + + ['arg' => '--colors ', 'desc' => 'Use colors in output ("never", "auto" or "always")'], + ['arg' => '--columns ', 'desc' => 'Number of columns to use for progress output'], + ['arg' => '--columns max', 'desc' => 'Use maximum number of columns for progress output'], + ['arg' => '--stderr', 'desc' => 'Write to STDERR instead of STDOUT'], + ['arg' => '--stop-on-defect', 'desc' => 'Stop execution upon first not-passed test'], + ['arg' => '--stop-on-error', 'desc' => 'Stop execution upon first error'], + ['arg' => '--stop-on-failure', 'desc' => 'Stop execution upon first error or failure'], + ['arg' => '--stop-on-warning', 'desc' => 'Stop execution upon first warning'], + ['arg' => '--stop-on-risky', 'desc' => 'Stop execution upon first risky test'], + ['arg' => '--stop-on-skipped', 'desc' => 'Stop execution upon first skipped test'], + ['arg' => '--stop-on-incomplete', 'desc' => 'Stop execution upon first incomplete test'], + ['arg' => '--fail-on-incomplete', 'desc' => 'Treat incomplete tests as failures'], + ['arg' => '--fail-on-risky', 'desc' => 'Treat risky tests as failures'], + ['arg' => '--fail-on-skipped', 'desc' => 'Treat skipped tests as failures'], + ['arg' => '--fail-on-warning', 'desc' => 'Treat tests with warnings as failures'], + ['arg' => '-v|--verbose', 'desc' => 'Output more verbose information'], + ['arg' => '--debug', 'desc' => 'Display debugging information'], + ['spacer' => ''], + + ['arg' => '--repeat ', 'desc' => 'Runs the test(s) repeatedly'], + ['arg' => '--teamcity', 'desc' => 'Report test execution progress in TeamCity format'], + ['arg' => '--testdox', 'desc' => 'Report test execution progress in TestDox format'], + ['arg' => '--testdox-group', 'desc' => 'Only include tests from the specified group(s)'], + ['arg' => '--testdox-exclude-group', 'desc' => 'Exclude tests from the specified group(s)'], + ['arg' => '--no-interaction', 'desc' => 'Disable TestDox progress animation'], + ['arg' => '--printer ', 'desc' => 'TestListener implementation to use'], + ['spacer' => ''], + + ['arg' => '--order-by ', 'desc' => 'Run tests in order: default|defects|duration|no-depends|random|reverse|size'], + ['arg' => '--random-order-seed ', 'desc' => 'Use a specific random seed for random order'], + ['arg' => '--cache-result', 'desc' => 'Write test results to cache file'], + ['arg' => '--do-not-cache-result', 'desc' => 'Do not write test results to cache file'], + ], + + 'Configuration Options' => [ + ['arg' => '--prepend ', 'desc' => 'A PHP script that is included as early as possible'], + ['arg' => '--bootstrap ', 'desc' => 'A PHP script that is included before the tests run'], + ['arg' => '-c|--configuration ', 'desc' => 'Read configuration from XML file'], + ['arg' => '--no-configuration', 'desc' => 'Ignore default configuration file (phpunit.xml)'], + ['arg' => '--extensions ', 'desc' => 'A comma separated list of PHPUnit extensions to load'], + ['arg' => '--no-extensions', 'desc' => 'Do not load PHPUnit extensions'], + ['arg' => '--include-path ', 'desc' => 'Prepend PHP\'s include_path with given path(s)'], + ['arg' => '-d ', 'desc' => 'Sets a php.ini value'], + ['arg' => '--cache-result-file ', 'desc' => 'Specify result cache path and filename'], + ['arg' => '--generate-configuration', 'desc' => 'Generate configuration file with suggested settings'], + ['arg' => '--migrate-configuration', 'desc' => 'Migrate configuration file to current format'], + ], + ]; + + if (defined('__PHPUNIT_PHAR__')) { + $elements['PHAR Options'] = [ + ['arg' => '--manifest', 'desc' => 'Print Software Bill of Materials (SBOM) in plain-text format'], + ['arg' => '--sbom', 'desc' => 'Print Software Bill of Materials (SBOM) in CycloneDX XML format'], + ['arg' => '--composer-lock', 'desc' => 'Print composer.lock file used to build the PHAR'], + ]; + } + + $elements['Miscellaneous Options'] = [ + ['arg' => '-h|--help', 'desc' => 'Prints this usage information'], + ['arg' => '--version', 'desc' => 'Prints the version and exits'], + ['arg' => '--atleast-version ', 'desc' => 'Checks that version is greater than min and exits'], + ['arg' => '--check-version', 'desc' => 'Checks whether PHPUnit is the latest version and exits'], + ]; + + return $elements; + } } diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php index a1189f6d..1b23a3dc 100644 --- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php @@ -27,6 +27,7 @@ use function is_string; use function mt_srand; use function range; use function realpath; +use function sort; use function sprintf; use function time; use PHPUnit\Framework\Exception; @@ -54,7 +55,6 @@ use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\FilterMapper; use PHPUnit\TextUI\XmlConfiguration\Configuration; use PHPUnit\TextUI\XmlConfiguration\Loader; use PHPUnit\TextUI\XmlConfiguration\PhpHandler; -use PHPUnit\Util\Color; use PHPUnit\Util\Filesystem; use PHPUnit\Util\Log\JUnit; use PHPUnit\Util\Log\TeamCity; @@ -88,10 +88,8 @@ use SebastianBergmann\Timer\Timer; */ final class TestRunner extends BaseTestRunner { - public const SUCCESS_EXIT = 0; - - public const FAILURE_EXIT = 1; - + public const SUCCESS_EXIT = 0; + public const FAILURE_EXIT = 1; public const EXCEPTION_EXIT = 2; /** @@ -124,7 +122,7 @@ final class TestRunner extends BaseTestRunner */ private $timer; - public function __construct(TestSuiteLoader $loader = null, CodeCoverageFilter $filter = null) + public function __construct(?TestSuiteLoader $loader = null, ?CodeCoverageFilter $filter = null) { if ($filter === null) { $filter = new CodeCoverageFilter; @@ -137,8 +135,8 @@ final class TestRunner extends BaseTestRunner /** * @throws \PHPUnit\Runner\Exception - * @throws \PHPUnit\TextUI\XmlConfiguration\Exception * @throws Exception + * @throws XmlConfiguration\Exception */ public function run(TestSuite $suite, array $arguments = [], array $warnings = [], bool $exit = true): TestResult { @@ -308,8 +306,8 @@ final class TestRunner extends BaseTestRunner } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -326,18 +324,7 @@ final class TestRunner extends BaseTestRunner $this->printer->setShowProgressAnimation(!$arguments['noInteraction']); } - if ($arguments['colors'] !== DefaultResultPrinter::COLOR_NEVER) { - $this->write( - 'PHPUnit ' . - Version::id() . - ' ' . - Color::colorize('bg-blue', '#StandWith') . - Color::colorize('bg-yellow', 'Ukraine') . - "\n" - ); - } else { - $this->write(Version::getVersionString() . "\n"); - } + $this->write(Version::getVersionString() . "\n"); foreach ($arguments['listeners'] as $listener) { $result->addListener($listener); @@ -354,8 +341,8 @@ final class TestRunner extends BaseTestRunner new HtmlResultPrinter( $arguments['testdoxHTMLFile'], $arguments['testdoxGroups'], - $arguments['testdoxExcludeGroups'] - ) + $arguments['testdoxExcludeGroups'], + ), ); } @@ -364,22 +351,22 @@ final class TestRunner extends BaseTestRunner new TextResultPrinter( $arguments['testdoxTextFile'], $arguments['testdoxGroups'], - $arguments['testdoxExcludeGroups'] - ) + $arguments['testdoxExcludeGroups'], + ), ); } if (isset($arguments['testdoxXMLFile'])) { $result->addListener( new XmlResultPrinter( - $arguments['testdoxXMLFile'] - ) + $arguments['testdoxXMLFile'], + ), ); } if (isset($arguments['teamcityLogfile'])) { $result->addListener( - new TeamCity($arguments['teamcityLogfile']) + new TeamCity($arguments['teamcityLogfile']), ); } @@ -387,8 +374,8 @@ final class TestRunner extends BaseTestRunner $result->addListener( new JUnit( $arguments['junitLogfile'], - $arguments['reportUselessTests'] - ) + $arguments['reportUselessTests'], + ), ); } @@ -445,7 +432,7 @@ final class TestRunner extends BaseTestRunner (new FilterMapper)->map( $this->codeCoverageFilter, - $codeCoverageConfiguration + $codeCoverageConfiguration, ); } } @@ -462,7 +449,7 @@ final class TestRunner extends BaseTestRunner $codeCoverage = new CodeCoverage( $codeCoverageDriver, - $this->codeCoverageFilter + $this->codeCoverageFilter, ); if (isset($codeCoverageConfiguration) && $codeCoverageConfiguration->hasCacheDirectory()) { @@ -545,21 +532,21 @@ final class TestRunner extends BaseTestRunner $this->writeMessage( 'Configuration', - $arguments['configurationObject']->filename() + $arguments['configurationObject']->filename(), ); } foreach ($arguments['loadedExtensions'] as $extension) { $this->writeMessage( 'Extension', - $extension + $extension, ); } foreach ($arguments['notLoadedExtensions'] as $extension) { $this->writeMessage( 'Extension', - $extension + $extension, ); } } @@ -567,7 +554,7 @@ final class TestRunner extends BaseTestRunner if ($arguments['executionOrder'] === TestSuiteSorter::ORDER_RANDOMIZED) { $this->writeMessage( 'Random Seed', - (string) $arguments['randomOrderSeed'] + (string) $arguments['randomOrderSeed'], ); } @@ -583,6 +570,9 @@ final class TestRunner extends BaseTestRunner $warnings[] = 'Directives printerClass and testdox are mutually exclusive'; } + $warnings = array_merge($warnings, $suite->warnings()); + sort($warnings); + foreach ($warnings as $warning) { $this->writeMessage('Warning', $warning); } @@ -596,7 +586,7 @@ final class TestRunner extends BaseTestRunner $this->writeMessage('Suggestion', 'Migrate your XML configuration using "--migrate-configuration"!'); } else { $this->write( - "\n Warning - The configuration file did not pass validation!\n The following problems have been detected:\n" + "\n Warning - The configuration file did not pass validation!\n The following problems have been detected:\n", ); $this->write($arguments['configurationObject']->validationErrors()); @@ -658,18 +648,6 @@ final class TestRunner extends BaseTestRunner } } - $testSuiteWarningsPrinted = false; - - foreach ($suite->warnings() as $warning) { - $this->writeMessage('Warning', $warning); - - $testSuiteWarningsPrinted = true; - } - - if ($testSuiteWarningsPrinted) { - $this->write(PHP_EOL); - } - $suite->run($result); foreach ($this->extensions as $extension) { @@ -682,6 +660,21 @@ final class TestRunner extends BaseTestRunner $this->printer->printResult($result); if (isset($codeCoverage)) { + if (isset($arguments['coveragePHP'])) { + $this->codeCoverageGenerationStart('PHP'); + + try { + $writer = new PhpReport; + $writer->process($codeCoverage, $arguments['coveragePHP']); + + $this->codeCoverageGenerationSucceeded(); + + unset($writer); + } catch (CodeCoverageException $e) { + $this->codeCoverageGenerationFailed($e); + } + } + if (isset($arguments['coverageClover'])) { $this->codeCoverageGenerationStart('Clover XML'); @@ -736,8 +729,8 @@ final class TestRunner extends BaseTestRunner $arguments['reportHighLowerBound'], sprintf( ' and PHPUnit %s', - Version::id() - ) + Version::id(), + ), ); $writer->process($codeCoverage, $arguments['coverageHtml']); @@ -750,21 +743,6 @@ final class TestRunner extends BaseTestRunner } } - if (isset($arguments['coveragePHP'])) { - $this->codeCoverageGenerationStart('PHP'); - - try { - $writer = new PhpReport; - $writer->process($codeCoverage, $arguments['coveragePHP']); - - $this->codeCoverageGenerationSucceeded(); - - unset($writer); - } catch (CodeCoverageException $e) { - $this->codeCoverageGenerationFailed($e); - } - } - if (isset($arguments['coverageText'])) { if ($arguments['coverageText'] === 'php://stdout') { $outputStream = $this->printer; @@ -778,11 +756,11 @@ final class TestRunner extends BaseTestRunner $arguments['reportLowUpperBound'], $arguments['reportHighLowerBound'], $arguments['coverageTextShowUncoveredFiles'], - $arguments['coverageTextShowOnlySummary'] + $arguments['coverageTextShowOnlySummary'], ); $outputStream->write( - $processor->process($codeCoverage, $colors) + $processor->process($codeCoverage, $colors), ); } @@ -886,8 +864,8 @@ final class TestRunner extends BaseTestRunner } /** - * @throws \PHPUnit\TextUI\XmlConfiguration\Exception * @throws Exception + * @throws XmlConfiguration\Exception */ private function handleConfiguration(array &$arguments): void { @@ -1028,22 +1006,24 @@ final class TestRunner extends BaseTestRunner $arguments['excludeGroups'] = array_diff($groupConfiguration->exclude()->asArrayOfStrings(), $groupCliArgs); } - $extensionHandler = new ExtensionHandler; + if (!isset($arguments['noExtensions'])) { + $extensionHandler = new ExtensionHandler; - foreach ($arguments['configurationObject']->extensions() as $extension) { - $extensionHandler->registerExtension($extension, $this); + foreach ($arguments['configurationObject']->extensions() as $extension) { + $extensionHandler->registerExtension($extension, $this); + } + + foreach ($arguments['configurationObject']->listeners() as $listener) { + $arguments['listeners'][] = $extensionHandler->createTestListenerInstance($listener); + } + + unset($extensionHandler); } - foreach ($arguments['configurationObject']->listeners() as $listener) { - $arguments['listeners'][] = $extensionHandler->createTestListenerInstance($listener); - } - - unset($extensionHandler); - foreach ($arguments['unavailableExtensions'] as $extension) { $arguments['warnings'][] = sprintf( 'Extension "%s" is not available', - $extension + $extension, ); } @@ -1053,7 +1033,7 @@ final class TestRunner extends BaseTestRunner if ($loggingConfiguration->hasText()) { $arguments['listeners'][] = new DefaultResultPrinter( $loggingConfiguration->text()->target()->path(), - true + true, ); } @@ -1167,14 +1147,14 @@ final class TestRunner extends BaseTestRunner if (!empty($arguments['excludeGroups'])) { $filterFactory->addFilter( new ReflectionClass(ExcludeGroupFilterIterator::class), - $arguments['excludeGroups'] + $arguments['excludeGroups'], ); } if (!empty($arguments['groups'])) { $filterFactory->addFilter( new ReflectionClass(IncludeGroupFilterIterator::class), - $arguments['groups'] + $arguments['groups'], ); } @@ -1186,8 +1166,8 @@ final class TestRunner extends BaseTestRunner { return '__phpunit_covers_' . $name; }, - $arguments['testsCovering'] - ) + $arguments['testsCovering'], + ), ); } @@ -1199,15 +1179,15 @@ final class TestRunner extends BaseTestRunner { return '__phpunit_uses_' . $name; }, - $arguments['testsUsing'] - ) + $arguments['testsUsing'], + ), ); } if ($arguments['filter']) { $filterFactory->addFilter( new ReflectionClass(NameFilterIterator::class), - $arguments['filter'] + $arguments['filter'], ); } @@ -1224,8 +1204,8 @@ final class TestRunner extends BaseTestRunner sprintf( "%-15s%s\n", $type . ':', - $message - ) + $message, + ), ); $this->messagePrinted = true; @@ -1239,7 +1219,7 @@ final class TestRunner extends BaseTestRunner $arguments['colors'], $arguments['debug'], $arguments['columns'], - $arguments['reverseList'] + $arguments['reverseList'], ); assert($object instanceof ResultPrinter); @@ -1252,8 +1232,8 @@ final class TestRunner extends BaseTestRunner $this->write( sprintf( "\nGenerating code coverage report in %s format ... ", - $format - ) + $format, + ), ); $this->timer->start(); @@ -1264,8 +1244,8 @@ final class TestRunner extends BaseTestRunner $this->write( sprintf( "done [%s]\n", - $this->timer->stop()->asString() - ) + $this->timer->stop()->asString(), + ), ); } @@ -1275,8 +1255,8 @@ final class TestRunner extends BaseTestRunner sprintf( "failed [%s]\n%s\n", $this->timer->stop()->asString(), - $e->getMessage() - ) + $e->getMessage(), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php b/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php index 8a703aee..a0ea593a 100644 --- a/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php +++ b/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php @@ -45,22 +45,22 @@ final class TestSuiteMapper $testSuite = new TestSuiteObject($testSuiteConfiguration->name()); $testSuiteEmpty = true; + $exclude = []; + + foreach ($testSuiteConfiguration->exclude()->asArray() as $file) { + $exclude[] = $file->path(); + } + foreach ($testSuiteConfiguration->directories() as $directory) { if (!version_compare(PHP_VERSION, $directory->phpVersion(), $directory->phpVersionOperator()->asString())) { continue; } - $exclude = []; - - foreach ($testSuiteConfiguration->exclude()->asArray() as $file) { - $exclude[] = $file->path(); - } - $files = (new Facade)->getFilesAsArray( $directory->path(), $directory->suffix(), $directory->prefix(), - $exclude + $exclude, ); if (!empty($files)) { @@ -95,8 +95,8 @@ final class TestSuiteMapper } catch (FrameworkException $e) { throw new RuntimeException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php index 33cbea32..191113c6 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php @@ -24,6 +24,7 @@ use PHPUnit\TextUI\XmlConfiguration\FileCollection; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class CodeCoverage @@ -149,7 +150,7 @@ final class CodeCoverage { if (!$this->hasCacheDirectory()) { throw new Exception( - 'No cache directory has been configured' + 'No cache directory has been configured', ); } @@ -221,7 +222,7 @@ final class CodeCoverage { if (!$this->hasClover()) { throw new Exception( - 'Code Coverage report "Clover XML" has not been configured' + 'Code Coverage report "Clover XML" has not been configured', ); } @@ -243,7 +244,7 @@ final class CodeCoverage { if (!$this->hasCobertura()) { throw new Exception( - 'Code Coverage report "Cobertura XML" has not been configured' + 'Code Coverage report "Cobertura XML" has not been configured', ); } @@ -265,7 +266,7 @@ final class CodeCoverage { if (!$this->hasCrap4j()) { throw new Exception( - 'Code Coverage report "Crap4J" has not been configured' + 'Code Coverage report "Crap4J" has not been configured', ); } @@ -287,7 +288,7 @@ final class CodeCoverage { if (!$this->hasHtml()) { throw new Exception( - 'Code Coverage report "HTML" has not been configured' + 'Code Coverage report "HTML" has not been configured', ); } @@ -309,7 +310,7 @@ final class CodeCoverage { if (!$this->hasPhp()) { throw new Exception( - 'Code Coverage report "PHP" has not been configured' + 'Code Coverage report "PHP" has not been configured', ); } @@ -331,7 +332,7 @@ final class CodeCoverage { if (!$this->hasText()) { throw new Exception( - 'Code Coverage report "Text" has not been configured' + 'Code Coverage report "Text" has not been configured', ); } @@ -353,7 +354,7 @@ final class CodeCoverage { if (!$this->hasXml()) { throw new Exception( - 'Code Coverage report "XML" has not been configured' + 'Code Coverage report "XML" has not been configured', ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php index 3bf99c39..91659f4d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Directory diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php index 803ccda2..88ec1e38 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class DirectoryCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php index c59a3ba9..f2fee25d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class DirectoryCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php index 102c96eb..82be6032 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php @@ -22,7 +22,7 @@ final class FilterMapper $filter->includeDirectory( $directory->path(), $directory->suffix(), - $directory->prefix() + $directory->prefix(), ); } @@ -34,7 +34,7 @@ final class FilterMapper $filter->excludeDirectory( $directory->path(), $directory->suffix(), - $directory->prefix() + $directory->prefix(), ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php index e7ff407b..b1094ec3 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Clover diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php index e6ee7c9f..f831ac09 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Cobertura diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php index fd4d4291..4904775d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Crap4j diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php index 7084ffe5..ce3d0284 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Html diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php index d86b6621..dc5d32ea 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Php diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php index b7e9f3da..cb7470d3 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Text diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php index 977685c4..34073bd5 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Xml diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php index 8f102e3b..4067e2f8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php @@ -15,6 +15,7 @@ use PHPUnit\Util\Xml\ValidationResult; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Configuration diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php index 1629603b..b0fdf64f 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Directory diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php index c8ae5964..cb840892 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class DirectoryCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php index 7f354eea..4b092744 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class DirectoryCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php index 0af5000d..6bdd1c24 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class File diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php index bfc1e33e..60e7e401 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class FileCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php index d9bab1f8..0ce4273d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class FileCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php index cc77b1a3..9f6a812a 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php @@ -67,7 +67,7 @@ EOT; $srcDirectory, $cacheDirectory, ], - self::TEMPLATE + self::TEMPLATE, ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php index e5984405..bb0d9252 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Group diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php index 2ad9fef6..735d8af1 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php @@ -13,7 +13,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class GroupCollection implements IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php index 0755fdac..843a708e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class GroupCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php index 9004fe43..0604ce32 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Groups diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php index d705a605..7a7786b6 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php @@ -26,6 +26,7 @@ use function substr; use function trim; use DOMDocument; use DOMElement; +use DOMNode; use DOMNodeList; use DOMXPath; use PHPUnit\Runner\TestSuiteSorter; @@ -72,8 +73,8 @@ final class Loader } catch (XmlException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } @@ -84,8 +85,8 @@ final class Loader } catch (XmlException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } @@ -100,7 +101,7 @@ final class Loader $this->logging($filename, $xpath), $this->php($filename, $xpath), $this->phpunit($filename, $document), - $this->testSuite($filename, $xpath) + $this->testSuite($filename, $xpath), ); } @@ -118,9 +119,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -132,9 +133,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -146,9 +147,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -160,9 +161,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -174,9 +175,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -188,9 +189,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -200,7 +201,7 @@ final class Loader $teamCity, $testDoxHtml, $testDoxText, - $testDoxXml + $testDoxXml, ); } @@ -228,42 +229,42 @@ final class Loader switch ($type) { case 'plain': $text = new Text( - new File($target) + new File($target), ); break; case 'junit': $junit = new Junit( - new File($target) + new File($target), ); break; case 'teamcity': $teamCity = new TeamCity( - new File($target) + new File($target), ); break; case 'testdox-html': $testDoxHtml = new TestDoxHtml( - new File($target) + new File($target), ); break; case 'testdox-text': $testDoxText = new TestDoxText( - new File($target) + new File($target), ); break; case 'testdox-xml': $testDoxXml = new TestDoxXml( - new File($target) + new File($target), ); break; @@ -276,7 +277,7 @@ final class Loader $teamCity, $testDoxHtml, $testDoxText, - $testDoxXml + $testDoxXml, ); } @@ -304,7 +305,7 @@ final class Loader $file = $this->toAbsolutePath( $filename, (string) $element->getAttribute('file'), - true + true, ); } @@ -402,38 +403,38 @@ final class Loader if ($cacheDirectory !== null) { $cacheDirectory = new Directory( - $this->toAbsolutePath($filename, $cacheDirectory) + $this->toAbsolutePath($filename, $cacheDirectory), ); } $pathCoverage = $this->getBooleanAttribute( $element, 'pathCoverage', - false + false, ); $includeUncoveredFiles = $this->getBooleanAttribute( $element, 'includeUncoveredFiles', - true + true, ); $processUncoveredFiles = $this->getBooleanAttribute( $element, 'processUncoveredFiles', - false + false, ); $ignoreDeprecatedCodeUnits = $this->getBooleanAttribute( $element, 'ignoreDeprecatedCodeUnits', - false + false, ); $disableCodeCoverageIgnore = $this->getBooleanAttribute( $element, 'disableCodeCoverageIgnore', - false + false, ); } @@ -445,9 +446,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -459,9 +460,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -473,10 +474,10 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), ), - $this->getIntegerAttribute($element, 'threshold', 30) + $this->getIntegerAttribute($element, 'threshold', 30), ); } @@ -488,11 +489,11 @@ final class Loader new Directory( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputDirectory') - ) + (string) $this->getStringAttribute($element, 'outputDirectory'), + ), ), $this->getIntegerAttribute($element, 'lowUpperBound', 50), - $this->getIntegerAttribute($element, 'highLowerBound', 90) + $this->getIntegerAttribute($element, 'highLowerBound', 90), ); } @@ -504,9 +505,9 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), + ), ); } @@ -518,11 +519,11 @@ final class Loader new File( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputFile') - ) + (string) $this->getStringAttribute($element, 'outputFile'), + ), ), $this->getBooleanAttribute($element, 'showUncoveredFiles', false), - $this->getBooleanAttribute($element, 'showOnlySummary', false) + $this->getBooleanAttribute($element, 'showOnlySummary', false), ); } @@ -534,9 +535,9 @@ final class Loader new Directory( $this->toAbsolutePath( $filename, - (string) $this->getStringAttribute($element, 'outputDirectory') - ) - ) + (string) $this->getStringAttribute($element, 'outputDirectory'), + ), + ), ); } @@ -557,7 +558,7 @@ final class Loader $html, $php, $text, - $xml + $xml, ); } @@ -569,13 +570,13 @@ final class Loader $ignoreDeprecatedCodeUnits = $this->getBooleanAttribute( $document->documentElement, 'ignoreDeprecatedCodeUnitsFromCodeCoverage', - false + false, ); $disableCodeCoverageIgnore = $this->getBooleanAttribute( $document->documentElement, 'disableCodeCoverageIgnore', - false + false, ); $includeUncoveredFiles = true; @@ -587,14 +588,14 @@ final class Loader if ($element->hasAttribute('addUncoveredFilesFromWhitelist')) { $includeUncoveredFiles = (bool) $this->getBoolean( (string) $element->getAttribute('addUncoveredFilesFromWhitelist'), - true + true, ); } if ($element->hasAttribute('processUncoveredFilesFromWhitelist')) { $processUncoveredFiles = (bool) $this->getBoolean( (string) $element->getAttribute('processUncoveredFilesFromWhitelist'), - false + false, ); } } @@ -622,14 +623,14 @@ final class Loader switch ($type) { case 'coverage-clover': $clover = new Clover( - new File($target) + new File($target), ); break; case 'coverage-cobertura': $cobertura = new Cobertura( - new File($target) + new File($target), ); break; @@ -637,7 +638,7 @@ final class Loader case 'coverage-crap4j': $crap4j = new Crap4j( new File($target), - $this->getIntegerAttribute($log, 'threshold', 30) + $this->getIntegerAttribute($log, 'threshold', 30), ); break; @@ -646,14 +647,14 @@ final class Loader $html = new CodeCoverageHtml( new Directory($target), $this->getIntegerAttribute($log, 'lowUpperBound', 50), - $this->getIntegerAttribute($log, 'highLowerBound', 90) + $this->getIntegerAttribute($log, 'highLowerBound', 90), ); break; case 'coverage-php': $php = new CodeCoveragePhp( - new File($target) + new File($target), ); break; @@ -662,14 +663,14 @@ final class Loader $text = new CodeCoverageText( new File($target), $this->getBooleanAttribute($log, 'showUncoveredFiles', false), - $this->getBooleanAttribute($log, 'showOnlySummary', false) + $this->getBooleanAttribute($log, 'showOnlySummary', false), ); break; case 'coverage-xml': $xml = new CodeCoverageXml( - new Directory($target) + new Directory($target), ); break; @@ -693,7 +694,7 @@ final class Loader $html, $php, $text, - $xml + $xml, ); } @@ -737,7 +738,7 @@ final class Loader $this->toAbsolutePath($filename, $directoryPath), $directoryNode->hasAttribute('prefix') ? (string) $directoryNode->getAttribute('prefix') : '', $directoryNode->hasAttribute('suffix') ? (string) $directoryNode->getAttribute('suffix') : '.php', - $directoryNode->hasAttribute('group') ? (string) $directoryNode->getAttribute('group') : 'DEFAULT' + $directoryNode->hasAttribute('group') ? (string) $directoryNode->getAttribute('group') : 'DEFAULT', ); } @@ -749,6 +750,8 @@ final class Loader $files = []; foreach ($xpath->query($query) as $file) { + assert($file instanceof DOMNode); + $filePath = (string) $file->textContent; if ($filePath) { @@ -775,16 +778,20 @@ final class Loader $exclude = []; foreach ($xpath->query($root . '/include/group') as $group) { + assert($group instanceof DOMNode); + $include[] = new Group((string) $group->textContent); } foreach ($xpath->query($root . '/exclude/group') as $group) { + assert($group instanceof DOMNode); + $exclude[] = new Group((string) $group->textContent); } return new Groups( GroupCollection::fromArray($include), - GroupCollection::fromArray($exclude) + GroupCollection::fromArray($exclude), ); } @@ -809,7 +816,7 @@ final class Loader return (bool) $this->getBoolean( (string) $element->getAttribute($attribute), - false + false, ); } @@ -821,7 +828,7 @@ final class Loader return $this->getInteger( (string) $element->getAttribute($attribute), - $default + $default, ); } @@ -848,6 +855,8 @@ final class Loader $includePaths = []; foreach ($xpath->query('php/includePath') as $includePath) { + assert($includePath instanceof DOMNode); + $path = (string) $includePath->textContent; if ($path) { @@ -862,7 +871,7 @@ final class Loader $iniSettings[] = new IniSetting( (string) $ini->getAttribute('name'), - (string) $ini->getAttribute('value') + (string) $ini->getAttribute('value'), ); } @@ -875,7 +884,7 @@ final class Loader $constants[] = new Constant( (string) $const->getAttribute('name'), - $this->getBoolean($value, $value) + $this->getBoolean($value, $value), ); } @@ -1077,7 +1086,7 @@ final class Loader $this->getBooleanAttribute($document->documentElement, 'backupGlobals', false), $this->getBooleanAttribute($document->documentElement, 'backupStaticAttributes', false), $this->getBooleanAttribute($document->documentElement, 'registerMockObjectsFromTestArgumentsRecursively', false), - $conflictBetweenPrinterClassAndTestdox + $conflictBetweenPrinterClassAndTestdox, ); } @@ -1171,7 +1180,7 @@ final class Loader $prefix, $suffix, $phpVersion, - $phpVersionOperator + $phpVersionOperator, ); } @@ -1201,7 +1210,7 @@ final class Loader $files[] = new TestFile( $this->toAbsolutePath($filename, $file), $phpVersion, - $phpVersionOperator + $phpVersionOperator, ); } @@ -1209,7 +1218,7 @@ final class Loader (string) $element->getAttribute('name'), TestDirectoryCollection::fromArray($directories), TestFileCollection::fromArray($files), - FileCollection::fromArray($exclude) + FileCollection::fromArray($exclude), ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php index efde962d..9fca1852 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Junit diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php index cdceced5..bce03019 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php @@ -16,6 +16,7 @@ use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml as TestDoxXml; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Logging diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php index 03b2b56a..804a7ea6 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class TeamCity diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php index 310040b2..5b198352 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Html diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php index 59d37e9b..5c742d3a 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Text diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php index b8c1576c..92dd3b7b 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Xml diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php index 2769ec96..fd37942f 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php @@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Text diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php index abef49f1..a6b26423 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; -use function array_key_exists; -use function sprintf; use function version_compare; /** @@ -28,7 +26,7 @@ final class MigrationBuilder IntroduceCoverageElement::class, MoveAttributesFromRootToCoverage::class, MoveAttributesFromFilterWhitelistToCoverage::class, - MoveWhitelistDirectoriesToCoverage::class, + MoveWhitelistIncludesToCoverage::class, MoveWhitelistExcludesToCoverage::class, RemoveEmptyFilter::class, CoverageCloverToReport::class, @@ -47,15 +45,6 @@ final class MigrationBuilder */ public function build(string $fromVersion): array { - if (!array_key_exists($fromVersion, self::AVAILABLE_MIGRATIONS)) { - throw new MigrationBuilderException( - sprintf( - 'Migration from schema version %s is not supported', - $fromVersion - ) - ); - } - $stack = []; foreach (self::AVAILABLE_MIGRATIONS as $version => $migrations) { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php index 3d3c767a..ebee6e91 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php @@ -9,11 +9,12 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; +use PHPUnit\Exception; use RuntimeException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MigrationBuilderException extends RuntimeException implements \PHPUnit\Exception +final class MigrationBuilderException extends RuntimeException implements Exception { } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php index f92b2db3..9fa4068c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php @@ -9,11 +9,12 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; +use PHPUnit\Exception; use RuntimeException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class MigrationException extends RuntimeException implements \PHPUnit\Exception +final class MigrationException extends RuntimeException implements Exception { } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php index 867a8441..de52857e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php @@ -22,7 +22,7 @@ final class IntroduceCoverageElement implements Migration $document->documentElement->insertBefore( $coverage, - $document->documentElement->firstChild + $document->documentElement->firstChild, ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php index e987308b..c07de0ec 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php @@ -67,7 +67,7 @@ abstract class LogToReportMigration implements Migration private function findLogNode(DOMDocument $document): ?DOMElement { $logNode = (new DOMXPath($document))->query( - sprintf('//logging/log[@type="%s"]', $this->forType()) + sprintf('//logging/log[@type="%s"]', $this->forType()), )->item(0); if (!$logNode instanceof DOMElement) { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistDirectoriesToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistDirectoriesToCoverage.php deleted file mode 100644 index 14e6cec8..00000000 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistDirectoriesToCoverage.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\TextUI\XmlConfiguration; - -use DOMDocument; -use DOMElement; -use PHPUnit\Util\Xml\SnapshotNodeList; - -/** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ -final class MoveWhitelistDirectoriesToCoverage implements Migration -{ - /** - * @throws MigrationException - */ - public function migrate(DOMDocument $document): void - { - $whitelist = $document->getElementsByTagName('whitelist')->item(0); - - if ($whitelist === null) { - return; - } - - $coverage = $document->getElementsByTagName('coverage')->item(0); - - if (!$coverage instanceof DOMElement) { - throw new MigrationException('Unexpected state - No coverage element'); - } - - $include = $document->createElement('include'); - $coverage->appendChild($include); - - foreach (SnapshotNodeList::fromNodeList($whitelist->childNodes) as $child) { - if (!$child instanceof DOMElement || $child->nodeName !== 'directory') { - continue; - } - - $include->appendChild($child); - } - } -} diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php index d8958cf4..17d5f4db 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; +use function assert; +use function in_array; use DOMDocument; use DOMElement; use PHPUnit\Util\Xml\SnapshotNodeList; @@ -45,7 +47,7 @@ final class MoveWhitelistExcludesToCoverage implements Migration if ($targetExclude === null) { $targetExclude = $coverage->appendChild( - $document->createElement('exclude') + $document->createElement('exclude'), ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php index 99a762b1..962ff13c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; +use function assert; use DOMDocument; use DOMElement; use PHPUnit\Util\Xml\SnapshotNodeList; @@ -27,6 +28,8 @@ final class RemoveLogTypes implements Migration } foreach (SnapshotNodeList::fromNodeList($logging->getElementsByTagName('log')) as $logNode) { + assert($logNode instanceof DOMElement); + switch ($logNode->getAttribute('type')) { case 'json': case 'tap': diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php index 2e86ab6e..ddcfcf07 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php @@ -21,7 +21,7 @@ final class UpdateSchemaLocationTo93 implements Migration $document->documentElement->setAttributeNS( 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation', - 'https://schema.phpunit.de/9.3/phpunit.xsd' + 'https://schema.phpunit.de/9.3/phpunit.xsd', ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php index d173e7af..57bc9f2e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php @@ -34,7 +34,7 @@ final class Migrator sprintf( '"%s" is not a valid PHPUnit XML configuration file that can be migrated', $filename, - ) + ), ); } @@ -42,7 +42,7 @@ final class Migrator $filename, false, true, - true + true, ); foreach ((new MigrationBuilder)->build($origin->version()) as $migration) { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php index e9b28b9e..6d4bc94c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Constant diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php index 51c14715..440b0b0b 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class ConstantCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php index c1c8d834..623de961 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class ConstantCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php index 58cf735b..4786618d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class IniSetting diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php index 216d85ae..28e40d93 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class IniSettingCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php index f31225e8..6c348b48 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class IniSettingCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php index 26897e35..c1e9c6fd 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Php diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php index 5fb0c72b..f5969945 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php @@ -52,7 +52,7 @@ final class PhpHandler 'include_path', implode(PATH_SEPARATOR, $includePathsAsStrings) . PATH_SEPARATOR . - ini_get('include_path') + ini_get('include_path'), ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php index c2684e28..37c572ae 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Variable diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php index e8499216..6662db64 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class VariableCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php index 3d594c1e..032d0be1 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class VariableCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php index 77c5b2d0..09fe8cc9 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php @@ -11,12 +11,14 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class Extension { /** * @var string + * * @psalm-var class-string */ private $className; diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php index 45be2eee..76d07ebc 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php @@ -13,7 +13,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class ExtensionCollection implements IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php index 4bd54be4..a9fc1af8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class ExtensionCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php index edf298dd..5b3ce9b8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class PHPUnit diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php index 263d02ea..ecefbb7c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php @@ -13,6 +13,7 @@ use PHPUnit\Util\VersionComparisonOperator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class TestDirectory diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php index 10111af0..5f581c21 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class TestDirectoryCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php index 11a48a24..b2312a38 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class TestDirectoryCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php index 2e69450c..21d1cf7b 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php @@ -13,6 +13,7 @@ use PHPUnit\Util\VersionComparisonOperator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class TestFile diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php index 791ddf71..27ba9bd2 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class TestFileCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php index b44c3689..45a5f160 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class TestFileCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php index 4a609821..035376cb 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class TestSuite diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php index 124609d7..f632e519 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php @@ -15,7 +15,10 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable + * + * @template-implements IteratorAggregate */ final class TestSuiteCollection implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php index 33b0f849..42d03db0 100644 --- a/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php +++ b/vendor/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php @@ -16,6 +16,8 @@ use Iterator; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements Iterator */ final class TestSuiteCollectionIterator implements Countable, Iterator { diff --git a/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php b/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php index 6aa06960..764bbbfb 100644 --- a/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php +++ b/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php @@ -67,17 +67,12 @@ final class DocBlock */ public const REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/'; - private const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; - + private const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; private const REGEX_REQUIRES_VERSION_CONSTRAINT = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\t \-.|~^]+)[ \t]*\r?$/m'; - - private const REGEX_REQUIRES_OS = '/@requires\s+(?POS(?:FAMILY)?)\s+(?P.+?)[ \t]*\r?$/m'; - - private const REGEX_REQUIRES_SETTING = '/@requires\s+(?Psetting)\s+(?P([^ ]+?))\s*(?P[\w\.-]+[\w\.]?)?[ \t]*\r?$/m'; - - private const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^\s<>=!]+))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; - - private const REGEX_TEST_WITH = '/@testWith\s+/'; + private const REGEX_REQUIRES_OS = '/@requires\s+(?POS(?:FAMILY)?)\s+(?P.+?)[ \t]*\r?$/m'; + private const REGEX_REQUIRES_SETTING = '/@requires\s+(?Psetting)\s+(?P([^ ]+?))\s*(?P[\w\.-]+[\w\.]?)?[ \t]*\r?$/m'; + private const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^\s<>=!]+))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; + private const REGEX_TEST_WITH = '/@testWith\s+/'; /** @var string */ private $docComment; @@ -133,7 +128,7 @@ final class DocBlock $class->getEndLine(), $class->getFileName(), $className, - $className + $className, ); } @@ -150,7 +145,7 @@ final class DocBlock $method->getEndLine(), $method->getFileName(), $method->getName(), - $classNameInHierarchy + $classNameInHierarchy, ); } @@ -268,7 +263,7 @@ final class DocBlock array_filter([ 'setting' => $recordedSettings, 'extension_versions' => $extensionVersions, - ]) + ]), ); } @@ -295,8 +290,8 @@ final class DocBlock throw new InvalidDataSetException( sprintf( 'Data set %s is invalid.', - is_int($key) ? '#' . $key : '"' . $key . '"' - ) + is_int($key) ? '#' . $key : '"' . $key . '"', + ), ); } } @@ -404,14 +399,14 @@ final class DocBlock $dataProviderClass = new ReflectionClass($dataProviderClassName); $dataProviderMethod = $dataProviderClass->getMethod( - $dataProviderMethodName + $dataProviderMethodName, ); // @codeCoverageIgnoreStart } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); // @codeCoverageIgnoreEnd } @@ -440,8 +435,8 @@ final class DocBlock sprintf( 'The key "%s" has already been defined in the data provider "%s".', $key, - $match - ) + $match, + ), ); } else { $data[$key] = $value; @@ -483,7 +478,7 @@ final class DocBlock if (json_last_error() !== JSON_ERROR_NONE) { throw new Exception( - 'The data set for the @testWith annotation cannot be parsed: ' . json_last_error_msg() + 'The data set for the @testWith annotation cannot be parsed: ' . json_last_error_msg(), ); } @@ -499,9 +494,9 @@ final class DocBlock private function cleanUpMultiLineAnnotation(string $docComment): string { - //removing initial ' * ' for docComment + // removing initial ' * ' for docComment $docComment = str_replace("\r\n", "\n", $docComment); - $docComment = preg_replace('/' . '\n' . '\s*' . '\*' . '\s?' . '/', "\n", $docComment); + $docComment = preg_replace('/\n\s*\*\s?/', "\n", $docComment); $docComment = (string) substr($docComment, 0, -1); return rtrim($docComment, "\n"); @@ -538,14 +533,14 @@ final class DocBlock { return self::parseDocBlock((string) $trait->getDocComment()); }, - array_values($reflector->getTraits()) - ) + array_values($reflector->getTraits()), + ), ); } return array_merge( $annotations, - self::parseDocBlock((string) $reflector->getDocComment()) + self::parseDocBlock((string) $reflector->getDocComment()), ); } } diff --git a/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php b/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php index 8df14cfc..a34cb9ad 100644 --- a/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php +++ b/vendor/phpunit/phpunit/src/Util/Annotation/Registry.php @@ -43,6 +43,7 @@ final class Registry /** * @throws Exception + * * @psalm-param class-string $class */ public function forClassName(string $class): DocBlock @@ -57,8 +58,8 @@ final class Registry } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -68,6 +69,7 @@ final class Registry /** * @throws Exception + * * @psalm-param class-string $classInHierarchy */ public function forMethod(string $classInHierarchy, string $method): DocBlock @@ -82,8 +84,8 @@ final class Registry } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Util/Color.php b/vendor/phpunit/phpunit/src/Util/Color.php index b96eb474..ee0f412d 100644 --- a/vendor/phpunit/phpunit/src/Util/Color.php +++ b/vendor/phpunit/phpunit/src/Util/Color.php @@ -120,7 +120,7 @@ final class Color { return self::dim($matches[0]); }, - $path[$last] + $path[$last], ); } diff --git a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php index f8566347..3bdf9bf1 100644 --- a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php +++ b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php @@ -64,7 +64,7 @@ final class ErrorHandler } return false; - } + }, ); $result = $callable(); diff --git a/vendor/phpunit/phpunit/src/Util/ExcludeList.php b/vendor/phpunit/phpunit/src/Util/ExcludeList.php index c7e6704a..d539ec57 100644 --- a/vendor/phpunit/phpunit/src/Util/ExcludeList.php +++ b/vendor/phpunit/phpunit/src/Util/ExcludeList.php @@ -23,14 +23,9 @@ use DeepCopy\DeepCopy; use Doctrine\Instantiator\Instantiator; use PharIo\Manifest\Manifest; use PharIo\Version\Version as PharIoVersion; -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\Project; -use phpDocumentor\Reflection\Type; use PhpParser\Parser; use PHPUnit\Framework\TestCase; -use Prophecy\Prophet; use ReflectionClass; -use ReflectionException; use SebastianBergmann\CliParser\Parser as CliParser; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeUnit\CodeUnit; @@ -45,15 +40,14 @@ use SebastianBergmann\GlobalState\Snapshot; use SebastianBergmann\Invoker\Invoker; use SebastianBergmann\LinesOfCode\Counter; use SebastianBergmann\ObjectEnumerator\Enumerator; +use SebastianBergmann\ObjectReflector\ObjectReflector; use SebastianBergmann\RecursionContext\Context; use SebastianBergmann\ResourceOperations\ResourceOperations; use SebastianBergmann\Template\Template; use SebastianBergmann\Timer\Timer; use SebastianBergmann\Type\TypeName; use SebastianBergmann\Version; -use Symfony\Polyfill\Ctype\Ctype; use TheSeer\Tokenizer\Tokenizer; -use Webmozart\Assert\Assert; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit @@ -82,18 +76,9 @@ final class ExcludeList // phar-io/version PharIoVersion::class => 1, - // phpdocumentor/reflection-common - Project::class => 1, - - // phpdocumentor/reflection-docblock - DocBlock::class => 1, - // phpdocumentor/type-resolver Type::class => 1, - // phpspec/prophecy - Prophet::class => 1, - // phpunit/phpunit TestCase::class => 2, @@ -145,6 +130,9 @@ final class ExcludeList // sebastian/object-enumerator Enumerator::class => 1, + // sebastian/object-reflector + ObjectReflector::class => 1, + // sebastian/recursion-context Context::class => 1, @@ -157,20 +145,19 @@ final class ExcludeList // sebastian/version Version::class => 1, - // symfony/polyfill-ctype - Ctype::class => 1, - // theseer/tokenizer Tokenizer::class => 1, - - // webmozart/assert - Assert::class => 1, ]; /** * @var string[] */ - private static $directories; + private static $directories = []; + + /** + * @var bool + */ + private static $initialized = false; public static function addDirectory(string $directory): void { @@ -178,8 +165,8 @@ final class ExcludeList throw new Exception( sprintf( '"%s" is not a directory', - $directory - ) + $directory, + ), ); } @@ -223,39 +210,31 @@ final class ExcludeList */ private function initialize(): void { - if (self::$directories === null) { - self::$directories = []; - - foreach (self::EXCLUDED_CLASS_NAMES as $className => $parent) { - if (!class_exists($className)) { - continue; - } - - try { - $directory = (new ReflectionClass($className))->getFileName(); - // @codeCoverageIgnoreStart - } catch (ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - // @codeCoverageIgnoreEnd - - for ($i = 0; $i < $parent; $i++) { - $directory = dirname($directory); - } - - self::$directories[] = $directory; - } - - // Hide process isolation workaround on Windows. - if (DIRECTORY_SEPARATOR === '\\') { - // tempnam() prefix is limited to first 3 chars. - // @see https://php.net/manual/en/function.tempnam.php - self::$directories[] = sys_get_temp_dir() . '\\PHP'; - } + if (self::$initialized) { + return; } + + foreach (self::EXCLUDED_CLASS_NAMES as $className => $parent) { + if (!class_exists($className)) { + continue; + } + + $directory = (new ReflectionClass($className))->getFileName(); + + for ($i = 0; $i < $parent; $i++) { + $directory = dirname($directory); + } + + self::$directories[] = $directory; + } + + // Hide process isolation workaround on Windows. + if (DIRECTORY_SEPARATOR === '\\') { + // tempnam() prefix is limited to first 3 chars. + // @see https://php.net/manual/en/function.tempnam.php + self::$directories[] = sys_get_temp_dir() . '\\PHP'; + } + + self::$initialized = true; } } diff --git a/vendor/phpunit/phpunit/src/Util/FileLoader.php b/vendor/phpunit/phpunit/src/Util/FileLoader.php index 73287072..e0a66506 100644 --- a/vendor/phpunit/phpunit/src/Util/FileLoader.php +++ b/vendor/phpunit/phpunit/src/Util/FileLoader.php @@ -42,7 +42,7 @@ final class FileLoader $includePathFilename === $localFile || !self::isReadable($includePathFilename)) { throw new Exception( - sprintf('Cannot open file "%s".' . "\n", $filename) + sprintf('Cannot open file "%s".' . "\n", $filename), ); } @@ -60,6 +60,7 @@ final class FileLoader /** * @noinspection PhpIncludeInspection + * * @psalm-suppress UnresolvableInclude */ include_once $filename; diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php index 35b2690b..886829d2 100644 --- a/vendor/phpunit/phpunit/src/Util/Filesystem.php +++ b/vendor/phpunit/phpunit/src/Util/Filesystem.php @@ -30,7 +30,7 @@ final class Filesystem return str_replace( ['_', '\\'], DIRECTORY_SEPARATOR, - $className + $className, ) . '.php'; } diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php index 42563937..94b7e77d 100644 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ b/vendor/phpunit/phpunit/src/Util/Filter.php @@ -53,7 +53,7 @@ final class Filter if (!self::frameExists($eTrace, $eFile, $eLine)) { array_unshift( $eTrace, - ['file' => $eFile, 'line' => $eLine] + ['file' => $eFile, 'line' => $eLine], ); } @@ -65,7 +65,7 @@ final class Filter $filteredStacktrace .= sprintf( "%s:%s\n", $frame['file'], - $frame['line'] ?? '?' + $frame['line'] ?? '?', ); } } diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php index cc5c2228..18b5a646 100644 --- a/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ b/vendor/phpunit/phpunit/src/Util/GlobalState.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Util; +use const PHP_MAJOR_VERSION; +use const PHP_MINOR_VERSION; use function array_keys; use function array_reverse; use function array_shift; @@ -47,6 +49,79 @@ final class GlobalState '_REQUEST', ]; + /** + * @psalm-var array> + */ + private const DEPRECATED_INI_SETTINGS = [ + '7.3' => [ + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.func_overload' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + 'string.strip_tags' => true, + ], + + '7.4' => [ + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.func_overload' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + 'pdo_odbc.db2_instance_name' => true, + 'string.strip_tags' => true, + ], + + '8.0' => [ + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + ], + + '8.1' => [ + 'auto_detect_line_endings' => true, + 'filter.default' => true, + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + 'oci8.old_oci_close_semantics' => true, + ], + + '8.2' => [ + 'auto_detect_line_endings' => true, + 'filter.default' => true, + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + 'oci8.old_oci_close_semantics' => true, + ], + + '8.3' => [ + 'auto_detect_line_endings' => true, + 'filter.default' => true, + 'iconv.input_encoding' => true, + 'iconv.output_encoding' => true, + 'iconv.internal_encoding' => true, + 'mbstring.http_input' => true, + 'mbstring.http_output' => true, + 'mbstring.internal_encoding' => true, + 'oci8.old_oci_close_semantics' => true, + ], + ]; + /** * @throws Exception */ @@ -106,10 +181,14 @@ final class GlobalState $result = ''; foreach (ini_get_all(null, false) as $key => $value) { + if (self::isIniSettingDeprecated($key)) { + continue; + } + $result .= sprintf( '@ini_set(%s, %s);' . "\n", self::exportVariable($key), - self::exportVariable((string) $value) + self::exportVariable((string) $value), ); } @@ -127,7 +206,7 @@ final class GlobalState 'if (!defined(\'%s\')) define(\'%s\', %s);' . "\n", $name, $name, - self::exportVariable($value) + self::exportVariable($value), ); } } @@ -150,7 +229,7 @@ final class GlobalState '$GLOBALS[\'%s\'][\'%s\'] = %s;' . "\n", $superGlobalArray, $key, - self::exportVariable($GLOBALS[$superGlobalArray][$key]) + self::exportVariable($GLOBALS[$superGlobalArray][$key]), ); } } @@ -164,7 +243,7 @@ final class GlobalState $result .= sprintf( '$GLOBALS[\'%s\'] = %s;' . "\n", $key, - self::exportVariable($GLOBALS[$key]) + self::exportVariable($GLOBALS[$key]), ); } } @@ -200,4 +279,9 @@ final class GlobalState return $result; } + + private static function isIniSettingDeprecated(string $iniSetting): bool + { + return isset(self::DEPRECATED_INI_SETTINGS[PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION][$iniSetting]); + } } diff --git a/vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php b/vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php index 3493d113..13dcc0e0 100644 --- a/vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php +++ b/vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php @@ -9,11 +9,12 @@ */ namespace PHPUnit\Util; +use PHPUnit\Exception; use RuntimeException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ -final class InvalidDataSetException extends RuntimeException implements \PHPUnit\Exception +final class InvalidDataSetException extends RuntimeException implements Exception { } diff --git a/vendor/phpunit/phpunit/src/Util/Json.php b/vendor/phpunit/phpunit/src/Util/Json.php index 752c1fd6..0428bc03 100644 --- a/vendor/phpunit/phpunit/src/Util/Json.php +++ b/vendor/phpunit/phpunit/src/Util/Json.php @@ -29,7 +29,7 @@ final class Json /** * Prettify json string. * - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public static function prettify(string $json): string { @@ -37,7 +37,7 @@ final class Json if (json_last_error()) { throw new Exception( - 'Cannot prettify invalid json' + 'Cannot prettify invalid json', ); } diff --git a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php index 7a97682f..c7ba4fc5 100644 --- a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php +++ b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php @@ -226,37 +226,37 @@ final class JUnit extends Printer implements TestListener { $this->testSuites[$this->testSuiteLevel]->setAttribute( 'tests', - (string) $this->testSuiteTests[$this->testSuiteLevel] + (string) $this->testSuiteTests[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'assertions', - (string) $this->testSuiteAssertions[$this->testSuiteLevel] + (string) $this->testSuiteAssertions[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'errors', - (string) $this->testSuiteErrors[$this->testSuiteLevel] + (string) $this->testSuiteErrors[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'warnings', - (string) $this->testSuiteWarnings[$this->testSuiteLevel] + (string) $this->testSuiteWarnings[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'failures', - (string) $this->testSuiteFailures[$this->testSuiteLevel] + (string) $this->testSuiteFailures[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'skipped', - (string) $this->testSuiteSkipped[$this->testSuiteLevel] + (string) $this->testSuiteSkipped[$this->testSuiteLevel], ); $this->testSuites[$this->testSuiteLevel]->setAttribute( 'time', - sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]) + sprintf('%F', $this->testSuiteTimes[$this->testSuiteLevel]), ); if ($this->testSuiteLevel > 1) { @@ -292,8 +292,8 @@ final class JUnit extends Printer implements TestListener } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -307,8 +307,8 @@ final class JUnit extends Printer implements TestListener } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -337,16 +337,16 @@ final class JUnit extends Printer implements TestListener $this->currentTestCase->setAttribute( 'assertions', - (string) $numAssertions + (string) $numAssertions, ); $this->currentTestCase->setAttribute( 'time', - sprintf('%F', $time) + sprintf('%F', $time), ); $this->testSuites[$this->testSuiteLevel]->appendChild( - $this->currentTestCase + $this->currentTestCase, ); $this->testSuiteTests[$this->testSuiteLevel]++; @@ -361,7 +361,7 @@ final class JUnit extends Printer implements TestListener if (!empty($testOutput)) { $systemOut = $this->document->createElement( 'system-out', - Xml::prepareString($testOutput) + Xml::prepareString($testOutput), ); $this->currentTestCase->appendChild($systemOut); @@ -392,12 +392,12 @@ final class JUnit extends Printer implements TestListener $buffer .= trim( TestFailure::exceptionToString($t) . "\n" . - Filter::getFilteredStacktrace($t) + Filter::getFilteredStacktrace($t), ); $fault = $this->document->createElement( $type, - Xml::prepareString($buffer) + Xml::prepareString($buffer), ); if ($t instanceof ExceptionWrapper) { diff --git a/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php b/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php index f800ba72..30375bd3 100644 --- a/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php +++ b/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php @@ -77,7 +77,7 @@ final class TeamCity extends DefaultResultPrinter 'message' => self::getMessage($t), 'details' => self::getDetails($t), 'duration' => self::toMilliseconds($time), - ] + ], ); } @@ -169,7 +169,7 @@ final class TeamCity extends DefaultResultPrinter 'message' => self::getMessage($t), 'details' => self::getDetails($t), 'duration' => self::toMilliseconds($time), - ] + ], ); } @@ -189,7 +189,7 @@ final class TeamCity extends DefaultResultPrinter $this->printEvent( 'testCount', - ['count' => count($suite)] + ['count' => count($suite)], ); } @@ -271,7 +271,7 @@ final class TeamCity extends DefaultResultPrinter [ 'name' => $test->getName(), 'duration' => self::toMilliseconds($time), - ] + ], ); } @@ -351,7 +351,7 @@ final class TeamCity extends DefaultResultPrinter return str_replace( ['|', "'", "\n", "\r", ']', '['], ['||', "|'", '|n', '|r', '|]', '|['], - $text + $text, ); } @@ -366,8 +366,8 @@ final class TeamCity extends DefaultResultPrinter } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php index 8706ae1a..9620846a 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php +++ b/vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php @@ -15,6 +15,8 @@ use function array_keys; use function array_merge; use function assert; use function escapeshellarg; +use function file_exists; +use function file_get_contents; use function ini_get_all; use function restore_error_handler; use function set_error_handler; @@ -24,6 +26,7 @@ use function strpos; use function strrpos; use function substr; use function trim; +use function unlink; use function unserialize; use __PHP_Incomplete_Class; use ErrorException; @@ -35,6 +38,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestFailure; use PHPUnit\Framework\TestResult; use SebastianBergmann\Environment\Runtime; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -172,26 +176,33 @@ abstract class AbstractPhpProcess /** * Runs a single test in a separate PHP process. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ - public function runTestJob(string $job, Test $test, TestResult $result): void + public function runTestJob(string $job, Test $test, TestResult $result, string $processResultFile): void { $result->startTest($test); - $_result = $this->runJob($job); + $processResult = ''; + $_result = $this->runJob($job); + + if (file_exists($processResultFile)) { + $processResult = file_get_contents($processResultFile); + + @unlink($processResultFile); + } $this->processChildResult( $test, $result, - $_result['stdout'], - $_result['stderr'] + $processResult, + $_result['stderr'], ); } /** * Returns the command based into the configurations. */ - public function getCommand(array $settings, string $file = null): string + public function getCommand(array $settings, ?string $file = null): string { $command = $this->runtime->getBinary(); @@ -199,15 +210,15 @@ abstract class AbstractPhpProcess $settings = array_merge( $settings, $this->runtime->getCurrentSettings( - array_keys(ini_get_all('pcov')) - ) + array_keys(ini_get_all('pcov')), + ), ); } elseif ($this->runtime->hasXdebug()) { $settings = array_merge( $settings, $this->runtime->getCurrentSettings( - array_keys(ini_get_all('xdebug')) - ) + array_keys(ini_get_all('xdebug')), + ), ); } @@ -258,7 +269,7 @@ abstract class AbstractPhpProcess /** * Processes the TestResult object from an isolated process. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function processChildResult(Test $test, TestResult $result, string $stdout, string $stderr): void { @@ -268,7 +279,7 @@ abstract class AbstractPhpProcess $result->addError( $test, new Exception(trim($stderr)), - $time + $time, ); } else { set_error_handler( @@ -278,7 +289,7 @@ abstract class AbstractPhpProcess static function ($errno, $errstr, $errfile, $errline): void { throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); - } + }, ); try { @@ -293,7 +304,7 @@ abstract class AbstractPhpProcess $result->addFailure( $test, new AssertionFailedError('Test was run in child process and ended unexpectedly'), - $time + $time, ); } } catch (ErrorException $e) { @@ -303,7 +314,7 @@ abstract class AbstractPhpProcess $result->addError( $test, new Exception(trim($stdout), 0, $e), - $time + $time, ); } @@ -322,7 +333,7 @@ abstract class AbstractPhpProcess if ($result->getCollectCodeCoverageInformation()) { $result->getCodeCoverage()->merge( - $childResult->getCodeCoverage() + $childResult->getCodeCoverage(), ); } @@ -338,37 +349,37 @@ abstract class AbstractPhpProcess $result->addError( $test, $this->getException($notImplemented[0]), - $time + $time, ); } elseif (!empty($risky)) { $result->addError( $test, $this->getException($risky[0]), - $time + $time, ); } elseif (!empty($skipped)) { $result->addError( $test, $this->getException($skipped[0]), - $time + $time, ); } elseif (!empty($errors)) { $result->addError( $test, $this->getException($errors[0]), - $time + $time, ); } elseif (!empty($warnings)) { $result->addWarning( $test, $this->getException($warnings[0]), - $time + $time, ); } elseif (!empty($failures)) { $result->addFailure( $test, $this->getException($failures[0]), - $time + $time, ); } } @@ -402,12 +413,12 @@ abstract class AbstractPhpProcess sprintf( '%s: %s', $exceptionArray['_PHP_Incomplete_Class_Name'], - $exceptionArray['message'] + $exceptionArray['message'], ), $exceptionArray['code'], $exceptionArray['file'], $exceptionArray['line'], - $exceptionArray['trace'] + $exceptionArray['trace'], ); } diff --git a/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php index c4dc1114..64974f1d 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php +++ b/vendor/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php @@ -49,7 +49,7 @@ class DefaultPhpProcess extends AbstractPhpProcess if (!($this->tempFile = tempnam(sys_get_temp_dir(), 'PHPUnit')) || file_put_contents($this->tempFile, $job) === false) { throw new Exception( - 'Unable to write temporary file' + 'Unable to write temporary file', ); } @@ -101,12 +101,12 @@ class DefaultPhpProcess extends AbstractPhpProcess $pipeSpec, $pipes, null, - $env + $env, ); if (!is_resource($process)) { throw new Exception( - 'Unable to spawn worker process' + 'Unable to spawn worker process', ); } @@ -138,8 +138,8 @@ class DefaultPhpProcess extends AbstractPhpProcess throw new Exception( sprintf( 'Job execution aborted after %d seconds', - $this->timeout - ) + $this->timeout, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl index 95035e50..0486d116 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl +++ b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseClass.tpl @@ -58,7 +58,7 @@ function __phpunit_run_isolated_test() $test = new {className}('{name}', unserialize('{data}'), '{dataName}'); $test->setDependencyInput(unserialize('{dependencyInput}')); - $test->setInIsolation(TRUE); + $test->setInIsolation(true); ob_end_clean(); $test->run($result); @@ -68,6 +68,7 @@ function __phpunit_run_isolated_test() } ini_set('xdebug.scream', '0'); + @rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */ if ($stdout = @stream_get_contents(STDOUT)) { $output = $stdout . $output; @@ -78,13 +79,16 @@ function __phpunit_run_isolated_test() } } - print serialize( - [ - 'testResult' => $test->getResult(), - 'numAssertions' => $test->getNumAssertions(), - 'result' => $result, - 'output' => $output - ] + file_put_contents( + '{processResultFile}', + serialize( + [ + 'testResult' => $test->getResult(), + 'numAssertions' => $test->getNumAssertions(), + 'result' => $result, + 'output' => $output + ] + ) ); } diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl index da824e72..067934db 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl +++ b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl @@ -71,6 +71,7 @@ function __phpunit_run_isolated_test() } ini_set('xdebug.scream', '0'); + @rewind(STDOUT); /* @ as not every STDOUT target stream is rewindable */ if ($stdout = @stream_get_contents(STDOUT)) { $output = $stdout . $output; @@ -81,13 +82,16 @@ function __phpunit_run_isolated_test() } } - print serialize( - [ - 'testResult' => $test->getResult(), - 'numAssertions' => $test->getNumAssertions(), - 'result' => $result, - 'output' => $output - ] + file_put_contents( + '{processResultFile}', + serialize( + [ + 'testResult' => $test->getResult(), + 'numAssertions' => $test->getNumAssertions(), + 'result' => $result, + 'output' => $output + ] + ) ); } diff --git a/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php b/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php index 9ef92555..338fea71 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php +++ b/vendor/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\Exception; */ final class WindowsPhpProcess extends DefaultPhpProcess { - public function getCommand(array $settings, string $file = null): string + public function getCommand(array $settings, ?string $file = null): string { if (PHP_MAJOR_VERSION < 8) { return '"' . parent::getCommand($settings, $file) . '"'; @@ -36,7 +36,7 @@ final class WindowsPhpProcess extends DefaultPhpProcess { if (false === $stdout_handle = tmpfile()) { throw new Exception( - 'A temporary file could not be created; verify that your TEMP environment variable is writable' + 'A temporary file could not be created; verify that your TEMP environment variable is writable', ); } diff --git a/vendor/phpunit/phpunit/src/Util/Printer.php b/vendor/phpunit/phpunit/src/Util/Printer.php index 77b5745a..311d4943 100644 --- a/vendor/phpunit/phpunit/src/Util/Printer.php +++ b/vendor/phpunit/phpunit/src/Util/Printer.php @@ -67,8 +67,8 @@ class Printer throw new Exception( sprintf( '"%s" does not match "socket://hostname:port" format', - $out - ) + $out, + ), ); } @@ -81,8 +81,8 @@ class Printer throw new Exception( sprintf( 'Directory "%s" was not created', - dirname($out) - ) + dirname($out), + ), ); } diff --git a/vendor/phpunit/phpunit/src/Util/RegularExpression.php b/vendor/phpunit/phpunit/src/Util/RegularExpression.php index db1dae92..1e97d6c2 100644 --- a/vendor/phpunit/phpunit/src/Util/RegularExpression.php +++ b/vendor/phpunit/phpunit/src/Util/RegularExpression.php @@ -25,7 +25,7 @@ final class RegularExpression static function () use ($pattern, $subject) { return preg_match($pattern, $subject); - } + }, ); } } diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php index 1de7e9d4..4d6319b9 100644 --- a/vendor/phpunit/phpunit/src/Util/Test.php +++ b/vendor/phpunit/phpunit/src/Util/Test.php @@ -37,7 +37,6 @@ use function strpos; use function strtolower; use function trim; use function version_compare; -use PHPUnit\Framework\Assert; use PHPUnit\Framework\CodeCoverageException; use PHPUnit\Framework\ExecutionOrderDependency; use PHPUnit\Framework\InvalidCoversTargetException; @@ -53,6 +52,7 @@ use SebastianBergmann\CodeUnit\CodeUnitCollection; use SebastianBergmann\CodeUnit\InvalidCodeUnitException; use SebastianBergmann\CodeUnit\Mapper; use SebastianBergmann\Environment\OperatingSystem; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -85,7 +85,7 @@ final class Test private static $hookMethods = []; /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public static function describe(\PHPUnit\Framework\Test $test): array { @@ -113,13 +113,14 @@ final class Test * @throws CodeCoverageException * * @return array|bool + * * @psalm-param class-string $className */ public static function getLinesToBeCovered(string $className, string $methodName) { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); if (!self::shouldCoversAnnotationBeUsed($annotations)) { @@ -133,6 +134,7 @@ final class Test * Returns lines of code specified with the @uses annotation. * * @throws CodeCoverageException + * * @psalm-param class-string $className */ public static function getLinesToBeUsed(string $className, string $methodName): array @@ -144,7 +146,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( get_class($test), - $test->getName(false) + $test->getName(false), ); // If there is no @covers annotation but a @coversNothing annotation on @@ -174,13 +176,14 @@ final class Test /** * @throws Exception + * * @psalm-param class-string $className */ public static function getRequirements(string $className, string $methodName): array { return self::mergeArraysRecursively( Registry::getInstance()->forClassName($className)->requirements(), - Registry::getInstance()->forMethod($className, $methodName)->requirements() + Registry::getInstance()->forMethod($className, $methodName)->requirements(), ); } @@ -189,6 +192,7 @@ final class Test * * @throws Exception * @throws Warning + * * @psalm-param class-string $className */ public static function getMissingRequirements(string $className, string $methodName): array @@ -210,7 +214,7 @@ final class Test if (!$required['PHP_constraint']['constraint']->complies($version)) { $missing[] = sprintf( 'PHP version does not match the required constraint %s.', - $required['PHP_constraint']['constraint']->asString() + $required['PHP_constraint']['constraint']->asString(), ); $hint = 'PHP_constraint'; @@ -232,7 +236,7 @@ final class Test if (!$required['PHPUnit_constraint']['constraint']->complies($phpunitVersion)) { $missing[] = sprintf( 'PHPUnit version does not match the required constraint %s.', - $required['PHPUnit_constraint']['constraint']->asString() + $required['PHPUnit_constraint']['constraint']->asString(), ); $hint = $hint ?? 'PHPUnit_constraint'; @@ -317,6 +321,7 @@ final class Test * Returns the provided data for a method. * * @throws Exception + * * @psalm-param class-string $className */ public static function getProvidedData(string $className, string $methodName): ?array @@ -327,7 +332,7 @@ final class Test /** * @psalm-param class-string $className */ - public static function parseTestMethodAnnotations(string $className, ?string $methodName = ''): array + public static function parseTestMethodAnnotations(string $className, ?string $methodName = null): array { $registry = Registry::getInstance(); @@ -363,12 +368,12 @@ final class Test 'backupGlobals' => self::getBooleanAnnotationSetting( $className, $methodName, - 'backupGlobals' + 'backupGlobals', ), 'backupStaticAttributes' => self::getBooleanAnnotationSetting( $className, $methodName, - 'backupStaticAttributes' + 'backupStaticAttributes', ), ]; } @@ -382,7 +387,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); $dependsAnnotations = $annotations['class']['depends'] ?? []; @@ -390,7 +395,7 @@ final class Test if (isset($annotations['method']['depends'])) { $dependsAnnotations = array_merge( $dependsAnnotations, - $annotations['method']['depends'] + $annotations['method']['depends'], ); } @@ -409,7 +414,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); $groups = []; @@ -488,7 +493,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); return isset($annotations['class']['runTestsInSeparateProcesses']) || isset($annotations['method']['runInSeparateProcess']); @@ -499,7 +504,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); return isset($annotations['class']['runClassInSeparateProcess']); @@ -511,7 +516,7 @@ final class Test return self::getBooleanAnnotationSetting( $className, $methodName, - 'preserveGlobalState' + 'preserveGlobalState', ); } @@ -526,22 +531,14 @@ final class Test self::$hookMethods[$className] = self::emptyHookMethodsArray(); try { - foreach ((new ReflectionClass($className))->getMethods() as $method) { - if ($method->getDeclaringClass()->getName() === Assert::class) { - continue; - } - - if ($method->getDeclaringClass()->getName() === TestCase::class) { - continue; - } - + foreach ((new Reflection)->methodsInTestClass(new ReflectionClass($className)) as $method) { $docBlock = Registry::getInstance()->forMethod($className, $method->getName()); if ($method->isStatic()) { if ($docBlock->isHookToBeExecutedBeforeClass()) { array_unshift( self::$hookMethods[$className]['beforeClass'], - $method->getName() + $method->getName(), ); } @@ -553,14 +550,14 @@ final class Test if ($docBlock->isToBeExecutedBeforeTest()) { array_unshift( self::$hookMethods[$className]['before'], - $method->getName() + $method->getName(), ); } if ($docBlock->isToBeExecutedAsPreCondition()) { array_unshift( self::$hookMethods[$className]['preCondition'], - $method->getName() + $method->getName(), ); } @@ -593,21 +590,22 @@ final class Test 'test', Registry::getInstance()->forMethod( $method->getDeclaringClass()->getName(), - $method->getName() + $method->getName(), ) - ->symbolAnnotations() + ->symbolAnnotations(), ); } /** * @throws CodeCoverageException + * * @psalm-param class-string $className */ private static function getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode): array { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); $classShortcut = null; @@ -618,8 +616,8 @@ final class Test sprintf( 'More than one @%sClass annotation in class or interface "%s".', $mode, - $className - ) + $className, + ), ); } @@ -648,8 +646,8 @@ final class Test throw new InvalidCoversTargetException( sprintf( 'Trying to @cover interface "%s".', - $element - ) + $element, + ), ); } @@ -660,10 +658,10 @@ final class Test sprintf( '"@%s %s" is invalid', $mode, - $element + $element, ), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } } @@ -688,7 +686,7 @@ final class Test { $annotations = self::parseTestMethodAnnotations( $className, - $methodName + $methodName, ); if (isset($annotations['method'][$settingName])) { @@ -723,7 +721,7 @@ final class Test return preg_replace( '/^(\d+\.\d+(?:.\d+)?).*$/', '$1', - $version + $version, ); } diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php index def16c39..3348957d 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php @@ -21,12 +21,16 @@ use function sprintf; use function strlen; use function strpos; use function trim; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; use PHPUnit\Framework\TestResult; use PHPUnit\Runner\BaseTestRunner; use PHPUnit\Runner\PhptTestCase; use PHPUnit\Util\Color; +use PHPUnit\Util\Filter; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use SebastianBergmann\Timer\ResourceUsageFormatter; use SebastianBergmann\Timer\Timer; use Throwable; @@ -66,7 +70,6 @@ class CliTestDoxPrinter extends TestDoxPrinter " \e[36m◑\e[0m running tests", " \e[36m◒\e[0m running tests", ]; - private const STATUS_STYLES = [ BaseTestRunner::STATUS_PASSED => [ 'symbol' => '✔', @@ -123,7 +126,7 @@ class CliTestDoxPrinter extends TestDoxPrinter * @param null|resource|string $out * @param int|string $numberOfColumns * - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct($out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, $numberOfColumns = 80, bool $reverse = false) { @@ -158,7 +161,7 @@ class CliTestDoxPrinter extends TestDoxPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function registerTestResult(Test $test, ?Throwable $t, int $status, float $time, bool $verbose): void { @@ -170,7 +173,7 @@ class CliTestDoxPrinter extends TestDoxPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function formatTestName(Test $test): string { @@ -206,7 +209,7 @@ class CliTestDoxPrinter extends TestDoxPrinter ' %s %s%s' . PHP_EOL, $this->colorizeTextBox($style['color'], $style['symbol']), $testName, - $this->verbose ? ' ' . $this->formatRuntime($result['time'], $style['color']) : '' + $this->verbose ? ' ' . $this->formatRuntime($result['time'], $style['color']) : '', ); $this->write($line); @@ -217,7 +220,7 @@ class CliTestDoxPrinter extends TestDoxPrinter protected function formatThrowable(Throwable $t, ?int $status = null): string { - return trim(\PHPUnit\Framework\TestFailure::exceptionToString($t)); + return trim(TestFailure::exceptionToString($t)); } protected function colorizeMessageAndDiff(string $style, string $buffer): array @@ -256,7 +259,7 @@ class CliTestDoxPrinter extends TestDoxPrinter protected function formatStacktrace(Throwable $t): string { - $trace = \PHPUnit\Util\Filter::getFilteredStacktrace($t); + $trace = Filter::getFilteredStacktrace($t); if (!$this->colors) { return $trace; diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php index 013d1de8..d08bfad4 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php @@ -29,26 +29,47 @@ final class HtmlResultPrinter extends ResultPrinter @@ -60,7 +81,7 @@ EOT; */ private const CLASS_HEADER = <<<'EOT' -

%s

+

%s

    EOT; @@ -101,9 +122,8 @@ EOT; $this->write( sprintf( self::CLASS_HEADER, - $name, - $this->currentTestClassPrettified - ) + $this->currentTestClassPrettified, + ), ); } @@ -114,11 +134,10 @@ EOT; { $this->write( sprintf( - "
  • %s %s
  • \n", - $success ? '#555753' : '#ef2929', - $success ? '✓' : '❌', - $name - ) + "
  • %s
  • \n", + $success ? 'success' : 'defect', + $name, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php b/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php index d2808a83..f67cff68 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php @@ -46,6 +46,7 @@ use ReflectionException; use ReflectionMethod; use ReflectionObject; use SebastianBergmann\Exporter\Exporter; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -118,13 +119,13 @@ final class NamePrettifier } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function prettifyTestCase(TestCase $test): string { $annotations = Test::parseTestMethodAnnotations( get_class($test), - $test->getName(false) + $test->getName(false), ); $annotationWithPlaceholders = false; @@ -232,7 +233,7 @@ final class NamePrettifier } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ private function mapTestMethodParameterNamesToProvidedDataValues(TestCase $test): array { @@ -242,8 +243,8 @@ final class NamePrettifier } catch (ReflectionException $e) { throw new UtilException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd @@ -262,8 +263,8 @@ final class NamePrettifier } catch (ReflectionException $e) { throw new UtilException( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php index c4b63644..841279e8 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php @@ -13,6 +13,7 @@ use function get_class; use function in_array; use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\ErrorTestCase; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; @@ -21,6 +22,7 @@ use PHPUnit\Framework\WarningTestCase; use PHPUnit\Runner\BaseTestRunner; use PHPUnit\TextUI\ResultPrinter as ResultPrinterInterface; use PHPUnit\Util\Printer; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Throwable; /** @@ -101,7 +103,7 @@ abstract class ResultPrinter extends Printer implements ResultPrinterInterface /** * @param resource $out * - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct($out = null, array $groups = [], array $excludeGroups = []) { @@ -220,7 +222,7 @@ abstract class ResultPrinter extends Printer implements ResultPrinterInterface /** * A test started. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function startTest(Test $test): void { diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php index bd64785c..9e1fdab1 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php @@ -17,15 +17,19 @@ use function method_exists; use function preg_split; use function trim; use PHPUnit\Framework\AssertionFailedError; +use PHPUnit\Framework\Exception; use PHPUnit\Framework\Reorderable; use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; use PHPUnit\Framework\TestResult; use PHPUnit\Framework\TestSuite; use PHPUnit\Framework\Warning; use PHPUnit\Runner\BaseTestRunner; use PHPUnit\Runner\PhptTestCase; use PHPUnit\TextUI\DefaultResultPrinter; +use PHPUnit\Util\Filter; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Throwable; /** @@ -82,7 +86,7 @@ class TestDoxPrinter extends DefaultResultPrinter * @param null|resource|string $out * @param int|string $numberOfColumns * - * @throws \PHPUnit\Framework\Exception + * @throws Exception */ public function __construct($out = null, bool $verbose = false, string $colors = self::COLOR_DEFAULT, bool $debug = false, $numberOfColumns = 80, bool $reverse = false) { @@ -107,7 +111,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function endTest(Test $test, float $time): void { @@ -127,7 +131,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addError(Test $test, Throwable $t, float $time): void { @@ -135,7 +139,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addWarning(Test $test, Warning $e, float $time): void { @@ -143,7 +147,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addFailure(Test $test, AssertionFailedError $e, float $time): void { @@ -151,7 +155,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addIncompleteTest(Test $test, Throwable $t, float $time): void { @@ -159,7 +163,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addRiskyTest(Test $test, Throwable $t, float $time): void { @@ -167,7 +171,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function addSkippedTest(Test $test, Throwable $t, float $time): void { @@ -185,7 +189,7 @@ class TestDoxPrinter extends DefaultResultPrinter } /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ protected function registerTestResult(Test $test, ?Throwable $t, int $status, float $time, bool $verbose): void { @@ -339,7 +343,7 @@ class TestDoxPrinter extends DefaultResultPrinter protected function formatThrowable(Throwable $t, ?int $status = null): string { - $message = trim(\PHPUnit\Framework\TestFailure::exceptionToString($t)); + $message = trim(TestFailure::exceptionToString($t)); if ($message) { $message .= PHP_EOL . PHP_EOL . $this->formatStacktrace($t); @@ -352,7 +356,7 @@ class TestDoxPrinter extends DefaultResultPrinter protected function formatStacktrace(Throwable $t): string { - return \PHPUnit\Util\Filter::getFilteredStacktrace($t); + return Filter::getFilteredStacktrace($t); } protected function formatTestResultMessage(Throwable $t, array $result, string $prefix = '│'): string @@ -381,8 +385,8 @@ class TestDoxPrinter extends DefaultResultPrinter { return ' ' . $prefix . ($text ? ' ' . $text : ''); }, - preg_split('/\r\n|\r|\n/', $message) - ) + preg_split('/\r\n|\r|\n/', $message), + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php index 911604e0..10b7bff7 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php @@ -27,6 +27,7 @@ use PHPUnit\Util\Printer; use PHPUnit\Util\Test as TestUtil; use ReflectionClass; use ReflectionException; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Throwable; /** @@ -151,7 +152,7 @@ final class XmlResultPrinter extends Printer implements TestListener /** * A test ended. * - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function endTest(Test $test, float $time): void { @@ -164,7 +165,7 @@ final class XmlResultPrinter extends Printer implements TestListener static function ($group) { return !($group === 'small' || $group === 'medium' || $group === 'large' || strpos($group, '__phpunit_') === 0); - } + }, ); $testNode = $this->document->createElement('test'); @@ -188,7 +189,7 @@ final class XmlResultPrinter extends Printer implements TestListener $annotations = TestUtil::parseTestMethodAnnotations( get_class($test), - $test->getName(false) + $test->getName(false), ); foreach (['class', 'method'] as $type) { @@ -215,7 +216,7 @@ final class XmlResultPrinter extends Printer implements TestListener $testNode->appendChild($testDoubleNode); } - $inlineAnnotations = \PHPUnit\Util\Test::getInlineAnnotations(get_class($test), $test->getName(false)); + $inlineAnnotations = TestUtil::getInlineAnnotations(get_class($test), $test->getName(false)); if (isset($inlineAnnotations['given'], $inlineAnnotations['when'], $inlineAnnotations['then'])) { $testNode->setAttribute('given', $inlineAnnotations['given']['value']); @@ -239,8 +240,8 @@ final class XmlResultPrinter extends Printer implements TestListener } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php b/vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php index 67168a67..c9f8af16 100644 --- a/vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php +++ b/vendor/phpunit/phpunit/src/Util/TextTestListRenderer.php @@ -17,6 +17,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Runner\PhptTestCase; use RecursiveIteratorIterator; +use SebastianBergmann\RecursionContext\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -24,7 +25,7 @@ use RecursiveIteratorIterator; final class TextTestListRenderer { /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function render(TestSuite $suite): string { @@ -35,7 +36,7 @@ final class TextTestListRenderer $name = sprintf( '%s::%s', get_class($test), - str_replace(' with data set ', '', $test->getName()) + str_replace(' with data set ', '', $test->getName()), ); } elseif ($test instanceof PhptTestCase) { $name = $test->getName(); @@ -45,7 +46,7 @@ final class TextTestListRenderer $buffer .= sprintf( ' - %s' . PHP_EOL, - $name + $name, ); } diff --git a/vendor/phpunit/phpunit/src/Util/Type.php b/vendor/phpunit/phpunit/src/Util/Type.php index 01a6b193..ec6a1d78 100644 --- a/vendor/phpunit/phpunit/src/Util/Type.php +++ b/vendor/phpunit/phpunit/src/Util/Type.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\Util; -use Throwable; - /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ @@ -38,15 +36,4 @@ final class Type return false; } } - - public static function isCloneable(object $object): bool - { - try { - $clone = clone $object; - } catch (Throwable $t) { - return false; - } - - return $clone instanceof $object; - } } diff --git a/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php b/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php index 175ecd2d..57ca7c32 100644 --- a/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php +++ b/vendor/phpunit/phpunit/src/Util/VersionComparisonOperator.php @@ -14,6 +14,7 @@ use function sprintf; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * * @psalm-immutable */ final class VersionComparisonOperator @@ -49,8 +50,8 @@ final class VersionComparisonOperator throw new Exception( sprintf( '"%s" is not a valid version_compare() operator', - $operator - ) + $operator, + ), ); } } diff --git a/vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php b/vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php index 8b10d415..d6366eaa 100644 --- a/vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php +++ b/vendor/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php @@ -32,10 +32,10 @@ final class XdebugFilterScriptGenerator { return sprintf( " '%s'", - $item + $item, ); }, - $this->getItems($filter) + $this->getItems($filter), ); $files = implode(",\n", $files); @@ -67,7 +67,7 @@ EOF; if (is_string($path)) { $files[] = sprintf( addslashes('%s' . DIRECTORY_SEPARATOR), - $path + $path, ); } } diff --git a/vendor/phpunit/phpunit/src/Util/Xml.php b/vendor/phpunit/phpunit/src/Util/Xml.php index 0939e6c5..efdd56ef 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml.php +++ b/vendor/phpunit/phpunit/src/Util/Xml.php @@ -68,8 +68,8 @@ final class Xml '', htmlspecialchars( self::convertToUtf8($string), - ENT_QUOTES - ) + ENT_QUOTES, + ), ); } @@ -126,8 +126,8 @@ final class Xml } catch (ReflectionException $e) { throw new Exception( $e->getMessage(), - (int) $e->getCode(), - $e + $e->getCode(), + $e, ); } // @codeCoverageIgnoreEnd diff --git a/vendor/phpunit/phpunit/src/Util/Xml/Loader.php b/vendor/phpunit/phpunit/src/Util/Xml/Loader.php index 8d43d327..2ba5ace3 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/Loader.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/Loader.php @@ -38,8 +38,8 @@ final class Loader throw new Exception( sprintf( 'Could not read "%s".', - $filename - ) + $filename, + ), ); } @@ -100,8 +100,8 @@ final class Loader sprintf( 'Could not load "%s".%s', $filename, - $message !== '' ? "\n" . $message : '' - ) + $message !== '' ? "\n" . $message : '', + ), ); } diff --git a/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php b/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php index 442aae49..3ae45723 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php @@ -16,6 +16,9 @@ namespace PHPUnit\Util\Xml; */ abstract class SchemaDetectionResult { + /** + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + */ public function detected(): bool { return false; diff --git a/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetector.php b/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetector.php index 5864695b..1877a9a1 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetector.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/SchemaDetector.php @@ -23,10 +23,12 @@ final class SchemaDetector $filename, false, true, - true + true, ); - foreach (['9.2', '8.5'] as $candidate) { + $schemaFinder = new SchemaFinder; + + foreach ($schemaFinder->available() as $candidate) { $schema = (new SchemaFinder)->find($candidate); if (!(new Validator)->validate($document, $schema)->hasValidationErrors()) { diff --git a/vendor/phpunit/phpunit/src/Util/Xml/SchemaFinder.php b/vendor/phpunit/phpunit/src/Util/Xml/SchemaFinder.php index 1e7b73c5..eb5f4f15 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/SchemaFinder.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/SchemaFinder.php @@ -9,9 +9,12 @@ */ namespace PHPUnit\Util\Xml; +use function assert; use function defined; use function is_file; +use function rsort; use function sprintf; +use DirectoryIterator; use PHPUnit\Runner\Version; /** @@ -19,6 +22,30 @@ use PHPUnit\Runner\Version; */ final class SchemaFinder { + /** + * @psalm-return non-empty-list + */ + public function available(): array + { + $result = [Version::series()]; + + foreach ((new DirectoryIterator($this->path() . 'schema')) as $file) { + if ($file->isDot()) { + continue; + } + + $version = $file->getBasename('.xsd'); + + assert(!empty($version)); + + $result[] = $version; + } + + rsort($result); + + return $result; + } + /** * @throws Exception */ @@ -34,8 +61,8 @@ final class SchemaFinder throw new Exception( sprintf( 'Schema for PHPUnit %s is not available', - $version - ) + $version, + ), ); } diff --git a/vendor/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php b/vendor/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php index fdc95abb..e383678d 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php @@ -9,6 +9,7 @@ */ namespace PHPUnit\Util\Xml; +use function count; use ArrayIterator; use Countable; use DOMNode; @@ -17,6 +18,8 @@ use IteratorAggregate; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @template-implements IteratorAggregate */ final class SnapshotNodeList implements Countable, IteratorAggregate { diff --git a/vendor/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php b/vendor/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php index 8b517e29..77202c35 100644 --- a/vendor/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php +++ b/vendor/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php @@ -17,20 +17,29 @@ namespace PHPUnit\Util\Xml; final class SuccessfulSchemaDetectionResult extends SchemaDetectionResult { /** - * @var string + * @psalm-var non-empty-string */ private $version; + /** + * @psalm-param non-empty-string $version + */ public function __construct(string $version) { $this->version = $version; } + /** + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + */ public function detected(): bool { return true; } + /** + * @psalm-return non-empty-string + */ public function version(): string { return $this->version; diff --git a/vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php b/vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php index d92e1fe2..2ed6559f 100644 --- a/vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php +++ b/vendor/phpunit/phpunit/src/Util/XmlTestListRenderer.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Runner\PhptTestCase; use RecursiveIteratorIterator; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use XMLWriter; /** @@ -24,7 +25,7 @@ use XMLWriter; final class XmlTestListRenderer { /** - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException + * @throws InvalidArgumentException */ public function render(TestSuite $suite): string { @@ -32,7 +33,7 @@ final class XmlTestListRenderer $writer->openMemory(); $writer->setIndent(true); - $writer->startDocument(); + $writer->startDocument('1.0', 'UTF-8'); $writer->startElement('tests'); $currentTestCase = null; @@ -60,8 +61,8 @@ final class XmlTestListRenderer str_replace( ' with data set ', '', - $test->getDataSetAsString(false) - ) + $test->getDataSetAsString(false), + ), ); } @@ -84,6 +85,7 @@ final class XmlTestListRenderer } $writer->endElement(); + $writer->endDocument(); return $writer->outputMemory(); } diff --git a/vendor/psr/http-client/CHANGELOG.md b/vendor/psr/http-client/CHANGELOG.md index e2dc25f5..babba7c7 100644 --- a/vendor/psr/http-client/CHANGELOG.md +++ b/vendor/psr/http-client/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 1.0.3 + +Add `source` link in composer.json. No code changes. + +## 1.0.2 + +Allow PSR-7 (psr/http-message) 2.0. No code changes. + ## 1.0.1 Allow installation with PHP 8. No code changes. diff --git a/vendor/psr/http-client/README.md b/vendor/psr/http-client/README.md index 6876b840..84af5c55 100644 --- a/vendor/psr/http-client/README.md +++ b/vendor/psr/http-client/README.md @@ -7,6 +7,6 @@ Note that this is not a HTTP Client implementation of its own. It is merely abst The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. -[psr-url]: http://www.php-fig.org/psr/psr-18 +[psr-url]: https://www.php-fig.org/psr/psr-18 [package-url]: https://packagist.org/packages/psr/http-client [implementation-url]: https://packagist.org/providers/psr/http-client-implementation diff --git a/vendor/psr/http-client/composer.json b/vendor/psr/http-client/composer.json index c195f8ff..6fed350b 100644 --- a/vendor/psr/http-client/composer.json +++ b/vendor/psr/http-client/composer.json @@ -7,12 +7,15 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "autoload": { "psr-4": { diff --git a/vendor/psr/http-factory/.gitignore b/vendor/psr/http-factory/.gitignore deleted file mode 100644 index d8a7996a..00000000 --- a/vendor/psr/http-factory/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -composer.lock -vendor/ diff --git a/vendor/psr/http-factory/.pullapprove.yml b/vendor/psr/http-factory/.pullapprove.yml deleted file mode 100644 index 8cf08194..00000000 --- a/vendor/psr/http-factory/.pullapprove.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: default -reviewers: - - - name: contributors - required: 1 - teams: - - http-factory-contributors diff --git a/vendor/psr/http-factory/README.md b/vendor/psr/http-factory/README.md index 41d362a6..bf8913b5 100644 --- a/vendor/psr/http-factory/README.md +++ b/vendor/psr/http-factory/README.md @@ -1,10 +1,12 @@ HTTP Factories ============== -This repository holds all interfaces related to [PSR-17 (HTTP Message Factories)][psr-17]. -Please refer to the specification for a description. +This repository holds all interfaces related to [PSR-17 (HTTP Factories)][psr-url]. -You can find implementations of the specification by looking for packages providing the -[psr/http-factory-implementation](https://packagist.org/providers/psr/http-factory-implementation) virtual package. +Note that this is not a HTTP Factory implementation of its own. It is merely interfaces that describe the components of a HTTP Factory. -[psr-17]: https://www.php-fig.org/psr/psr-17/ +The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. + +[psr-url]: https://www.php-fig.org/psr/psr-17/ +[package-url]: https://packagist.org/packages/psr/http-factory +[implementation-url]: https://packagist.org/providers/psr/http-factory-implementation diff --git a/vendor/psr/http-factory/composer.json b/vendor/psr/http-factory/composer.json index af62b290..82a1d326 100644 --- a/vendor/psr/http-factory/composer.json +++ b/vendor/psr/http-factory/composer.json @@ -1,6 +1,6 @@ { "name": "psr/http-factory", - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "psr", "psr-7", @@ -15,12 +15,15 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" }, "autoload": { "psr-4": { diff --git a/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php b/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php index 7db4e30a..d7adbf0e 100644 --- a/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php +++ b/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php @@ -15,10 +15,10 @@ interface UploadedFileFactoryInterface * * @param StreamInterface $stream Underlying stream representing the * uploaded file content. - * @param int $size in bytes + * @param int|null $size in bytes * @param int $error PHP file upload error - * @param string $clientFilename Filename as provided by the client, if any. - * @param string $clientMediaType Media type as provided by the client, if any. + * @param string|null $clientFilename Filename as provided by the client, if any. + * @param string|null $clientMediaType Media type as provided by the client, if any. * * @return UploadedFileInterface * @@ -26,9 +26,9 @@ interface UploadedFileFactoryInterface */ public function createUploadedFile( StreamInterface $stream, - int $size = null, + ?int $size = null, int $error = \UPLOAD_ERR_OK, - string $clientFilename = null, - string $clientMediaType = null + ?string $clientFilename = null, + ?string $clientMediaType = null ): UploadedFileInterface; } diff --git a/vendor/psr/http-message/README.md b/vendor/psr/http-message/README.md index 28185338..2668be6c 100644 --- a/vendor/psr/http-message/README.md +++ b/vendor/psr/http-message/README.md @@ -10,4 +10,7 @@ interface that describes a HTTP message. See the specification for more details. Usage ----- -We'll certainly need some stuff in here. \ No newline at end of file +Before reading the usage guide we recommend reading the PSR-7 interfaces method list: + +* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md) +* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md) \ No newline at end of file diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json index b0d2937a..c66e5aba 100644 --- a/vendor/psr/http-message/composer.json +++ b/vendor/psr/http-message/composer.json @@ -7,11 +7,11 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "autoload": { "psr-4": { @@ -20,7 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } } } diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php index dd46e5ec..a83c9851 100644 --- a/vendor/psr/http-message/src/MessageInterface.php +++ b/vendor/psr/http-message/src/MessageInterface.php @@ -23,7 +23,7 @@ interface MessageInterface * * @return string HTTP protocol version. */ - public function getProtocolVersion(); + public function getProtocolVersion(): string; /** * Return an instance with the specified HTTP protocol version. @@ -38,7 +38,7 @@ interface MessageInterface * @param string $version HTTP protocol version * @return static */ - public function withProtocolVersion($version); + public function withProtocolVersion(string $version): MessageInterface; /** * Retrieves all message header values. @@ -65,7 +65,7 @@ interface MessageInterface * key MUST be a header name, and each value MUST be an array of strings * for that header. */ - public function getHeaders(); + public function getHeaders(): array; /** * Checks if a header exists by the given case-insensitive name. @@ -75,7 +75,7 @@ interface MessageInterface * name using a case-insensitive string comparison. Returns false if * no matching header name is found in the message. */ - public function hasHeader($name); + public function hasHeader(string $name): bool; /** * Retrieves a message header value by the given case-insensitive name. @@ -91,7 +91,7 @@ interface MessageInterface * header. If the header does not appear in the message, this method MUST * return an empty array. */ - public function getHeader($name); + public function getHeader(string $name): array; /** * Retrieves a comma-separated string of the values for a single header. @@ -112,7 +112,7 @@ interface MessageInterface * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ - public function getHeaderLine($name); + public function getHeaderLine(string $name): string; /** * Return an instance with the provided value replacing the specified header. @@ -129,7 +129,7 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException for invalid header names or values. */ - public function withHeader($name, $value); + public function withHeader(string $name, $value): MessageInterface; /** * Return an instance with the specified header appended with the given value. @@ -147,7 +147,7 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException for invalid header names or values. */ - public function withAddedHeader($name, $value); + public function withAddedHeader(string $name, $value): MessageInterface; /** * Return an instance without the specified header. @@ -161,14 +161,14 @@ interface MessageInterface * @param string $name Case-insensitive header field name to remove. * @return static */ - public function withoutHeader($name); + public function withoutHeader(string $name): MessageInterface; /** * Gets the body of the message. * * @return StreamInterface Returns the body as a stream. */ - public function getBody(); + public function getBody(): StreamInterface; /** * Return an instance with the specified message body. @@ -183,5 +183,5 @@ interface MessageInterface * @return static * @throws \InvalidArgumentException When the body is not valid. */ - public function withBody(StreamInterface $body); + public function withBody(StreamInterface $body): MessageInterface; } diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php index a96d4fd6..33f85e55 100644 --- a/vendor/psr/http-message/src/RequestInterface.php +++ b/vendor/psr/http-message/src/RequestInterface.php @@ -39,7 +39,7 @@ interface RequestInterface extends MessageInterface * * @return string */ - public function getRequestTarget(); + public function getRequestTarget(): string; /** * Return an instance with the specific request-target. @@ -55,17 +55,18 @@ interface RequestInterface extends MessageInterface * * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various * request-target forms allowed in request messages) - * @param mixed $requestTarget + * @param string $requestTarget * @return static */ - public function withRequestTarget($requestTarget); + public function withRequestTarget(string $requestTarget): RequestInterface; + /** * Retrieves the HTTP method of the request. * * @return string Returns the request method. */ - public function getMethod(); + public function getMethod(): string; /** * Return an instance with the provided HTTP method. @@ -82,7 +83,7 @@ interface RequestInterface extends MessageInterface * @return static * @throws \InvalidArgumentException for invalid HTTP methods. */ - public function withMethod($method); + public function withMethod(string $method): RequestInterface; /** * Retrieves the URI instance. @@ -93,7 +94,7 @@ interface RequestInterface extends MessageInterface * @return UriInterface Returns a UriInterface instance * representing the URI of the request. */ - public function getUri(); + public function getUri(): UriInterface; /** * Returns an instance with the provided URI. @@ -125,5 +126,5 @@ interface RequestInterface extends MessageInterface * @param bool $preserveHost Preserve the original state of the Host header. * @return static */ - public function withUri(UriInterface $uri, $preserveHost = false); + public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface; } diff --git a/vendor/psr/http-message/src/ResponseInterface.php b/vendor/psr/http-message/src/ResponseInterface.php index c306514e..e9299a91 100644 --- a/vendor/psr/http-message/src/ResponseInterface.php +++ b/vendor/psr/http-message/src/ResponseInterface.php @@ -27,7 +27,7 @@ interface ResponseInterface extends MessageInterface * * @return int Status code. */ - public function getStatusCode(); + public function getStatusCode(): int; /** * Return an instance with the specified status code and, optionally, reason phrase. @@ -49,7 +49,7 @@ interface ResponseInterface extends MessageInterface * @return static * @throws \InvalidArgumentException For invalid status code arguments. */ - public function withStatus($code, $reasonPhrase = ''); + public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface; /** * Gets the response reason phrase associated with the status code. @@ -64,5 +64,5 @@ interface ResponseInterface extends MessageInterface * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml * @return string Reason phrase; must return an empty string if none present. */ - public function getReasonPhrase(); + public function getReasonPhrase(): string; } diff --git a/vendor/psr/http-message/src/ServerRequestInterface.php b/vendor/psr/http-message/src/ServerRequestInterface.php index 02512340..8625d0e1 100644 --- a/vendor/psr/http-message/src/ServerRequestInterface.php +++ b/vendor/psr/http-message/src/ServerRequestInterface.php @@ -51,7 +51,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getServerParams(); + public function getServerParams(): array; /** * Retrieve cookies. @@ -63,7 +63,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getCookieParams(); + public function getCookieParams(): array; /** * Return an instance with the specified cookies. @@ -82,7 +82,7 @@ interface ServerRequestInterface extends RequestInterface * @param array $cookies Array of key/value pairs representing cookies. * @return static */ - public function withCookieParams(array $cookies); + public function withCookieParams(array $cookies): ServerRequestInterface; /** * Retrieve query string arguments. @@ -96,7 +96,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array */ - public function getQueryParams(); + public function getQueryParams(): array; /** * Return an instance with the specified query string arguments. @@ -120,7 +120,7 @@ interface ServerRequestInterface extends RequestInterface * $_GET. * @return static */ - public function withQueryParams(array $query); + public function withQueryParams(array $query): ServerRequestInterface; /** * Retrieve normalized file upload data. @@ -134,7 +134,7 @@ interface ServerRequestInterface extends RequestInterface * @return array An array tree of UploadedFileInterface instances; an empty * array MUST be returned if no data is present. */ - public function getUploadedFiles(); + public function getUploadedFiles(): array; /** * Create a new instance with the specified uploaded files. @@ -147,7 +147,7 @@ interface ServerRequestInterface extends RequestInterface * @return static * @throws \InvalidArgumentException if an invalid structure is provided. */ - public function withUploadedFiles(array $uploadedFiles); + public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface; /** * Retrieve any parameters provided in the request body. @@ -194,7 +194,7 @@ interface ServerRequestInterface extends RequestInterface * @throws \InvalidArgumentException if an unsupported argument type is * provided. */ - public function withParsedBody($data); + public function withParsedBody($data): ServerRequestInterface; /** * Retrieve attributes derived from the request. @@ -207,7 +207,7 @@ interface ServerRequestInterface extends RequestInterface * * @return array Attributes derived from the request. */ - public function getAttributes(); + public function getAttributes(): array; /** * Retrieve a single derived request attribute. @@ -224,7 +224,7 @@ interface ServerRequestInterface extends RequestInterface * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ - public function getAttribute($name, $default = null); + public function getAttribute(string $name, $default = null); /** * Return an instance with the specified derived request attribute. @@ -241,7 +241,7 @@ interface ServerRequestInterface extends RequestInterface * @param mixed $value The value of the attribute. * @return static */ - public function withAttribute($name, $value); + public function withAttribute(string $name, $value): ServerRequestInterface; /** * Return an instance that removes the specified derived request attribute. @@ -257,5 +257,5 @@ interface ServerRequestInterface extends RequestInterface * @param string $name The attribute name. * @return static */ - public function withoutAttribute($name); + public function withoutAttribute(string $name): ServerRequestInterface; } diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php index f68f3912..a62aabb8 100644 --- a/vendor/psr/http-message/src/StreamInterface.php +++ b/vendor/psr/http-message/src/StreamInterface.php @@ -25,14 +25,14 @@ interface StreamInterface * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring * @return string */ - public function __toString(); + public function __toString(): string; /** * Closes the stream and any underlying resources. * * @return void */ - public function close(); + public function close(): void; /** * Separates any underlying resources from the stream. @@ -48,7 +48,7 @@ interface StreamInterface * * @return int|null Returns the size in bytes if known, or null if unknown. */ - public function getSize(); + public function getSize(): ?int; /** * Returns the current position of the file read/write pointer @@ -56,21 +56,21 @@ interface StreamInterface * @return int Position of the file pointer * @throws \RuntimeException on error. */ - public function tell(); + public function tell(): int; /** * Returns true if the stream is at the end of the stream. * * @return bool */ - public function eof(); + public function eof(): bool; /** * Returns whether or not the stream is seekable. * * @return bool */ - public function isSeekable(); + public function isSeekable(): bool; /** * Seek to a position in the stream. @@ -84,7 +84,7 @@ interface StreamInterface * SEEK_END: Set position to end-of-stream plus offset. * @throws \RuntimeException on failure. */ - public function seek($offset, $whence = SEEK_SET); + public function seek(int $offset, int $whence = SEEK_SET): void; /** * Seek to the beginning of the stream. @@ -96,14 +96,14 @@ interface StreamInterface * @link http://www.php.net/manual/en/function.fseek.php * @throws \RuntimeException on failure. */ - public function rewind(); + public function rewind(): void; /** * Returns whether or not the stream is writable. * * @return bool */ - public function isWritable(); + public function isWritable(): bool; /** * Write data to the stream. @@ -112,14 +112,14 @@ interface StreamInterface * @return int Returns the number of bytes written to the stream. * @throws \RuntimeException on failure. */ - public function write($string); + public function write(string $string): int; /** * Returns whether or not the stream is readable. * * @return bool */ - public function isReadable(); + public function isReadable(): bool; /** * Read data from the stream. @@ -131,7 +131,7 @@ interface StreamInterface * if no bytes are available. * @throws \RuntimeException if an error occurs. */ - public function read($length); + public function read(int $length): string; /** * Returns the remaining contents in a string @@ -140,7 +140,7 @@ interface StreamInterface * @throws \RuntimeException if unable to read or an error occurs while * reading. */ - public function getContents(); + public function getContents(): string; /** * Get stream metadata as an associative array or retrieve a specific key. @@ -149,10 +149,10 @@ interface StreamInterface * stream_get_meta_data() function. * * @link http://php.net/manual/en/function.stream-get-meta-data.php - * @param string $key Specific metadata to retrieve. + * @param string|null $key Specific metadata to retrieve. * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. */ - public function getMetadata($key = null); + public function getMetadata(?string $key = null); } diff --git a/vendor/psr/http-message/src/UploadedFileInterface.php b/vendor/psr/http-message/src/UploadedFileInterface.php index f8a6901e..dd19d653 100644 --- a/vendor/psr/http-message/src/UploadedFileInterface.php +++ b/vendor/psr/http-message/src/UploadedFileInterface.php @@ -28,7 +28,7 @@ interface UploadedFileInterface * @throws \RuntimeException in cases when no stream is available or can be * created. */ - public function getStream(); + public function getStream(): StreamInterface; /** * Move the uploaded file to a new location. @@ -62,7 +62,7 @@ interface UploadedFileInterface * @throws \RuntimeException on any error during the move operation, or on * the second or subsequent call to the method. */ - public function moveTo($targetPath); + public function moveTo(string $targetPath): void; /** * Retrieve the file size. @@ -73,7 +73,7 @@ interface UploadedFileInterface * * @return int|null The file size in bytes or null if unknown. */ - public function getSize(); + public function getSize(): ?int; /** * Retrieve the error associated with the uploaded file. @@ -89,7 +89,7 @@ interface UploadedFileInterface * @see http://php.net/manual/en/features.file-upload.errors.php * @return int One of PHP's UPLOAD_ERR_XXX constants. */ - public function getError(); + public function getError(): int; /** * Retrieve the filename sent by the client. @@ -104,7 +104,7 @@ interface UploadedFileInterface * @return string|null The filename sent by the client or null if none * was provided. */ - public function getClientFilename(); + public function getClientFilename(): ?string; /** * Retrieve the media type sent by the client. @@ -119,5 +119,5 @@ interface UploadedFileInterface * @return string|null The media type sent by the client or null if none * was provided. */ - public function getClientMediaType(); + public function getClientMediaType(): ?string; } diff --git a/vendor/psr/http-message/src/UriInterface.php b/vendor/psr/http-message/src/UriInterface.php index 9d7ab9ea..15e2cf28 100644 --- a/vendor/psr/http-message/src/UriInterface.php +++ b/vendor/psr/http-message/src/UriInterface.php @@ -1,4 +1,5 @@ yolo = $yolo; + $this->strictTypes = $strictTypes; - if ($parser === null) { - $parserFactory = new ParserFactory(); - $parser = $parserFactory->createParser(); - } - - $this->parser = $parser; + $this->parser = $parser ?? (new ParserFactory())->createParser(); $this->printer = $printer ?: new Printer(); $this->traverser = $traverser ?: new NodeTraverser(); @@ -82,8 +81,6 @@ class CodeCleaner /** * Check whether this CodeCleaner is in YOLO mode. - * - * @return bool */ public function yolo(): bool { @@ -93,7 +90,7 @@ class CodeCleaner /** * Get default CodeCleaner passes. * - * @return array + * @return CodeCleanerPass[] */ private function getDefaultPasses(): array { @@ -117,7 +114,6 @@ class CodeCleaner new FinalClassPass(), new FunctionContextPass(), new FunctionReturnInWriteContextPass(), - new InstanceOfPass(), new IssetPass(), new LabelContextPass(), new LeavePsyshAlonePass(), @@ -135,7 +131,7 @@ class CodeCleaner new MagicConstantsPass(), $namespacePass, // must run after the implicit return pass new RequirePass(), - new StrictTypesPass(), + new StrictTypesPass($this->strictTypes), // Namespace-aware validation (which depends on aforementioned shenanigans) new ValidClassNamePass(), @@ -150,7 +146,7 @@ class CodeCleaner * This list should stay in sync with the "rewriting shenanigans" in * getDefaultPasses above. * - * @return array + * @return CodeCleanerPass[] */ private function getYoloPasses(): array { @@ -169,7 +165,7 @@ class CodeCleaner new MagicConstantsPass(), $namespacePass, // must run after the implicit return pass new RequirePass(), - new StrictTypesPass(), + new StrictTypesPass($this->strictTypes), ]; } @@ -201,6 +197,7 @@ class CodeCleaner } // Set up a clean traverser for just these code cleaner passes + // @todo Pass visitors directly to once we drop support for PHP-Parser 4.x $traverser = new NodeTraverser(); foreach ($passes as $pass) { $traverser->addVisitor($pass); @@ -240,8 +237,6 @@ class CodeCleaner * Check whether a given backtrace frame is a call to Psy\debug. * * @param array $stackFrame - * - * @return bool */ private static function isDebugCall(array $stackFrame): bool { @@ -288,10 +283,8 @@ class CodeCleaner * Set the current local namespace. * * @param array|null $namespace (default: null) - * - * @return array|null */ - public function setNamespace(array $namespace = null) + public function setNamespace(?array $namespace = null) { $this->namespace = $namespace; } @@ -369,8 +362,6 @@ class CodeCleaner * * @param \PhpParser\Error $e * @param string $code - * - * @return bool */ private function parseErrorIsUnclosedString(\PhpParser\Error $e, string $code): bool { diff --git a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php index 3358bb54..5b491ceb 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -28,6 +28,8 @@ class AbstractClassPass extends CodeCleanerPass * @throws FatalErrorException if the node is an abstract function with a body * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -41,7 +43,7 @@ class AbstractClassPass extends CodeCleanerPass if ($node->stmts !== null) { $msg = \sprintf('Abstract function %s cannot contain body', $name); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } @@ -51,6 +53,8 @@ class AbstractClassPass extends CodeCleanerPass * @throws FatalErrorException if the node is a non-abstract class with abstract methods * * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { @@ -64,7 +68,7 @@ class AbstractClassPass extends CodeCleanerPass ($count === 1) ? '' : 's', \implode(', ', $this->abstractMethods) ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php b/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php index 3f81632c..cdcb84ad 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,11 +29,13 @@ class AssignThisVariablePass extends CodeCleanerPass * @throws FatalErrorException if the user assign the `$this` variable * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { if ($node instanceof Assign && $node->var instanceof Variable && $node->var->name === 'this') { - throw new FatalErrorException('Cannot re-assign $this', 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException('Cannot re-assign $this', 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php b/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php index ccfe8df0..c3eaed14 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -35,6 +35,8 @@ class CallTimePassByReferencePass extends CodeCleanerPass * @throws FatalErrorException if the user used call-time pass-by-reference * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -48,7 +50,7 @@ class CallTimePassByReferencePass extends CodeCleanerPass } if ($arg->byRef) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php index 1bea26fd..441685f9 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -30,6 +30,8 @@ class CalledClassPass extends CodeCleanerPass /** * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -40,6 +42,8 @@ class CalledClassPass extends CodeCleanerPass * @throws ErrorException if get_class or get_called_class is called without an object from outside a class * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -62,13 +66,15 @@ class CalledClassPass extends CodeCleanerPass $name = \strtolower($node->name); if (\in_array($name, ['get_class', 'get_called_class'])) { $msg = \sprintf('%s() called without object from outside a class', $name); - throw new ErrorException($msg, 0, \E_USER_WARNING, null, $node->getLine()); + throw new ErrorException($msg, 0, \E_USER_WARNING, null, $node->getStartLine()); } } } /** * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { diff --git a/vendor/psy/psysh/src/CodeCleaner/CodeCleanerPass.php b/vendor/psy/psysh/src/CodeCleaner/CodeCleanerPass.php index 9b3bd7f8..244c9d4e 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CodeCleanerPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CodeCleanerPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php b/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php index fb5aa5e9..88cdae9f 100644 --- a/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,8 @@ namespace Psy\CodeCleaner; use PhpParser\Node; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Assign; +use PhpParser\Node\Expr\AssignRef; +use PhpParser\Node\Stmt\Foreach_; use Psy\Exception\FatalErrorException; /** @@ -25,25 +27,39 @@ class EmptyArrayDimFetchPass extends CodeCleanerPass private $theseOnesAreFine = []; + /** + * @return Node[]|null Array of nodes + */ public function beforeTraverse(array $nodes) { $this->theseOnesAreFine = []; } /** - * @throws FatalErrorException if the user used empty empty array dim fetch outside of assignment + * @throws FatalErrorException if the user used empty array dim fetch outside of assignment * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { if ($node instanceof Assign && $node->var instanceof ArrayDimFetch) { $this->theseOnesAreFine[] = $node->var; + } elseif ($node instanceof AssignRef && $node->expr instanceof ArrayDimFetch) { + $this->theseOnesAreFine[] = $node->expr; + } elseif ($node instanceof Foreach_ && $node->valueVar instanceof ArrayDimFetch) { + $this->theseOnesAreFine[] = $node->valueVar; + } elseif ($node instanceof ArrayDimFetch && $node->var instanceof ArrayDimFetch) { + // $a[]['b'] = 'c' + if (\in_array($node, $this->theseOnesAreFine)) { + $this->theseOnesAreFine[] = $node->var; + } } if ($node instanceof ArrayDimFetch && $node->dim === null) { if (!\in_array($node, $this->theseOnesAreFine)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ExitPass.php b/vendor/psy/psysh/src/CodeCleaner/ExitPass.php index 5e2639d9..e58a8d68 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ExitPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ExitPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,6 +23,8 @@ class ExitPass extends CodeCleanerPass * Converts exit calls to BreakExceptions. * * @param \PhpParser\Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { diff --git a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php index bff9f6f1..1507664f 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -24,6 +24,8 @@ class FinalClassPass extends CodeCleanerPass /** * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -34,6 +36,8 @@ class FinalClassPass extends CodeCleanerPass * @throws FatalErrorException if the node is a class that extends a final class * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -42,7 +46,7 @@ class FinalClassPass extends CodeCleanerPass $extends = (string) $node->extends; if ($this->isFinalClass($extends)) { $msg = \sprintf('Class %s may not inherit from final class (%s)', $node->name, $extends); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } @@ -54,8 +58,6 @@ class FinalClassPass extends CodeCleanerPass /** * @param string $name Class name - * - * @return bool */ private function isFinalClass(string $name): bool { diff --git a/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php b/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php index e372c65e..07a3e8fd 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,12 +23,17 @@ class FunctionContextPass extends CodeCleanerPass /** * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { $this->functionDepth = 0; } + /** + * @return int|Node|null Replacement node (or special return value) + */ public function enterNode(Node $node) { if ($node instanceof FunctionLike) { @@ -45,12 +50,14 @@ class FunctionContextPass extends CodeCleanerPass // It causes fatal error. if ($node instanceof Yield_) { $msg = 'The "yield" expression can only be used inside a function'; - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } /** * @param \PhpParser\Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { diff --git a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php index d49fa167..2c50d5fc 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -40,6 +40,8 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass * @throws FatalErrorException if a value is assigned to a function * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -51,7 +53,7 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass } if ($item && $item->byRef && $this->isCallNode($item->value)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } elseif ($node instanceof Isset_ || $node instanceof Unset_) { @@ -61,10 +63,10 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass } $msg = $node instanceof Isset_ ? self::ISSET_MESSAGE : self::EXCEPTION_MESSAGE; - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } elseif ($node instanceof Assign && $this->isCallNode($node->var)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php index 0b405cf9..202a0825 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -77,15 +77,14 @@ class ImplicitReturnPass extends CodeCleanerPass } elseif ($last instanceof Expr && !($last instanceof Exit_)) { // @codeCoverageIgnoreStart $nodes[\count($nodes) - 1] = new Return_($last, [ - 'startLine' => $last->getLine(), - 'endLine' => $last->getLine(), + 'startLine' => $last->getStartLine(), + 'endLine' => $last->getEndLine(), ]); // @codeCoverageIgnoreEnd } elseif ($last instanceof Expression && !($last->expr instanceof Exit_)) { - // For PHP Parser 4.x $nodes[\count($nodes) - 1] = new Return_($last->expr, [ - 'startLine' => $last->getLine(), - 'endLine' => $last->getLine(), + 'startLine' => $last->getStartLine(), + 'endLine' => $last->getEndLine(), ]); } elseif ($last instanceof Namespace_) { $last->stmts = $this->addImplicitReturn($last->stmts); @@ -115,8 +114,6 @@ class ImplicitReturnPass extends CodeCleanerPass * we'll exclude them here. * * @param Node $node - * - * @return bool */ private static function isNonExpressionStmt(Node $node): bool { diff --git a/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php b/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php deleted file mode 100644 index e6c10bc6..00000000 --- a/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ -class InstanceOfPass extends CodeCleanerPass -{ - const EXCEPTION_MSG = 'instanceof expects an object instance, constant given'; - - private $atLeastPhp73; - - public function __construct() - { - $this->atLeastPhp73 = \version_compare(\PHP_VERSION, '7.3', '>='); - } - - /** - * Validate that the instanceof statement does not receive a scalar value or a non-class constant. - * - * @throws FatalErrorException if a scalar or a non-class constant is given - * - * @param Node $node - */ - public function enterNode(Node $node) - { - // Basically everything is allowed in PHP 7.3 :) - if ($this->atLeastPhp73) { - return; - } - - if (!$node instanceof Instanceof_) { - return; - } - - if (($node->expr instanceof Scalar && !$node->expr instanceof Encapsed) || - $node->expr instanceof BinaryOp || - $node->expr instanceof Array_ || - $node->expr instanceof ConstFetch || - $node->expr instanceof ClassConstFetch - ) { - throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getLine()); - } - } -} diff --git a/vendor/psy/psysh/src/CodeCleaner/IssetPass.php b/vendor/psy/psysh/src/CodeCleaner/IssetPass.php index ddb5d17e..fa8f60cf 100644 --- a/vendor/psy/psysh/src/CodeCleaner/IssetPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/IssetPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -31,6 +31,8 @@ class IssetPass extends CodeCleanerPass * @throws FatalErrorException * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -40,7 +42,7 @@ class IssetPass extends CodeCleanerPass foreach ($node->vars as $var) { if (!$var instanceof Variable && !$var instanceof ArrayDimFetch && !$var instanceof PropertyFetch && !$var instanceof NullsafePropertyFetch) { - throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php b/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php index daa028c2..44962f63 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -41,6 +41,8 @@ class LabelContextPass extends CodeCleanerPass /** * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -49,6 +51,9 @@ class LabelContextPass extends CodeCleanerPass $this->labelGotos = []; } + /** + * @return int|Node|null Replacement node (or special return value) + */ public function enterNode(Node $node) { if ($node instanceof FunctionLike) { @@ -63,14 +68,16 @@ class LabelContextPass extends CodeCleanerPass } if ($node instanceof Goto_) { - $this->labelGotos[\strtolower($node->name)] = $node->getLine(); + $this->labelGotos[\strtolower($node->name)] = $node->getStartLine(); } elseif ($node instanceof Label) { - $this->labelDeclarations[\strtolower($node->name)] = $node->getLine(); + $this->labelDeclarations[\strtolower($node->name)] = $node->getStartLine(); } } /** * @param \PhpParser\Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { @@ -79,6 +86,9 @@ class LabelContextPass extends CodeCleanerPass } } + /** + * @return Node[]|null Array of nodes + */ public function afterTraverse(array $nodes) { foreach ($this->labelGotos as $name => $line) { diff --git a/vendor/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php b/vendor/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php index 9af0ff73..67ba68b1 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,6 +26,8 @@ class LeavePsyshAlonePass extends CodeCleanerPass * @throws RuntimeException if the user is messing with $__psysh__ * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { diff --git a/vendor/psy/psysh/src/CodeCleaner/ListPass.php b/vendor/psy/psysh/src/CodeCleaner/ListPass.php index 8587c50c..6269bf15 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ListPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ListPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,9 +12,9 @@ namespace Psy\CodeCleaner; use PhpParser\Node; -use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayDimFetch; +// @todo Switch to PhpParser\Node\ArrayItem once we drop support for PHP-Parser 4.x use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\FuncCall; @@ -29,19 +29,14 @@ use Psy\Exception\ParseErrorException; */ class ListPass extends CodeCleanerPass { - private $atLeastPhp71; - - public function __construct() - { - $this->atLeastPhp71 = \version_compare(\PHP_VERSION, '7.1', '>='); - } - /** * Validate use of list assignment. * * @throws ParseErrorException if the user used empty with anything but a variable * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -53,16 +48,11 @@ class ListPass extends CodeCleanerPass return; } - if (!$this->atLeastPhp71 && $node->var instanceof Array_) { - $msg = "syntax error, unexpected '='"; - throw new ParseErrorException($msg, $node->expr->getLine()); - } - // Polyfill for PHP-Parser 2.x $items = isset($node->var->items) ? $node->var->items : $node->var->vars; if ($items === [] || $items === [null]) { - throw new ParseErrorException('Cannot use empty list', $node->var->getLine()); + throw new ParseErrorException('Cannot use empty list', ['startLine' => $node->var->getStartLine(), 'endLine' => $node->var->getEndLine()]); } $itemFound = false; @@ -73,15 +63,9 @@ class ListPass extends CodeCleanerPass $itemFound = true; - // List_->$vars in PHP-Parser 2.x is Variable instead of ArrayItem. - if (!$this->atLeastPhp71 && $item instanceof ArrayItem && $item->key !== null) { - $msg = 'Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting \',\' or \')\''; - throw new ParseErrorException($msg, $item->key->getLine()); - } - if (!self::isValidArrayItem($item)) { $msg = 'Assignments can only happen to writable values'; - throw new ParseErrorException($msg, $item->getLine()); + throw new ParseErrorException($msg, ['startLine' => $item->getStartLine(), 'endLine' => $item->getEndLine()]); } } @@ -93,11 +77,9 @@ class ListPass extends CodeCleanerPass /** * Validate whether a given item in an array is valid for short assignment. * - * @param Expr $item - * - * @return bool + * @param Node $item */ - private static function isValidArrayItem(Expr $item): bool + private static function isValidArrayItem(Node $item): bool { $value = ($item instanceof ArrayItem) ? $item->value : $item; diff --git a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php index 0e6e7ddf..c7121d99 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -32,6 +32,8 @@ class LoopContextPass extends CodeCleanerPass /** * {@inheritdoc} + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -45,6 +47,8 @@ class LoopContextPass extends CodeCleanerPass * @throws FatalErrorException if the node is a break or continue and has an argument less than 1 * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -63,23 +67,24 @@ class LoopContextPass extends CodeCleanerPass if ($this->loopDepth === 0) { $msg = \sprintf("'%s' not in the 'loop' or 'switch' context", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } + // @todo Rename to Int_ and Float_ once we drop support for PHP-Parser 4.x if ($node->num instanceof LNumber || $node->num instanceof DNumber) { $num = $node->num->value; if ($node->num instanceof DNumber || $num < 1) { $msg = \sprintf("'%s' operator accepts only positive numbers", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } if ($num > $this->loopDepth) { $msg = \sprintf("Cannot '%s' %d levels", $operator, $num); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } elseif ($node->num) { $msg = \sprintf("'%s' operator with non-constant operand is no longer supported", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } break; } @@ -87,6 +92,8 @@ class LoopContextPass extends CodeCleanerPass /** * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { diff --git a/vendor/psy/psysh/src/CodeCleaner/MagicConstantsPass.php b/vendor/psy/psysh/src/CodeCleaner/MagicConstantsPass.php index ea1f60c4..3c468af0 100644 --- a/vendor/psy/psysh/src/CodeCleaner/MagicConstantsPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/MagicConstantsPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php index 06314718..53290fd8 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,6 +29,8 @@ abstract class NamespaceAwarePass extends CodeCleanerPass * use afterTraverse or call parent::beforeTraverse() when overloading. * * Reset the namespace and the current scope before beginning analysis + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -41,11 +43,13 @@ abstract class NamespaceAwarePass extends CodeCleanerPass * leaveNode or call parent::enterNode() when overloading * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { if ($node instanceof Namespace_) { - $this->namespace = isset($node->name) ? $node->name->parts : []; + $this->namespace = isset($node->name) ? $this->getParts($node->name) : []; } } @@ -53,19 +57,29 @@ abstract class NamespaceAwarePass extends CodeCleanerPass * Get a fully-qualified name (class, function, interface, etc). * * @param mixed $name - * - * @return string */ protected function getFullyQualifiedName($name): string { if ($name instanceof FullyQualifiedName) { - return \implode('\\', $name->parts); - } elseif ($name instanceof Name) { - $name = $name->parts; + return \implode('\\', $this->getParts($name)); + } + + if ($name instanceof Name) { + $name = $this->getParts($name); } elseif (!\is_array($name)) { $name = [$name]; } return \implode('\\', \array_merge($this->namespace, $name)); } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make $namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; + } } diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php index 78c625bf..25c0be03 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,6 +11,7 @@ namespace Psy\CodeCleaner; +use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Namespace_; use Psy\CodeCleaner; @@ -46,6 +47,8 @@ class NamespacePass extends CodeCleanerPass * is encountered. * * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -83,6 +86,16 @@ class NamespacePass extends CodeCleanerPass private function setNamespace($namespace) { $this->namespace = $namespace; - $this->cleaner->setNamespace($namespace === null ? null : $namespace->parts); + $this->cleaner->setNamespace($namespace === null ? null : $this->getParts($namespace)); + } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make the namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; } } diff --git a/vendor/psy/psysh/src/CodeCleaner/NoReturnValue.php b/vendor/psy/psysh/src/CodeCleaner/NoReturnValue.php index 26cce8de..53f30a22 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NoReturnValue.php +++ b/vendor/psy/psysh/src/CodeCleaner/NoReturnValue.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,8 +25,6 @@ class NoReturnValue { /** * Get PhpParser AST expression for creating a new NoReturnValue. - * - * @return New_ */ public static function create(): New_ { diff --git a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php index 9212d877..7a331515 100644 --- a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,6 +34,8 @@ class PassableByReferencePass extends CodeCleanerPass * @throws FatalErrorException if non-variables are passed by reference * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -61,7 +63,7 @@ class PassableByReferencePass extends CodeCleanerPass if (\array_key_exists($key, $node->args)) { $arg = $node->args[$key]; if ($param->isPassedByReference() && !$this->isPassableByReference($arg)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } @@ -110,7 +112,7 @@ class PassableByReferencePass extends CodeCleanerPass } elseif (++$nonPassable > 2) { // There can be *at most* two non-passable-by-reference args in a row. This is about // as close as we can get to validating the arguments for this function :-/ - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php index b4d5e28f..3713aaa3 100644 --- a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,6 +29,8 @@ class RequirePass extends CodeCleanerPass /** * {@inheritdoc} + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $origNode) { @@ -47,10 +49,11 @@ class RequirePass extends CodeCleanerPass * * $foo = require \Psy\CodeCleaner\RequirePass::resolve($bar) */ + // @todo Rename LNumber to Int_ once we drop support for PHP-Parser 4.x $node->expr = new StaticCall( new FullyQualifiedName(self::class), 'resolve', - [new Arg($origNode->expr), new Arg(new LNumber($origNode->getLine()))], + [new Arg($origNode->expr), new Arg(new LNumber($origNode->getStartLine()))], $origNode->getAttributes() ); @@ -69,11 +72,11 @@ class RequirePass extends CodeCleanerPass * @throws ErrorException if $file is empty and E_WARNING is included in error_reporting level * * @param string $file - * @param int $lineNumber Line number of the original require expression + * @param int $startLine Line number of the original require expression * * @return string Exactly the same as $file, unless $file collides with a path in the currently running phar */ - public static function resolve($file, $lineNumber = null): string + public static function resolve($file, $startLine = null): string { $file = (string) $file; @@ -82,7 +85,7 @@ class RequirePass extends CodeCleanerPass // fake the file and line number, but we can't call it statically. // So we're duplicating some of the logics here. if (\E_WARNING & \error_reporting()) { - ErrorException::throwException(\E_WARNING, 'Filename cannot be empty', null, $lineNumber); + ErrorException::throwException(\E_WARNING, 'Filename cannot be empty', null, $startLine); } // @todo trigger an error as fallback? this is pretty ugly… // trigger_error('Filename cannot be empty', E_USER_WARNING); @@ -91,7 +94,7 @@ class RequirePass extends CodeCleanerPass $resolvedPath = \stream_resolve_include_path($file); if ($file === '' || !$resolvedPath) { $msg = \sprintf("Failed opening required '%s'", $file); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $lineNumber); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $startLine); } // Special case: if the path is not already relative or absolute, and it would resolve to diff --git a/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php b/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php index 19db08aa..c9894fbd 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,6 +18,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\NullableType; use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Return_; +use PhpParser\Node\UnionType; use Psy\Exception\FatalErrorException; /** @@ -31,23 +32,15 @@ class ReturnTypePass extends CodeCleanerPass const VOID_NULL_MESSAGE = 'A void function must not return a value (did you mean "return;" instead of "return null;"?)'; const NULLABLE_VOID_MESSAGE = 'Void type cannot be nullable'; - private $atLeastPhp71; private $returnTypeStack = []; - public function __construct() - { - $this->atLeastPhp71 = \version_compare(\PHP_VERSION, '7.1', '>='); - } - /** * {@inheritdoc} + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { - if (!$this->atLeastPhp71) { - return; // @codeCoverageIgnore - } - if ($this->isFunctionNode($node)) { $this->returnTypeStack[] = $node->returnType; @@ -79,20 +72,18 @@ class ReturnTypePass extends CodeCleanerPass } if ($msg !== null) { - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } /** * {@inheritdoc} + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { - if (!$this->atLeastPhp71) { - return; // @codeCoverageIgnore - } - if (!empty($this->returnTypeStack) && $this->isFunctionNode($node)) { \array_pop($this->returnTypeStack); } @@ -105,6 +96,10 @@ class ReturnTypePass extends CodeCleanerPass private function typeName(Node $node): string { + if ($node instanceof UnionType) { + return \implode('|', \array_map([$this, 'typeName'], $node->types)); + } + if ($node instanceof NullableType) { return \strtolower($node->type->name); } diff --git a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php index 08ec5e68..e0b6fc4b 100644 --- a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,7 +11,7 @@ namespace Psy\CodeCleaner; -use PhpParser\Node\Identifier; +use PhpParser\Node; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt\Declare_; use PhpParser\Node\Stmt\DeclareDeclare; @@ -33,6 +33,14 @@ class StrictTypesPass extends CodeCleanerPass private $strictTypes = false; + /** + * @param bool $strictTypes enforce strict types by default + */ + public function __construct(bool $strictTypes = false) + { + $this->strictTypes = $strictTypes; + } + /** * If this is a standalone strict types declaration, remember it for later. * @@ -42,6 +50,8 @@ class StrictTypesPass extends CodeCleanerPass * @throws FatalErrorException if an invalid `strict_types` declaration is found * * @param array $nodes + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -50,12 +60,11 @@ class StrictTypesPass extends CodeCleanerPass foreach ($nodes as $node) { if ($node instanceof Declare_) { foreach ($node->declares as $declare) { - // For PHP Parser 4.x - $declareKey = $declare->key instanceof Identifier ? $declare->key->toString() : $declare->key; - if ($declareKey === 'strict_types') { + if ($declare->key->toString() === 'strict_types') { $value = $declare->value; + // @todo Rename LNumber to Int_ once we drop support for PHP-Parser 4.x if (!$value instanceof LNumber || ($value->value !== 0 && $value->value !== 1)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } $this->strictTypes = $value->value === 1; @@ -67,6 +76,8 @@ class StrictTypesPass extends CodeCleanerPass if ($prependStrictTypes) { $first = \reset($nodes); if (!$first instanceof Declare_) { + // @todo Switch to PhpParser\Node\DeclareItem once we drop support for PHP-Parser 4.x + // @todo Rename LNumber to Int_ once we drop support for PHP-Parser 4.x $declare = new Declare_([new DeclareDeclare('strict_types', new LNumber(1))]); \array_unshift($nodes, $declare); } diff --git a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php index e36a1b55..59040b75 100644 --- a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,6 +17,7 @@ use PhpParser\Node\Name\FullyQualified as FullyQualifiedName; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Use_; +use PhpParser\Node\Stmt\UseItem; use PhpParser\Node\Stmt\UseUse; use PhpParser\NodeTraverser; @@ -44,6 +45,8 @@ class UseStatementPass extends CodeCleanerPass * work like you'd expect. * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -63,29 +66,31 @@ class UseStatementPass extends CodeCleanerPass * remembered aliases to the code. * * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { // Store a reference to every "use" statement, because we'll need them in a bit. if ($node instanceof Use_) { - foreach ($node->uses as $use) { - $alias = $use->alias ?: \end($use->name->parts); - $this->aliases[\strtolower($alias)] = $use->name; + foreach ($node->uses as $useItem) { + $this->aliases[\strtolower($useItem->getAlias())] = $useItem->name; } + // @todo Rename to Node_Visitor::REMOVE_NODE once we drop support for PHP-Parser 4.x return NodeTraverser::REMOVE_NODE; } // Expand every "use" statement in the group into a full, standalone "use" and store 'em with the others. if ($node instanceof GroupUse) { - foreach ($node->uses as $use) { - $alias = $use->alias ?: \end($use->name->parts); - $this->aliases[\strtolower($alias)] = Name::concat($node->prefix, $use->name, [ + foreach ($node->uses as $useItem) { + $this->aliases[\strtolower($useItem->getAlias())] = Name::concat($node->prefix, $useItem->name, [ 'startLine' => $node->prefix->getAttribute('startLine'), - 'endLine' => $use->name->getAttribute('endLine'), + 'endLine' => $useItem->name->getAttribute('endLine'), ]); } + // @todo Rename to Node_Visitor::REMOVE_NODE once we drop support for PHP-Parser 4.x return NodeTraverser::REMOVE_NODE; } @@ -98,8 +103,9 @@ class UseStatementPass extends CodeCleanerPass return; } - // Do nothing with UseUse; this an entry in the list of uses in the use statement. - if ($node instanceof UseUse) { + // Do nothing with UseItem; this an entry in the list of uses in the use statement. + // @todo Remove UseUse once we drop support for PHP-Parser 4.x + if ($node instanceof UseUse || $node instanceof UseItem) { return; } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php index d077dea7..dff32d58 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -46,6 +46,8 @@ class ValidClassNamePass extends NamespaceAwarePass * trait methods. * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -70,13 +72,13 @@ class ValidClassNamePass extends NamespaceAwarePass /** * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { if (self::isConditional($node)) { $this->conditionalScopes--; - - return; } } @@ -257,35 +259,12 @@ class ValidClassNamePass extends NamespaceAwarePass } } - /** - * Get a symbol type key for storing in the scope name cache. - * - * @deprecated No longer used. Scope type should be passed into ensureCanDefine directly. - * @codeCoverageIgnore - * - * @param Stmt $stmt - * - * @return string - */ - protected function getScopeType(Stmt $stmt): string - { - if ($stmt instanceof Class_) { - return self::CLASS_TYPE; - } elseif ($stmt instanceof Interface_) { - return self::INTERFACE_TYPE; - } elseif ($stmt instanceof Trait_) { - return self::TRAIT_TYPE; - } - } - /** * Check whether a class exists, or has been defined in the current code snippet. * * Gives `self`, `static` and `parent` a free pass. * * @param string $name - * - * @return bool */ protected function classExists(string $name): bool { @@ -303,8 +282,6 @@ class ValidClassNamePass extends NamespaceAwarePass * Check whether an interface exists, or has been defined in the current code snippet. * * @param string $name - * - * @return bool */ protected function interfaceExists(string $name): bool { @@ -315,8 +292,6 @@ class ValidClassNamePass extends NamespaceAwarePass * Check whether a trait exists, or has been defined in the current code snippet. * * @param string $name - * - * @return bool */ protected function traitExists(string $name): bool { @@ -343,11 +318,9 @@ class ValidClassNamePass extends NamespaceAwarePass * * @param string $msg * @param Stmt $stmt - * - * @return FatalErrorException */ protected function createError(string $msg, Stmt $stmt): FatalErrorException { - return new FatalErrorException($msg, 0, \E_ERROR, null, $stmt->getLine()); + return new FatalErrorException($msg, 0, \E_ERROR, null, $stmt->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php index fac59103..481de6fc 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,7 @@ namespace Psy\CodeCleaner; use PhpParser\Node; -use PhpParser\Node\Identifier; +use PhpParser\Node\Name; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Namespace_; @@ -35,6 +35,9 @@ class ValidConstructorPass extends CodeCleanerPass { private $namespace; + /** + * @return Node[]|null Array of nodes + */ public function beforeTraverse(array $nodes) { $this->namespace = []; @@ -47,11 +50,13 @@ class ValidConstructorPass extends CodeCleanerPass * @throws FatalErrorException the constructor function has a return type * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { if ($node instanceof Namespace_) { - $this->namespace = isset($node->name) ? $node->name->parts : []; + $this->namespace = isset($node->name) ? $this->getParts($node->name) : []; } elseif ($node instanceof Class_) { $constructor = null; foreach ($node->stmts as $stmt) { @@ -86,27 +91,31 @@ class ValidConstructorPass extends CodeCleanerPass private function validateConstructor(Node $constructor, Node $classNode) { if ($constructor->isStatic()) { - // For PHP Parser 4.x - $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = \sprintf( 'Constructor %s::%s() cannot be static', - \implode('\\', \array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $classNode->name->toString())), $constructor->name ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getStartLine()); } if (\method_exists($constructor, 'getReturnType') && $constructor->getReturnType()) { - // For PHP Parser 4.x - $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = \sprintf( 'Constructor %s::%s() cannot declare a return type', - \implode('\\', \array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $classNode->name->toString())), $constructor->name ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getStartLine()); } } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make $namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; + } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php index 2e35c7f8..bd20607c 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -35,6 +35,8 @@ class ValidFunctionNamePass extends NamespaceAwarePass * @throws FatalErrorException if a function is redefined in a non-conditional scope * * @param Node $node + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -51,7 +53,7 @@ class ValidFunctionNamePass extends NamespaceAwarePass if (\function_exists($name) || isset($this->currentScope[\strtolower($name)])) { $msg = \sprintf('Cannot redeclare %s()', $name); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } @@ -61,6 +63,8 @@ class ValidFunctionNamePass extends NamespaceAwarePass /** * @param Node $node + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { diff --git a/vendor/psy/psysh/src/Command/BufferCommand.php b/vendor/psy/psysh/src/Command/BufferCommand.php index f563fb19..8348aee6 100644 --- a/vendor/psy/psysh/src/Command/BufferCommand.php +++ b/vendor/psy/psysh/src/Command/BufferCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,6 +11,7 @@ namespace Psy\Command; +use Psy\Exception\RuntimeException; use Psy\Output\ShellOutput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -46,12 +47,19 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { - $buf = $this->getApplication()->getCodeBuffer(); + $app = $this->getApplication(); + if (!$app instanceof \Psy\Shell) { + throw new RuntimeException('Buffer command requires a \Psy\Shell application'); + } + + $buf = $app->getCodeBuffer(); if ($input->getOption('clear')) { - $this->getApplication()->resetCodeBuffer(); + $app->resetCodeBuffer(); $output->writeln($this->formatLines($buf, 'urgent'), ShellOutput::NUMBER_LINES); } else { $output->writeln($this->formatLines($buf), ShellOutput::NUMBER_LINES); diff --git a/vendor/psy/psysh/src/Command/ClearCommand.php b/vendor/psy/psysh/src/Command/ClearCommand.php index 72901cd0..42a66b0f 100644 --- a/vendor/psy/psysh/src/Command/ClearCommand.php +++ b/vendor/psy/psysh/src/Command/ClearCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -41,8 +41,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $output->write(\sprintf('%c[2J%c[0;0f', 27, 27)); diff --git a/vendor/psy/psysh/src/Command/Command.php b/vendor/psy/psysh/src/Command/Command.php index 56417408..b9dc1b8a 100644 --- a/vendor/psy/psysh/src/Command/Command.php +++ b/vendor/psy/psysh/src/Command/Command.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,6 @@ use Psy\Shell; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command as BaseCommand; use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Helper\TableStyle; use Symfony\Component\Console\Output\OutputInterface; @@ -31,13 +30,13 @@ abstract class Command extends BaseCommand * * @api */ - public function setApplication(Application $application = null) + public function setApplication(?Application $application = null): void { if ($application !== null && !$application instanceof Shell) { throw new \InvalidArgumentException('PsySH Commands require an instance of Psy\Shell'); } - return parent::setApplication($application); + parent::setApplication($application); } /** @@ -86,7 +85,7 @@ abstract class Command extends BaseCommand /** * These arguments will be excluded from help output. * - * @return array + * @return string[] */ protected function getHiddenArguments(): array { @@ -108,7 +107,7 @@ abstract class Command extends BaseCommand /** * These options will be excluded from help output. * - * @return array + * @return string[] */ protected function getHiddenOptions(): array { @@ -117,8 +116,6 @@ abstract class Command extends BaseCommand /** * Format command aliases as text.. - * - * @return string */ private function aliasesAsText(): string { @@ -127,8 +124,6 @@ abstract class Command extends BaseCommand /** * Format command arguments as text. - * - * @return string */ private function argumentsAsText(): string { @@ -147,7 +142,7 @@ abstract class Command extends BaseCommand $description = \str_replace("\n", "\n".\str_pad('', $max + 2, ' '), $argument->getDescription()); - $messages[] = \sprintf(" %-${max}s %s%s", $argument->getName(), $description, $default); + $messages[] = \sprintf(" %-{$max}s %s%s", $argument->getName(), $description, $default); } $messages[] = ''; @@ -158,8 +153,6 @@ abstract class Command extends BaseCommand /** * Format options as text. - * - * @return string */ private function optionsAsText(): string { @@ -182,7 +175,7 @@ abstract class Command extends BaseCommand $optionMax = $max - \strlen($option->getName()) - 2; $messages[] = \sprintf( - " %s %-${optionMax}s%s%s%s", + " %s %-{$optionMax}s%s%s%s", '--'.$option->getName(), $option->getShortcut() ? \sprintf('(-%s) ', $option->getShortcut()) : '', $description, @@ -199,8 +192,6 @@ abstract class Command extends BaseCommand /** * Calculate the maximum padding width for a set of lines. - * - * @return int */ private function getMaxWidth(): int { @@ -226,8 +217,6 @@ abstract class Command extends BaseCommand * Format an option default as text. * * @param mixed $default - * - * @return string */ private function formatDefaultValue($default): string { @@ -241,16 +230,10 @@ abstract class Command extends BaseCommand /** * Get a Table instance. * - * Falls back to legacy TableHelper. - * - * @return Table|TableHelper + * @return Table */ protected function getTable(OutputInterface $output) { - if (!\class_exists(Table::class)) { - return $this->getTableHelper(); - } - $style = new TableStyle(); // Symfony 4.1 deprecated single-argument style setters. @@ -270,20 +253,4 @@ abstract class Command extends BaseCommand ->setRows([]) ->setStyle($style); } - - /** - * Legacy fallback for getTable. - * - * @return TableHelper - */ - protected function getTableHelper(): TableHelper - { - $table = $this->getApplication()->getHelperSet()->get('table'); - - return $table - ->setRows([]) - ->setLayout(TableHelper::LAYOUT_BORDERLESS) - ->setHorizontalBorderChar('') - ->setCrossingChar(''); - } } diff --git a/vendor/psy/psysh/src/Command/DocCommand.php b/vendor/psy/psysh/src/Command/DocCommand.php index c50790f2..1650ccf6 100644 --- a/vendor/psy/psysh/src/Command/DocCommand.php +++ b/vendor/psy/psysh/src/Command/DocCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,8 +14,8 @@ namespace Psy\Command; use Psy\Formatter\DocblockFormatter; use Psy\Formatter\SignatureFormatter; use Psy\Input\CodeArgument; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Output\ShellOutput; +use Psy\Reflection\ReflectionConstant; use Psy\Reflection\ReflectionLanguageConstruct; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -59,8 +59,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $value = $input->getArgument('target'); if (ReflectionLanguageConstruct::isLanguageConstruct($value)) { @@ -143,14 +145,13 @@ HELP break; case \ReflectionClassConstant::class: - case ReflectionClassConstant::class: // @todo this is going to collide with ReflectionMethod ids // someday... start running the query by id + type if the DB // supports it. $id = $reflector->class.'::'.$reflector->name; break; - case ReflectionConstant_::class: + case ReflectionConstant::class: $id = $reflector->name; break; @@ -242,9 +243,10 @@ HELP private function getManualDocById($id) { if ($db = $this->getApplication()->getManualDb()) { - return $db - ->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) - ->fetchColumn(0); + $result = $db->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))); + if ($result !== false) { + return $result->fetchColumn(0); + } } } } diff --git a/vendor/psy/psysh/src/Command/DumpCommand.php b/vendor/psy/psysh/src/Command/DumpCommand.php index 24e7c554..88ddbe26 100644 --- a/vendor/psy/psysh/src/Command/DumpCommand.php +++ b/vendor/psy/psysh/src/Command/DumpCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -66,8 +66,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $depth = $input->getOption('depth'); $target = $this->resolveCode($input->getArgument('target')); @@ -79,18 +81,4 @@ HELP return 0; } - - /** - * @deprecated Use `resolveCode` instead - * - * @param string $name - * - * @return mixed - */ - protected function resolveTarget(string $name) - { - @\trigger_error('`resolveTarget` is deprecated; use `resolveCode` instead.', \E_USER_DEPRECATED); - - return $this->resolveCode($name); - } } diff --git a/vendor/psy/psysh/src/Command/EditCommand.php b/vendor/psy/psysh/src/Command/EditCommand.php index 96854e7b..0a6d00fe 100644 --- a/vendor/psy/psysh/src/Command/EditCommand.php +++ b/vendor/psy/psysh/src/Command/EditCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -74,10 +74,12 @@ class EditCommand extends Command implements ContextAware * @param InputInterface $input * @param OutputInterface $output * + * @return int 0 if everything went fine, or an exit code + * * @throws \InvalidArgumentException when both exec and no-exec flags are given or if a given variable is not found in the current context * @throws \UnexpectedValueException if file_get_contents on the edited file returns false instead of a string */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('exec') && $input->getOption('no-exec')) { @@ -112,10 +114,8 @@ class EditCommand extends Command implements ContextAware * @param bool $execOption * @param bool $noExecOption * @param string|null $filePath - * - * @return bool */ - private function shouldExecuteFile(bool $execOption, bool $noExecOption, string $filePath = null): bool + private function shouldExecuteFile(bool $execOption, bool $noExecOption, ?string $filePath = null): bool { if ($execOption) { return true; @@ -136,7 +136,7 @@ class EditCommand extends Command implements ContextAware * * @throws \InvalidArgumentException If the variable is not found in the current context */ - private function extractFilePath(string $fileArgument = null) + private function extractFilePath(?string $fileArgument = null) { // If the file argument was a variable, get it from the context if ($fileArgument !== null && @@ -152,8 +152,6 @@ class EditCommand extends Command implements ContextAware * @param string $filePath * @param bool $shouldRemoveFile * - * @return string - * * @throws \UnexpectedValueException if file_get_contents on $filePath returns false instead of a string */ private function editFile(string $filePath, bool $shouldRemoveFile): string diff --git a/vendor/psy/psysh/src/Command/ExitCommand.php b/vendor/psy/psysh/src/Command/ExitCommand.php index 183438f9..6552e288 100644 --- a/vendor/psy/psysh/src/Command/ExitCommand.php +++ b/vendor/psy/psysh/src/Command/ExitCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -44,8 +44,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { throw new BreakException('Goodbye'); } diff --git a/vendor/psy/psysh/src/Command/HelpCommand.php b/vendor/psy/psysh/src/Command/HelpCommand.php index d15cc4f4..13ea3483 100644 --- a/vendor/psy/psysh/src/Command/HelpCommand.php +++ b/vendor/psy/psysh/src/Command/HelpCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,6 @@ namespace Psy\Command; use Psy\Output\ShellOutput; -use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -53,8 +52,10 @@ class HelpCommand extends Command /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->command !== null) { // help for an individual command @@ -91,11 +92,7 @@ class HelpCommand extends Command $output->startPaging(); } - if ($table instanceof TableHelper) { - $table->render($output); - } else { - $table->render(); - } + $table->render(); if ($output instanceof ShellOutput) { $output->stopPaging(); diff --git a/vendor/psy/psysh/src/Command/HistoryCommand.php b/vendor/psy/psysh/src/Command/HistoryCommand.php index 52fe88ed..cf5f29b9 100644 --- a/vendor/psy/psysh/src/Command/HistoryCommand.php +++ b/vendor/psy/psysh/src/Command/HistoryCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -90,8 +90,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->validateOnlyOne($input, ['show', 'head', 'tail']); $this->validateOnlyOne($input, ['save', 'replay', 'clear']); diff --git a/vendor/psy/psysh/src/Command/ListCommand.php b/vendor/psy/psysh/src/Command/ListCommand.php index 675703bf..1982aa4c 100644 --- a/vendor/psy/psysh/src/Command/ListCommand.php +++ b/vendor/psy/psysh/src/Command/ListCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,7 +26,6 @@ use Psy\Output\ShellOutput; use Psy\VarDumper\Presenter; use Psy\VarDumper\PresenterAware; use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\TableHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -112,8 +111,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->validateInput($input); $this->initEnumerators(); @@ -211,11 +212,7 @@ HELP $table->addRow([$this->formatItemName($item), $item['value']]); } - if ($table instanceof TableHelper) { - $table->render($output); - } else { - $table->render(); - } + $table->render(); } } @@ -223,8 +220,6 @@ HELP * Format an item name given its visibility. * * @param array $item - * - * @return string */ private function formatItemName(array $item): string { diff --git a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php index a6344881..9bc56748 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,7 +11,6 @@ namespace Psy\Command\ListCommand; -use Psy\Reflection\ReflectionClassConstant; use Symfony\Component\Console\Input\InputInterface; /** @@ -22,7 +21,7 @@ class ClassConstantEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // only list constants when a Reflector is present. if ($reflector === null) { @@ -56,18 +55,18 @@ class ClassConstantEnumerator extends Enumerator /** * Get defined constants for the given class or object Reflector. * - * @param \Reflector $reflector - * @param bool $noInherit Exclude inherited constants + * @param \ReflectionClass $reflector + * @param bool $noInherit Exclude inherited constants * * @return array */ - protected function getConstants(\Reflector $reflector, bool $noInherit = false): array + protected function getConstants(\ReflectionClass $reflector, bool $noInherit = false): array { $className = $reflector->getName(); $constants = []; foreach ($reflector->getConstants() as $name => $constant) { - $constReflector = ReflectionClassConstant::create($reflector->name, $name); + $constReflector = new \ReflectionClassConstant($reflector->name, $name); if ($noInherit && $constReflector->getDeclaringClass()->getName() !== $className) { continue; @@ -110,8 +109,6 @@ class ClassConstantEnumerator extends Enumerator * Get a label for the particular kind of "class" represented. * * @param \ReflectionClass $reflector - * - * @return string */ protected function getKindLabel(\ReflectionClass $reflector): string { diff --git a/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php index c6a7c252..b0edf035 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ class ClassEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // if we have a reflector, ensure that it's a namespace reflector if (($target !== null || $reflector !== null) && !$reflector instanceof ReflectionNamespace) { @@ -66,7 +66,7 @@ class ClassEnumerator extends Enumerator * * @return array */ - protected function filterClasses(string $key, array $classes, bool $internal, bool $user, string $prefix = null): array + protected function filterClasses(string $key, array $classes, bool $internal, bool $user, ?string $prefix = null): array { $ret = []; diff --git a/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php index b66862b7..a754c1de 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -49,7 +49,7 @@ class ConstantEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // if we have a reflector, ensure that it's a namespace reflector if (($target !== null || $reflector !== null) && !$reflector instanceof ReflectionNamespace) { @@ -122,7 +122,7 @@ class ConstantEnumerator extends Enumerator * * @return array */ - protected function getConstants(string $category = null): array + protected function getConstants(?string $category = null): array { if (!$category) { return \get_defined_constants(); @@ -133,7 +133,7 @@ class ConstantEnumerator extends Enumerator if ($category === 'internal') { unset($consts['user']); - return \call_user_func_array('array_merge', \array_values($consts)); + return \array_merge(...\array_values($consts)); } foreach ($consts as $key => $value) { diff --git a/vendor/psy/psysh/src/Command/ListCommand/Enumerator.php b/vendor/psy/psysh/src/Command/ListCommand/Enumerator.php index 05322b98..83bdf67a 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/Enumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/Enumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -54,7 +54,7 @@ abstract class Enumerator * * @return array */ - public function enumerate(InputInterface $input, \Reflector $reflector = null, $target = null): array + public function enumerate(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { $this->filter->bind($input); @@ -82,7 +82,7 @@ abstract class Enumerator * * @return array */ - abstract protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array; + abstract protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array; protected function showItem($name) { diff --git a/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php index f4323f23..fe3891a5 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ class FunctionEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // if we have a reflector, ensure that it's a namespace reflector if (($target !== null || $reflector !== null) && !$reflector instanceof ReflectionNamespace) { @@ -67,7 +67,7 @@ class FunctionEnumerator extends Enumerator * * @return array */ - protected function getFunctions(string $type = null): array + protected function getFunctions(?string $type = null): array { $funcs = \get_defined_functions(); @@ -86,7 +86,7 @@ class FunctionEnumerator extends Enumerator * * @return array */ - protected function prepareFunctions(array $functions, string $prefix = null): array + protected function prepareFunctions(array $functions, ?string $prefix = null): array { \natcasesort($functions); diff --git a/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php index a643cc1f..81be16e5 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ class GlobalVariableEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // only list globals when no Reflector is present. if ($reflector !== null || $target !== null) { diff --git a/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php index a2e33317..e7b4503f 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ class MethodEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // only list methods when a Reflector is present. if ($reflector === null) { @@ -55,13 +55,13 @@ class MethodEnumerator extends Enumerator /** * Get defined methods for the given class or object Reflector. * - * @param bool $showAll Include private and protected methods - * @param \Reflector $reflector - * @param bool $noInherit Exclude inherited methods + * @param bool $showAll Include private and protected methods + * @param \ReflectionClass $reflector + * @param bool $noInherit Exclude inherited methods * * @return array */ - protected function getMethods(bool $showAll, \Reflector $reflector, bool $noInherit = false): array + protected function getMethods(bool $showAll, \ReflectionClass $reflector, bool $noInherit = false): array { $className = $reflector->getName(); @@ -112,8 +112,6 @@ class MethodEnumerator extends Enumerator * Get a label for the particular kind of "class" represented. * * @param \ReflectionClass $reflector - * - * @return string */ protected function getKindLabel(\ReflectionClass $reflector): string { @@ -130,8 +128,6 @@ class MethodEnumerator extends Enumerator * Get output style for the given method's visibility. * * @param \ReflectionMethod $method - * - * @return string */ private function getVisibilityStyle(\ReflectionMethod $method): string { diff --git a/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php index 1258448e..17661455 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ class PropertyEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // only list properties when a Reflector is present. @@ -56,13 +56,13 @@ class PropertyEnumerator extends Enumerator /** * Get defined properties for the given class or object Reflector. * - * @param bool $showAll Include private and protected properties - * @param \Reflector $reflector - * @param bool $noInherit Exclude inherited properties + * @param bool $showAll Include private and protected properties + * @param \ReflectionClass $reflector + * @param bool $noInherit Exclude inherited properties * * @return array */ - protected function getProperties(bool $showAll, \Reflector $reflector, bool $noInherit = false): array + protected function getProperties(bool $showAll, \ReflectionClass $reflector, bool $noInherit = false): array { $className = $reflector->getName(); @@ -112,8 +112,6 @@ class PropertyEnumerator extends Enumerator * Get a label for the particular kind of "class" represented. * * @param \ReflectionClass $reflector - * - * @return string */ protected function getKindLabel(\ReflectionClass $reflector): string { @@ -128,8 +126,6 @@ class PropertyEnumerator extends Enumerator * Get output style for the given property's visibility. * * @param \ReflectionProperty $property - * - * @return string */ private function getVisibilityStyle(\ReflectionProperty $property): string { @@ -147,8 +143,6 @@ class PropertyEnumerator extends Enumerator * * @param \ReflectionProperty $property * @param mixed $target - * - * @return string */ protected function presentValue(\ReflectionProperty $property, $target): string { diff --git a/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php index ecc69040..2da1c6d7 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -45,7 +45,7 @@ class VariableEnumerator extends Enumerator /** * {@inheritdoc} */ - protected function listItems(InputInterface $input, \Reflector $reflector = null, $target = null): array + protected function listItems(InputInterface $input, ?\Reflector $reflector = null, $target = null): array { // only list variables when no Reflector is present. if ($reflector !== null || $target !== null) { diff --git a/vendor/psy/psysh/src/Command/ParseCommand.php b/vendor/psy/psysh/src/Command/ParseCommand.php index c2f8ab0f..d97c751a 100644 --- a/vendor/psy/psysh/src/Command/ParseCommand.php +++ b/vendor/psy/psysh/src/Command/ParseCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,6 @@ namespace Psy\Command; use PhpParser\Node; -use PhpParser\Parser; use Psy\Context; use Psy\ContextAware; use Psy\Input\CodeArgument; @@ -37,16 +36,14 @@ class ParseCommand extends Command implements ContextAware, PresenterAware protected $context; private $presenter; - private $parserFactory; - private $parsers; + private $parser; /** * {@inheritdoc} */ public function __construct($name = null) { - $this->parserFactory = new ParserFactory(); - $this->parsers = []; + $this->parser = (new ParserFactory())->createParser(); parent::__construct($name); } @@ -90,16 +87,11 @@ class ParseCommand extends Command implements ContextAware, PresenterAware */ protected function configure() { - $kindMsg = 'One of PhpParser\\ParserFactory constants: ' - .\implode(', ', ParserFactory::getPossibleKinds()) - ." (default is based on current interpreter's version)."; - $this ->setName('parse') ->setDefinition([ new CodeArgument('code', CodeArgument::REQUIRED, 'PHP code to parse.'), new InputOption('depth', '', InputOption::VALUE_REQUIRED, 'Depth to parse.', 10), - new InputOption('kind', '', InputOption::VALUE_REQUIRED, $kindMsg, $this->parserFactory->getDefaultKind()), ]) ->setDescription('Parse PHP code and show the abstract syntax tree.') ->setHelp( @@ -119,58 +111,17 @@ HELP /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); - if (\strpos($code, 'getOption('kind'); $depth = $input->getOption('depth'); - $nodes = $this->parse($this->getParser($parserKind), $code); + + $nodes = $this->parser->parse($code); $output->page($this->presenter->present($nodes, $depth)); $this->context->setReturnValue($nodes); return 0; } - - /** - * Lex and parse a string of code into statements. - * - * @param Parser $parser - * @param string $code - * - * @return array Statements - */ - private function parse(Parser $parser, string $code): array - { - try { - return $parser->parse($code); - } catch (\PhpParser\Error $e) { - if (\strpos($e->getMessage(), 'unexpected EOF') === false) { - throw $e; - } - - // If we got an unexpected EOF, let's try it again with a semicolon. - return $parser->parse($code.';'); - } - } - - /** - * Get (or create) the Parser instance. - * - * @param string|null $kind One of Psy\ParserFactory constants (only for PHP parser 2.0 and above) - * - * @return Parser - */ - private function getParser(string $kind = null): Parser - { - if (!\array_key_exists($kind, $this->parsers)) { - $this->parsers[$kind] = $this->parserFactory->createParser($kind); - } - - return $this->parsers[$kind]; - } } diff --git a/vendor/psy/psysh/src/Command/PsyVersionCommand.php b/vendor/psy/psysh/src/Command/PsyVersionCommand.php index c78889c8..959a9a78 100644 --- a/vendor/psy/psysh/src/Command/PsyVersionCommand.php +++ b/vendor/psy/psysh/src/Command/PsyVersionCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,7 +34,7 @@ class PsyVersionCommand extends Command /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln($this->getApplication()->getVersion()); diff --git a/vendor/psy/psysh/src/Command/ReflectingCommand.php b/vendor/psy/psysh/src/Command/ReflectingCommand.php index 80683342..55f919bb 100644 --- a/vendor/psy/psysh/src/Command/ReflectingCommand.php +++ b/vendor/psy/psysh/src/Command/ReflectingCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -11,14 +11,16 @@ namespace Psy\Command; +use PhpParser\NodeTraverser; +use PhpParser\PrettyPrinter\Standard as Printer; use Psy\CodeCleaner\NoReturnValue; use Psy\Context; use Psy\ContextAware; use Psy\Exception\ErrorException; use Psy\Exception\RuntimeException; use Psy\Exception\UnexpectedTargetException; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; +use Psy\Sudo\SudoVisitor; use Psy\Util\Mirror; /** @@ -38,6 +40,26 @@ abstract class ReflectingCommand extends Command implements ContextAware */ protected $context; + private $parser; + private $traverser; + private $printer; + + /** + * {@inheritdoc} + */ + public function __construct($name = null) + { + $this->parser = new CodeArgumentParser(); + + // @todo Pass visitor directly to once we drop support for PHP-Parser 4.x + $this->traverser = new NodeTraverser(); + $this->traverser->addVisitor(new SudoVisitor()); + + $this->printer = new Printer(); + + parent::__construct($name); + } + /** * ContextAware interface. * @@ -92,8 +114,6 @@ abstract class ReflectingCommand extends Command implements ContextAware * * @param string $name * @param bool $includeFunctions (default: false) - * - * @return string */ protected function resolveName(string $name, bool $includeFunctions = false): string { @@ -172,7 +192,10 @@ abstract class ReflectingCommand extends Command implements ContextAware protected function resolveCode(string $code) { try { - $value = $this->getApplication()->execute($code, true); + // Add an implicit `sudo` to target resolution. + $nodes = $this->traverser->traverse($this->parser->parse($code)); + $sudoCode = $this->printer->prettyPrint($nodes); + $value = $this->getApplication()->execute($sudoCode, true); } catch (\Throwable $e) { // Swallow all exceptions? } @@ -204,20 +227,6 @@ abstract class ReflectingCommand extends Command implements ContextAware return $value; } - /** - * @deprecated Use `resolveCode` instead - * - * @param string $name - * - * @return mixed Variable instance - */ - protected function resolveInstance(string $name) - { - @\trigger_error('`resolveInstance` is deprecated; use `resolveCode` instead.', \E_USER_DEPRECATED); - - return $this->resolveCode($name); - } - /** * Get a variable from the current shell scope. * @@ -291,7 +300,6 @@ abstract class ReflectingCommand extends Command implements ContextAware case \ReflectionProperty::class: case \ReflectionClassConstant::class: - case ReflectionClassConstant::class: $classReflector = $reflector->getDeclaringClass(); $vars['__class'] = $classReflector->name; if ($classReflector->inNamespace()) { @@ -304,7 +312,7 @@ abstract class ReflectingCommand extends Command implements ContextAware } break; - case ReflectionConstant_::class: + case ReflectionConstant::class: if ($reflector->inNamespace()) { $vars['__namespace'] = $reflector->getNamespaceName(); } diff --git a/vendor/psy/psysh/src/Command/ShowCommand.php b/vendor/psy/psysh/src/Command/ShowCommand.php index 1abb7cbc..4d721d72 100644 --- a/vendor/psy/psysh/src/Command/ShowCommand.php +++ b/vendor/psy/psysh/src/Command/ShowCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,14 +29,6 @@ class ShowCommand extends ReflectingCommand private $lastException; private $lastExceptionIndex; - /** - * @param string|null $colorMode (deprecated and ignored) - */ - public function __construct($colorMode = null) - { - parent::__construct(); - } - /** * {@inheritdoc} */ @@ -69,8 +61,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { // n.b. As far as I can tell, InputInterface doesn't want to tell me // whether an option with an optional value was actually passed. If you diff --git a/vendor/psy/psysh/src/Command/SudoCommand.php b/vendor/psy/psysh/src/Command/SudoCommand.php index 7912a1d5..7a29e8b5 100644 --- a/vendor/psy/psysh/src/Command/SudoCommand.php +++ b/vendor/psy/psysh/src/Command/SudoCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,6 @@ namespace Psy\Command; use PhpParser\NodeTraverser; use PhpParser\PrettyPrinter\Standard as Printer; use Psy\Input\CodeArgument; -use Psy\ParserFactory; use Psy\Readline\Readline; use Psy\Sudo\SudoVisitor; use Symfony\Component\Console\Input\InputInterface; @@ -35,9 +34,9 @@ class SudoCommand extends Command */ public function __construct($name = null) { - $parserFactory = new ParserFactory(); - $this->parser = $parserFactory->createParser(); + $this->parser = new CodeArgumentParser(); + // @todo Pass visitor directly to once we drop support for PHP-Parser 4.x $this->traverser = new NodeTraverser(); $this->traverser->addVisitor(new SudoVisitor()); @@ -95,8 +94,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); @@ -109,11 +110,7 @@ HELP $code = $history[\count($history) - 2]; } - if (\strpos($code, 'traverser->traverse($this->parse($code)); + $nodes = $this->traverser->traverse($this->parser->parse($code)); $sudoCode = $this->printer->prettyPrint($nodes); $shell = $this->getApplication(); @@ -121,25 +118,4 @@ HELP return 0; } - - /** - * Lex and parse a string of code into statements. - * - * @param string $code - * - * @return array Statements - */ - private function parse(string $code): array - { - try { - return $this->parser->parse($code); - } catch (\PhpParser\Error $e) { - if (\strpos($e->getMessage(), 'unexpected EOF') === false) { - throw $e; - } - - // If we got an unexpected EOF, let's try it again with a semicolon. - return $this->parser->parse($code.';'); - } - } } diff --git a/vendor/psy/psysh/src/Command/ThrowUpCommand.php b/vendor/psy/psysh/src/Command/ThrowUpCommand.php index d7bf63b7..f6ba73d6 100644 --- a/vendor/psy/psysh/src/Command/ThrowUpCommand.php +++ b/vendor/psy/psysh/src/Command/ThrowUpCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,24 +13,21 @@ namespace Psy\Command; use PhpParser\Node\Arg; use PhpParser\Node\Expr\New_; -use PhpParser\Node\Expr\StaticCall; +use PhpParser\Node\Expr\Throw_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name\FullyQualified as FullyQualifiedName; use PhpParser\Node\Scalar\String_; -use PhpParser\Node\Stmt\Throw_; +use PhpParser\Node\Stmt\Expression; use PhpParser\PrettyPrinter\Standard as Printer; -use Psy\Context; -use Psy\ContextAware; use Psy\Exception\ThrowUpException; use Psy\Input\CodeArgument; -use Psy\ParserFactory; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * Throw an exception or error out of the Psy Shell. */ -class ThrowUpCommand extends Command implements ContextAware +class ThrowUpCommand extends Command { private $parser; private $printer; @@ -40,24 +37,12 @@ class ThrowUpCommand extends Command implements ContextAware */ public function __construct($name = null) { - $parserFactory = new ParserFactory(); - - $this->parser = $parserFactory->createParser(); + $this->parser = new CodeArgumentParser(); $this->printer = new Printer(); parent::__construct($name); } - /** - * @deprecated throwUp no longer needs to be ContextAware - * - * @param Context $context - */ - public function setContext(Context $context) - { - // Do nothing - } - /** * {@inheritdoc} */ @@ -87,12 +72,14 @@ HELP /** * {@inheritdoc} * + * @return int 0 if everything went fine, or an exit code + * * @throws \InvalidArgumentException if there is no exception to throw */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $args = $this->prepareArgs($input->getArgument('exception')); - $throwStmt = new Throw_(new StaticCall(new FullyQualifiedName(ThrowUpException::class), 'fromThrowable', $args)); + $throwStmt = new Expression(new Throw_(new New_(new FullyQualifiedName(ThrowUpException::class), $args))); $throwCode = $this->printer->prettyPrint([$throwStmt]); $shell = $this->getApplication(); @@ -112,26 +99,20 @@ HELP * * @return Arg[] */ - private function prepareArgs(string $code = null): array + private function prepareArgs(?string $code = null): array { if (!$code) { // Default to last exception if nothing else was supplied return [new Arg(new Variable('_e'))]; } - if (\strpos($code, 'parse($code); + $nodes = $this->parser->parse($code); if (\count($nodes) !== 1) { throw new \InvalidArgumentException('No idea how to throw this'); } $node = $nodes[0]; - - // Make this work for PHP Parser v3.x - $expr = isset($node->expr) ? $node->expr : $node; + $expr = $node->expr; $args = [new Arg($expr, false, false, $node->getAttributes())]; @@ -142,25 +123,4 @@ HELP return $args; } - - /** - * Lex and parse a string of code into statements. - * - * @param string $code - * - * @return array Statements - */ - private function parse(string $code): array - { - try { - return $this->parser->parse($code); - } catch (\PhpParser\Error $e) { - if (\strpos($e->getMessage(), 'unexpected EOF') === false) { - throw $e; - } - - // If we got an unexpected EOF, let's try it again with a semicolon. - return $this->parser->parse($code.';'); - } - } } diff --git a/vendor/psy/psysh/src/Command/TimeitCommand.php b/vendor/psy/psysh/src/Command/TimeitCommand.php index 4aa3967e..3b3cf50d 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,6 @@ use PhpParser\NodeTraverser; use PhpParser\PrettyPrinter\Standard as Printer; use Psy\Command\TimeitCommand\TimeitVisitor; use Psy\Input\CodeArgument; -use Psy\ParserFactory; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -28,6 +27,7 @@ class TimeitCommand extends Command const RESULT_MSG = 'Command took %.6f seconds to complete.'; const AVG_RESULT_MSG = 'Command took %.6f seconds on average (%.6f median; %.6f total) to complete.'; + // All times stored as nanoseconds! private static $start = null; private static $times = []; @@ -40,9 +40,9 @@ class TimeitCommand extends Command */ public function __construct($name = null) { - $parserFactory = new ParserFactory(); - $this->parser = $parserFactory->createParser(); + $this->parser = new CodeArgumentParser(); + // @todo Pass visitor directly to once we drop support for PHP-Parser 4.x $this->traverser = new NodeTraverser(); $this->traverser->addVisitor(new TimeitVisitor()); @@ -76,21 +76,23 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); - $num = $input->getOption('num') ?: 1; + $num = (int) ($input->getOption('num') ?: 1); $shell = $this->getApplication(); $instrumentedCode = $this->instrumentCode($code); self::$times = []; - for ($i = 0; $i < $num; $i++) { + do { $_ = $shell->execute($instrumentedCode); $this->ensureEndMarked(); - } + } while (\count(self::$times) < $num); $shell->writeReturnValue($_); @@ -98,13 +100,13 @@ HELP self::$times = []; if ($num === 1) { - $output->writeln(\sprintf(self::RESULT_MSG, $times[0])); + $output->writeln(\sprintf(self::RESULT_MSG, $times[0] / 1e+9)); } else { $total = \array_sum($times); \rsort($times); $median = $times[\round($num / 2)]; - $output->writeln(\sprintf(self::AVG_RESULT_MSG, $total / $num, $median, $total)); + $output->writeln(\sprintf(self::AVG_RESULT_MSG, ($total / $num) / 1e+9, $median / 1e+9, $total / 1e+9)); } return 0; @@ -119,7 +121,7 @@ HELP */ public static function markStart() { - self::$start = \microtime(true); + self::$start = \hrtime(true); } /** @@ -138,7 +140,7 @@ HELP */ public static function markEnd($ret = null) { - self::$times[] = \microtime(true) - self::$start; + self::$times[] = \hrtime(true) - self::$start; self::$start = null; return $ret; @@ -162,36 +164,9 @@ HELP * * This inserts `markStart` and `markEnd` calls to ensure that (reasonably) * accurate times are recorded for just the code being executed. - * - * @param string $code - * - * @return string */ private function instrumentCode(string $code): string { - return $this->printer->prettyPrint($this->traverser->traverse($this->parse($code))); - } - - /** - * Lex and parse a string of code into statements. - * - * @param string $code - * - * @return array Statements - */ - private function parse(string $code): array - { - $code = 'parser->parse($code); - } catch (\PhpParser\Error $e) { - if (\strpos($e->getMessage(), 'unexpected EOF') === false) { - throw $e; - } - - // If we got an unexpected EOF, let's try it again with a semicolon. - return $this->parser->parse($code.';'); - } + return $this->printer->prettyPrint($this->traverser->traverse($this->parser->parse($code))); } } diff --git a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php index 3f9bd8ab..8f2bde6c 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -35,6 +35,8 @@ class TimeitVisitor extends NodeVisitorAbstract /** * {@inheritdoc} + * + * @return Node[]|null Array of nodes */ public function beforeTraverse(array $nodes) { @@ -43,6 +45,8 @@ class TimeitVisitor extends NodeVisitorAbstract /** * {@inheritdoc} + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -62,6 +66,8 @@ class TimeitVisitor extends NodeVisitorAbstract /** * {@inheritdoc} + * + * @return int|Node|Node[]|null Replacement node (or special return value) */ public function leaveNode(Node $node) { @@ -72,11 +78,13 @@ class TimeitVisitor extends NodeVisitorAbstract /** * {@inheritdoc} + * + * @return Node[]|null Array of nodes */ public function afterTraverse(array $nodes) { // prepend a `markStart` call - \array_unshift($nodes, $this->maybeExpression($this->getStartCall())); + \array_unshift($nodes, new Expression($this->getStartCall(), [])); // append a `markEnd` call (wrapping the final node, if it's an expression) $last = $nodes[\count($nodes) - 1]; @@ -89,7 +97,7 @@ class TimeitVisitor extends NodeVisitorAbstract } elseif ($last instanceof Return_) { // nothing to do here, we're already ending with a return call } else { - $nodes[] = $this->maybeExpression($this->getEndCall()); + $nodes[] = new Expression($this->getEndCall(), []); } return $nodes; @@ -111,10 +119,8 @@ class TimeitVisitor extends NodeVisitorAbstract * Optionally pass in a return value. * * @param Expr|null $arg - * - * @return \PhpParser\Node\Expr\StaticCall */ - private function getEndCall(Expr $arg = null): StaticCall + private function getEndCall(?Expr $arg = null): StaticCall { if ($arg === null) { $arg = NoReturnValue::create(); @@ -122,19 +128,4 @@ class TimeitVisitor extends NodeVisitorAbstract return new StaticCall(new FullyQualifiedName(TimeitCommand::class), 'markEnd', [new Arg($arg)]); } - - /** - * Compatibility shim for PHP Parser 3.x. - * - * Wrap $expr in a PhpParser\Node\Stmt\Expression if the class exists. - * - * @param \PhpParser\Node $expr - * @param array $attrs - * - * @return \PhpParser\Node\Expr|\PhpParser\Node\Stmt\Expression - */ - private function maybeExpression(Node $expr, array $attrs = []) - { - return \class_exists(Expression::class) ? new Expression($expr, $attrs) : $expr; - } } diff --git a/vendor/psy/psysh/src/Command/TraceCommand.php b/vendor/psy/psysh/src/Command/TraceCommand.php index 09d9fc91..04a2beb0 100644 --- a/vendor/psy/psysh/src/Command/TraceCommand.php +++ b/vendor/psy/psysh/src/Command/TraceCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -68,8 +68,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->filter->bind($input); $trace = $this->getBacktrace(new \Exception(), $input->getOption('num'), $input->getOption('include-psy')); @@ -79,18 +81,18 @@ HELP } /** - * Get a backtrace for an exception. + * Get a backtrace for an exception or error. * * Optionally limit the number of rows to include with $count, and exclude * Psy from the trace. * - * @param \Exception $e The exception with a backtrace + * @param \Throwable $e The exception or error with a backtrace * @param int $count (default: PHP_INT_MAX) * @param bool $includePsy (default: true) * * @return array Formatted stacktrace lines */ - protected function getBacktrace(\Exception $e, int $count = null, bool $includePsy = true): array + protected function getBacktrace(\Throwable $e, ?int $count = null, bool $includePsy = true): array { return TraceFormatter::formatTrace($e, $this->filter, $count, $includePsy); } diff --git a/vendor/psy/psysh/src/Command/WhereamiCommand.php b/vendor/psy/psysh/src/Command/WhereamiCommand.php index ea91f2f0..b7d569be 100644 --- a/vendor/psy/psysh/src/Command/WhereamiCommand.php +++ b/vendor/psy/psysh/src/Command/WhereamiCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,10 +25,7 @@ class WhereamiCommand extends Command { private $backtrace; - /** - * @param string|null $colorMode (deprecated and ignored) - */ - public function __construct($colorMode = null) + public function __construct() { $this->backtrace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); @@ -109,8 +106,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $info = $this->fileInfo(); $num = $input->getOption('num'); @@ -142,8 +141,6 @@ HELP * Replace the given directory from the start of a filepath. * * @param string $file - * - * @return string */ private function replaceCwd(string $file): string { diff --git a/vendor/psy/psysh/src/Command/WtfCommand.php b/vendor/psy/psysh/src/Command/WtfCommand.php index a2e8feb5..6e2472c0 100644 --- a/vendor/psy/psysh/src/Command/WtfCommand.php +++ b/vendor/psy/psysh/src/Command/WtfCommand.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -81,8 +81,10 @@ HELP /** * {@inheritdoc} + * + * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->filter->bind($input); diff --git a/vendor/psy/psysh/src/ConfigPaths.php b/vendor/psy/psysh/src/ConfigPaths.php index 7e766a97..fe3f2d77 100644 --- a/vendor/psy/psysh/src/ConfigPaths.php +++ b/vendor/psy/psysh/src/ConfigPaths.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -31,10 +31,11 @@ class ConfigPaths * @param string[] $overrides Directory overrides * @param EnvInterface $env */ - public function __construct(array $overrides = [], EnvInterface $env = null) + public function __construct(array $overrides = [], ?EnvInterface $env = null) { $this->overrideDirs($overrides); - $this->env = $env ?: new SuperglobalsEnv(); + + $this->env = $env ?: (\PHP_SAPI === 'cli-server' ? new SystemEnv() : new SuperglobalsEnv()); } /** @@ -119,32 +120,6 @@ class ConfigPaths return $this->allDirNames(\array_merge([$this->homeConfigDir()], $configDirs)); } - /** - * @deprecated - */ - public static function getConfigDirs(): array - { - return (new self())->configDirs(); - } - - /** - * Get potential home config directory paths. - * - * Returns `~/.psysh`, `%APPDATA%/PsySH` (when on Windows), and the - * XDG Base Directory home config directory: - * - * http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html - * - * @deprecated - * - * @return string[] - */ - public static function getHomeConfigDirs(): array - { - // Not quite the same, but this is deprecated anyway /shrug - return self::getConfigDirs(); - } - /** * Get the current home config directory. * @@ -154,8 +129,6 @@ class ConfigPaths * everywhere else). * * @see self::homeConfigDir - * - * @return string */ public function currentConfigDir(): string { @@ -174,14 +147,6 @@ class ConfigPaths return $configDirs[0]; } - /** - * @deprecated - */ - public static function getCurrentConfigDir(): string - { - return (new self())->currentConfigDir(); - } - /** * Find real config files in config directories. * @@ -194,14 +159,6 @@ class ConfigPaths return $this->allRealFiles($this->configDirs(), $names); } - /** - * @deprecated - */ - public static function getConfigFiles(array $names, $configDir = null): array - { - return (new self(['configDir' => $configDir]))->configFiles($names); - } - /** * Get potential data directory paths. * @@ -226,14 +183,6 @@ class ConfigPaths return $this->allDirNames(\array_merge([$homeDataDir], $dataDirs)); } - /** - * @deprecated - */ - public static function getDataDirs(): array - { - return (new self())->dataDirs(); - } - /** * Find real data files in config directories. * @@ -246,20 +195,10 @@ class ConfigPaths return $this->allRealFiles($this->dataDirs(), $names); } - /** - * @deprecated - */ - public static function getDataFiles(array $names, $dataDir = null): array - { - return (new self(['dataDir' => $dataDir]))->dataFiles($names); - } - /** * Get a runtime directory. * * Defaults to `/psysh` inside the system's temp dir. - * - * @return string */ public function runtimeDir(): string { @@ -274,11 +213,37 @@ class ConfigPaths } /** - * @deprecated + * Get a list of directories in PATH. + * + * If $PATH is unset/empty it defaults to '/usr/sbin:/usr/bin:/sbin:/bin'. + * + * @return string[] */ - public static function getRuntimeDir(): string + public function pathDirs(): array { - return (new self())->runtimeDir(); + return $this->getEnvArray('PATH') ?: ['/usr/sbin', '/usr/bin', '/sbin', '/bin']; + } + + /** + * Locate a command (an executable) in $PATH. + * + * Behaves like 'command -v COMMAND' or 'which COMMAND'. + * If $PATH is unset/empty it defaults to '/usr/sbin:/usr/bin:/sbin:/bin'. + * + * @param string $command the executable to locate + * + * @return string + */ + public function which($command) + { + foreach ($this->pathDirs() as $path) { + $fullpath = $path.\DIRECTORY_SEPARATOR.$command; + if (@\is_file($fullpath) && @\is_executable($fullpath)) { + return $fullpath; + } + } + + return null; } /** @@ -405,7 +370,7 @@ class ConfigPaths private function getEnvArray($key) { if ($value = $this->getEnv($key)) { - return \explode(':', $value); + return \explode(\PATH_SEPARATOR, $value); } return null; diff --git a/vendor/psy/psysh/src/Configuration.php b/vendor/psy/psysh/src/Configuration.php index 68d1cc0c..b095d235 100644 --- a/vendor/psy/psysh/src/Configuration.php +++ b/vendor/psy/psysh/src/Configuration.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,6 +16,7 @@ use Psy\Exception\RuntimeException; use Psy\ExecutionLoop\ProcessForker; use Psy\Output\OutputPager; use Psy\Output\ShellOutput; +use Psy\Output\Theme; use Psy\TabCompletion\AutoCompleter; use Psy\VarDumper\Presenter; use Psy\VersionUpdater\Checker; @@ -66,6 +67,8 @@ class Configuration 'requireSemicolons', 'runtimeDir', 'startupMessage', + 'strictTypes', + 'theme', 'updateCheck', 'useBracketedPaste', 'usePcntl', @@ -97,6 +100,7 @@ class Configuration private $pipedOutput; private $rawOutput = false; private $requireSemicolons = false; + private $strictTypes = false; private $useUnicode; private $useTabCompletion; private $newMatchers = []; @@ -107,12 +111,16 @@ class Configuration private $updateCheck; private $startupMessage; private $forceArrayIndexes = false; + /** @deprecated */ private $formatterStyles = []; private $verbosity = self::VERBOSITY_NORMAL; private $yolo = false; + /** @var Theme */ + private $theme; // services private $readline; + /** @var ShellOutput */ private $output; private $shell; private $cleaner; @@ -121,6 +129,7 @@ class Configuration private $presenter; private $autoCompleter; private $checker; + /** @deprecated */ private $prompt; private $configPaths; @@ -140,6 +149,8 @@ class Configuration $this->configFile = $config['configFile']; } elseif (isset($_SERVER['PSYSH_CONFIG']) && $_SERVER['PSYSH_CONFIG']) { $this->configFile = $_SERVER['PSYSH_CONFIG']; + } elseif (\PHP_SAPI === 'cli-server' && ($configFile = \getenv('PSYSH_CONFIG'))) { + $this->configFile = $configFile; } // legacy baseDir option @@ -171,8 +182,6 @@ class Configuration * @throws \InvalidArgumentException * * @param InputInterface $input - * - * @return self */ public static function fromInput(InputInterface $input): self { @@ -197,6 +206,11 @@ class Configuration $config->setInteractiveMode(self::INTERACTIVE_MODE_DISABLED); } + // Handle --compact + if (self::getOptionFromInput($input, ['compact'])) { + $config->setTheme('compact'); + } + // Handle --raw-output // @todo support raw output with interactive input? if (!$config->getInputInteractive()) { @@ -346,6 +360,7 @@ class Configuration new InputOption('quiet', 'q', InputOption::VALUE_NONE, 'Shhhhhh.'), new InputOption('verbose', 'v|vv|vvv', InputOption::VALUE_OPTIONAL, 'Increase the verbosity of messages.', '0'), + new InputOption('compact', null, InputOption::VALUE_NONE, 'Run PsySH with compact output.'), new InputOption('interactive', 'i|a', InputOption::VALUE_NONE, 'Force PsySH to run in interactive mode.'), new InputOption('no-interactive', 'n', InputOption::VALUE_NONE, 'Run PsySH without interactive input. Requires input from stdin.'), // --interaction and --no-interaction aliases for compatibility with Symfony, Composer, etc @@ -353,6 +368,8 @@ class Configuration new InputOption('no-interaction', null, InputOption::VALUE_NONE, 'Run PsySH without interactive input. Requires input from stdin.'), new InputOption('raw-output', 'r', InputOption::VALUE_NONE, 'Print var_export-style return values (for non-interactive input)'), + new InputOption('self-update', 'u', InputOption::VALUE_NONE, 'Update to the latest version'), + new InputOption('yolo', null, InputOption::VALUE_NONE, 'Run PsySH with minimal input validation. You probably don\'t want this.'), ]; } @@ -523,7 +540,7 @@ class Configuration /** * Get files to be included by default at the start of each shell session. * - * @return array + * @return string[] */ public function getDefaultIncludes(): array { @@ -605,8 +622,6 @@ class Configuration * overridden. * * @throws RuntimeException if no temporary directory is set and it is not possible to create one - * - * @return string */ public function getRuntimeDir(): string { @@ -636,8 +651,6 @@ class Configuration * * Defaults to `/history` inside the shell's base config dir unless * explicitly overridden. - * - * @return string */ public function getHistoryFile(): string { @@ -806,8 +819,6 @@ class Configuration * Get the appropriate Readline implementation class name. * * @see self::getReadline - * - * @return string */ private function getReadlineClass(): string { @@ -816,11 +827,13 @@ class Configuration return Readline\GNUReadline::class; } elseif (Readline\Libedit::isSupported()) { return Readline\Libedit::class; - } elseif (Readline\HoaConsole::isSupported()) { - return Readline\HoaConsole::class; } } + if (Readline\Userland::isSupported()) { + return Readline\Userland::class; + } + return Readline\Transient::class; } @@ -891,7 +904,17 @@ class Configuration */ public function usePcntl(): bool { - return isset($this->usePcntl) ? ($this->hasPcntl && $this->usePcntl) : $this->hasPcntl; + if (!isset($this->usePcntl)) { + // Unless pcntl is explicitly *enabled*, don't use it while XDebug is debugging. + // See https://github.com/bobthecow/psysh/issues/742 + if (\function_exists('xdebug_is_debugger_active') && \xdebug_is_debugger_active()) { + return false; + } + + return $this->hasPcntl; + } + + return $this->hasPcntl && $this->usePcntl; } /** @@ -935,14 +958,28 @@ class Configuration * By default, PsySH will automatically insert semicolons at the end of * statements if they're missing. To strictly require semicolons, set * `requireSemicolons` to true. - * - * @return bool */ public function requireSemicolons(): bool { return $this->requireSemicolons; } + /** + * Enable or disable strict types enforcement. + */ + public function setStrictTypes($strictTypes) + { + $this->strictTypes = (bool) $strictTypes; + } + + /** + * Check whether to enforce strict types. + */ + public function strictTypes(): bool + { + return $this->strictTypes; + } + /** * Enable or disable Unicode in PsySH specific output. * @@ -961,8 +998,6 @@ class Configuration * * Note that this does not disable Unicode output in general, it just makes * it so PsySH won't output any itself. - * - * @return bool */ public function useUnicode(): bool { @@ -997,8 +1032,6 @@ class Configuration * level. * * http://php.net/manual/en/function.error-reporting.php - * - * @return int */ public function errorLoggingLevel(): int { @@ -1019,13 +1052,11 @@ class Configuration * Get a CodeCleaner service instance. * * If none has been explicitly defined, this will create a new instance. - * - * @return CodeCleaner */ public function getCodeCleaner(): CodeCleaner { if (!isset($this->cleaner)) { - $this->cleaner = new CodeCleaner(null, null, null, $this->yolo()); + $this->cleaner = new CodeCleaner(null, null, null, $this->yolo(), $this->strictTypes()); } return $this->cleaner; @@ -1066,6 +1097,8 @@ class Configuration */ public function setTabCompletion(bool $useTabCompletion) { + @\trigger_error('`setTabCompletion` is deprecated; call `setUseTabCompletion` instead.', \E_USER_DEPRECATED); + $this->setUseTabCompletion($useTabCompletion); } @@ -1084,11 +1117,11 @@ class Configuration /** * @deprecated Call `useTabCompletion` instead - * - * @return bool */ public function getTabCompletion(): bool { + @\trigger_error('`getTabCompletion` is deprecated; call `useTabCompletion` instead.', \E_USER_DEPRECATED); + return $this->useTabCompletion(); } @@ -1101,6 +1134,11 @@ class Configuration { $this->output = $output; $this->pipedOutput = null; // Reset cached pipe info + + if (isset($this->theme)) { + $output->setTheme($this->theme); + } + $this->applyFormatterStyles(); } @@ -1112,8 +1150,6 @@ class Configuration * * @see self::verbosity * @see self::getPager - * - * @return ShellOutput */ public function getOutput(): ShellOutput { @@ -1122,7 +1158,8 @@ class Configuration $this->getOutputVerbosity(), null, null, - $this->getPager() + $this->getPager() ?: null, + $this->theme() )); // This is racy because `getOutputDecorated` needs access to the @@ -1145,29 +1182,29 @@ class Configuration public function getOutputDecorated() { switch ($this->colorMode()) { - case self::COLOR_MODE_AUTO: - return $this->outputIsPiped() ? false : null; case self::COLOR_MODE_FORCED: return true; case self::COLOR_MODE_DISABLED: return false; + case self::COLOR_MODE_AUTO: + default: + return $this->outputIsPiped() ? false : null; } } /** * Get the interactive setting for shell input. - * - * @return bool */ public function getInputInteractive(): bool { switch ($this->interactiveMode()) { - case self::INTERACTIVE_MODE_AUTO: - return !$this->inputIsPiped(); case self::INTERACTIVE_MODE_FORCED: return true; case self::INTERACTIVE_MODE_DISABLED: return false; + case self::INTERACTIVE_MODE_AUTO: + default: + return !$this->inputIsPiped(); } } @@ -1177,13 +1214,19 @@ class Configuration * If a string is supplied, a ProcOutputPager will be used which shells out * to the specified command. * + * `cat` is special-cased to use the PassthruPager directly. + * * @throws \InvalidArgumentException if $pager is not a string or OutputPager instance * - * @param string|OutputPager $pager + * @param string|OutputPager|false $pager */ public function setPager($pager) { - if ($pager && !\is_string($pager) && !$pager instanceof OutputPager) { + if ($pager === null || $pager === false || $pager === 'cat') { + $pager = false; + } + + if ($pager !== false && !\is_string($pager) && !$pager instanceof OutputPager) { throw new \InvalidArgumentException('Unexpected pager instance'); } @@ -1196,17 +1239,31 @@ class Configuration * If no Pager has been explicitly provided, and Pcntl is available, this * will default to `cli.pager` ini value, falling back to `which less`. * - * @return string|OutputPager + * @return string|OutputPager|false */ public function getPager() { if (!isset($this->pager) && $this->usePcntl()) { + if (\getenv('TERM') === 'dumb') { + return false; + } + if ($pager = \ini_get('cli.pager')) { // use the default pager $this->pager = $pager; - } elseif ($less = \exec('which less 2>/dev/null')) { + } elseif ($less = $this->configPaths->which('less')) { // check for the presence of less... - $this->pager = $less.' -R -S -F -X'; + + // n.b. The busybox less implementation is a bit broken, so + // let's not use it by default. + // + // See https://github.com/bobthecow/psysh/issues/778 + $link = @\readlink($less); + if ($link !== false && \strpos($link, 'busybox') !== false) { + return false; + } + + $this->pager = $less.' -R -F -X'; } } @@ -1225,8 +1282,6 @@ class Configuration /** * Get an AutoCompleter service instance. - * - * @return AutoCompleter */ public function getAutoCompleter(): AutoCompleter { @@ -1239,11 +1294,11 @@ class Configuration /** * @deprecated Nothing should be using this anymore - * - * @return array */ public function getTabCompletionMatchers(): array { + @\trigger_error('`getTabCompletionMatchers` is no longer used.', \E_USER_DEPRECATED); + return []; } @@ -1284,6 +1339,8 @@ class Configuration */ public function addTabCompletionMatchers(array $matchers) { + @\trigger_error('`addTabCompletionMatchers` is deprecated; call `addMatchers` instead.', \E_USER_DEPRECATED); + $this->addMatchers($matchers); } @@ -1401,8 +1458,6 @@ class Configuration /** * Get the Presenter service. - * - * @return Presenter */ public function getPresenter(): Presenter { @@ -1434,8 +1489,6 @@ class Configuration * are found. * * This will default to true in a future release, but is false for now. - * - * @return bool */ public function warnOnMultipleConfigs(): bool { @@ -1445,6 +1498,8 @@ class Configuration /** * Set the current color mode. * + * @throws \InvalidArgumentException if the color mode isn't auto, forced or disabled + * * @param string $colorMode */ public function setColorMode(string $colorMode) @@ -1464,8 +1519,6 @@ class Configuration /** * Get the current color mode. - * - * @return string */ public function colorMode(): string { @@ -1496,8 +1549,6 @@ class Configuration /** * Get the current interactive mode. - * - * @return string */ public function interactiveMode(): string { @@ -1518,8 +1569,6 @@ class Configuration * Get an update checker service instance. * * If none has been explicitly defined, this will create a new instance. - * - * @return Checker */ public function getChecker(): Checker { @@ -1555,8 +1604,6 @@ class Configuration * * One of 'always', 'daily', 'weekly', 'monthly' or 'never'. If none is * explicitly set, default to 'weekly'. - * - * @return string */ public function getUpdateCheck(): string { @@ -1620,11 +1667,19 @@ class Configuration /** * Set the prompt. * - * @param string $prompt + * @deprecated The `prompt` configuration has been replaced by Themes and support will + * eventually be removed. In the meantime, prompt is applied first by the Theme, then overridden + * by any explicitly defined prompt. + * + * Note that providing a prompt but not a theme config will implicitly use the `classic` theme. */ public function setPrompt(string $prompt) { $this->prompt = $prompt; + + if (isset($this->theme)) { + $this->theme->setPrompt($prompt); + } } /** @@ -1639,8 +1694,6 @@ class Configuration /** * Get the force array indexes. - * - * @return bool */ public function forceArrayIndexes(): bool { @@ -1657,6 +1710,46 @@ class Configuration $this->forceArrayIndexes = $forceArrayIndexes; } + /** + * Set the current output Theme. + * + * @param Theme|string|array $theme Theme (or Theme config) + */ + public function setTheme($theme) + { + if (!$theme instanceof Theme) { + $theme = new Theme($theme); + } + + $this->theme = $theme; + + if (isset($this->prompt)) { + $this->theme->setPrompt($this->prompt); + } + + if (isset($this->output)) { + $this->output->setTheme($theme); + $this->applyFormatterStyles(); + } + } + + /** + * Get the current output Theme. + */ + public function theme(): Theme + { + if (!isset($this->theme)) { + // If a prompt is explicitly set, and a theme is not, base it on the `classic` theme. + $this->theme = $this->prompt ? new Theme('classic') : new Theme(); + } + + if (isset($this->prompt)) { + $this->theme->setPrompt($this->prompt); + } + + return $this->theme; + } + /** * Set the shell output formatter styles. * @@ -1669,15 +1762,14 @@ class Configuration * * Foreground, background or options can be null, or even omitted entirely. * - * @see ShellOutput::initFormatters - * - * @param array $formatterStyles + * @deprecated The `formatterStyles` configuration has been replaced by Themes and support will + * eventually be removed. In the meantime, styles are applied first by the Theme, then + * overridden by any explicitly defined formatter styles. */ public function setFormatterStyles(array $formatterStyles) { foreach ($formatterStyles as $name => $style) { - list($fg, $bg, $opts) = \array_pad($style, 3, null); - $this->formatterStyles[$name] = new OutputFormatterStyle($fg ?: null, $bg ?: null, $opts ?: []); + $this->formatterStyles[$name] = new OutputFormatterStyle(...$style); } if (isset($this->output)) { @@ -1690,6 +1782,10 @@ class Configuration * * This is called on initialization of the shell output, and again if the * formatter styles config is updated. + * + * @deprecated The `formatterStyles` configuration has been replaced by Themes and support will + * eventually be removed. In the meantime, styles are applied first by the Theme, then + * overridden by any explicitly defined formatter styles. */ private function applyFormatterStyles() { @@ -1697,12 +1793,17 @@ class Configuration foreach ($this->formatterStyles as $name => $style) { $formatter->setStyle($name, $style); } + + $errorFormatter = $this->output->getErrorOutput()->getFormatter(); + foreach (Theme::ERROR_STYLES as $name) { + if (isset($this->formatterStyles[$name])) { + $errorFormatter->setStyle($name, $this->formatterStyles[$name]); + } + } } /** * Get the configured output verbosity. - * - * @return string */ public function verbosity(): string { @@ -1765,13 +1866,11 @@ class Configuration * Guess whether stdin is piped. * * This is mostly useful for deciding whether to use non-interactive mode. - * - * @return bool */ public function inputIsPiped(): bool { if ($this->pipedInput === null) { - $this->pipedInput = \defined('STDIN') && static::looksLikeAPipe(\STDIN); + $this->pipedInput = \defined('STDIN') && self::looksLikeAPipe(\STDIN); } return $this->pipedInput; @@ -1781,13 +1880,11 @@ class Configuration * Guess whether shell output is piped. * * This is mostly useful for deciding whether to use non-decorated output. - * - * @return bool */ public function outputIsPiped(): bool { if ($this->pipedOutput === null) { - $this->pipedOutput = static::looksLikeAPipe($this->getOutput()->getStream()); + $this->pipedOutput = self::looksLikeAPipe($this->getOutput()->getStream()); } return $this->pipedOutput; @@ -1797,8 +1894,6 @@ class Configuration * Guess whether an input or output stream is piped. * * @param resource|int $stream - * - * @return bool */ private static function looksLikeAPipe($stream): bool { diff --git a/vendor/psy/psysh/src/ConsoleColorFactory.php b/vendor/psy/psysh/src/ConsoleColorFactory.php deleted file mode 100644 index c589863b..00000000 --- a/vendor/psy/psysh/src/ConsoleColorFactory.php +++ /dev/null @@ -1,39 +0,0 @@ -lastException = $e; } /** - * Get the most recent Exception. + * Get the most recent Exception or Error. * * @throws \InvalidArgumentException If no Exception has been caught * - * @return \Exception|null + * @return \Throwable|null */ public function getLastException() { @@ -285,8 +281,6 @@ class Context /** * Get command-scope magic variables: $__class, $__file, etc. - * - * @return array */ public function getCommandScopeVariables(): array { @@ -310,8 +304,6 @@ class Context * Check whether a variable name is a magic variable. * * @param string $name - * - * @return bool */ public static function isSpecialVariableName(string $name): bool { diff --git a/vendor/psy/psysh/src/ContextAware.php b/vendor/psy/psysh/src/ContextAware.php index 5f6d7df3..83979ae8 100644 --- a/vendor/psy/psysh/src/ContextAware.php +++ b/vendor/psy/psysh/src/ContextAware.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/EnvInterface.php b/vendor/psy/psysh/src/EnvInterface.php index 340ca3ae..31a738fc 100644 --- a/vendor/psy/psysh/src/EnvInterface.php +++ b/vendor/psy/psysh/src/EnvInterface.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Exception/BreakException.php b/vendor/psy/psysh/src/Exception/BreakException.php index 45a27dc7..5c56914f 100644 --- a/vendor/psy/psysh/src/Exception/BreakException.php +++ b/vendor/psy/psysh/src/Exception/BreakException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ class BreakException extends \Exception implements Exception /** * {@inheritdoc} */ - public function __construct($message = '', $code = 0, \Exception $previous = null) + public function __construct($message = '', $code = 0, ?\Throwable $previous = null) { $this->rawMessage = $message; parent::__construct(\sprintf('Exit: %s', $message), $code, $previous); @@ -29,8 +29,6 @@ class BreakException extends \Exception implements Exception /** * Return a raw (unformatted) version of the error message. - * - * @return string */ public function getRawMessage(): string { diff --git a/vendor/psy/psysh/src/Exception/DeprecatedException.php b/vendor/psy/psysh/src/Exception/DeprecatedException.php index a0397eaf..f326b53b 100644 --- a/vendor/psy/psysh/src/Exception/DeprecatedException.php +++ b/vendor/psy/psysh/src/Exception/DeprecatedException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Exception/ErrorException.php b/vendor/psy/psysh/src/Exception/ErrorException.php index f0bb63c2..ef3f3570 100644 --- a/vendor/psy/psysh/src/Exception/ErrorException.php +++ b/vendor/psy/psysh/src/Exception/ErrorException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,14 +21,14 @@ class ErrorException extends \ErrorException implements Exception /** * Construct a Psy ErrorException. * - * @param string $message (default: "") - * @param int $code (default: 0) - * @param int $severity (default: 1) - * @param string|null $filename (default: null) - * @param int|null $lineno (default: null) - * @param Exception|null $previous (default: null) + * @param string $message (default: "") + * @param int $code (default: 0) + * @param int $severity (default: 1) + * @param string|null $filename (default: null) + * @param int|null $lineno (default: null) + * @param \Throwable|null $previous (default: null) */ - public function __construct($message = '', $code = 0, $severity = 1, $filename = null, $lineno = null, $previous = null) + public function __construct($message = '', $code = 0, $severity = 1, $filename = null, $lineno = null, ?\Throwable $previous = null) { $this->rawMessage = $message; @@ -73,8 +73,6 @@ class ErrorException extends \ErrorException implements Exception /** * Get the raw (unformatted) message for this error. - * - * @return string */ public function getRawMessage(): string { @@ -103,12 +101,12 @@ class ErrorException extends \ErrorException implements Exception /** * Create an ErrorException from an Error. * - * @param \Error $e + * @deprecated PsySH no longer wraps Errors * - * @return self + * @param \Error $e */ - public static function fromError(\Error $e): self + public static function fromError(\Error $e) { - return new self($e->getMessage(), $e->getCode(), 1, $e->getFile(), $e->getLine(), $e); + @\trigger_error('PsySH no longer wraps Errors', \E_USER_DEPRECATED); } } diff --git a/vendor/psy/psysh/src/Exception/Exception.php b/vendor/psy/psysh/src/Exception/Exception.php index 0f2e0d97..db790621 100644 --- a/vendor/psy/psysh/src/Exception/Exception.php +++ b/vendor/psy/psysh/src/Exception/Exception.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Exception/FatalErrorException.php b/vendor/psy/psysh/src/Exception/FatalErrorException.php index 4c3e4b15..c7dcbf66 100644 --- a/vendor/psy/psysh/src/Exception/FatalErrorException.php +++ b/vendor/psy/psysh/src/Exception/FatalErrorException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,9 +26,9 @@ class FatalErrorException extends \ErrorException implements Exception * @param int $severity (default: 1) * @param string|null $filename (default: null) * @param int|null $lineno (default: null) - * @param \Exception|null $previous (default: null) + * @param \Throwable|null $previous (default: null) */ - public function __construct($message = '', $code = 0, $severity = 1, $filename = null, $lineno = null, $previous = null) + public function __construct($message = '', $code = 0, $severity = 1, $filename = null, $lineno = null, ?\Throwable $previous = null) { // Since these are basically always PHP Parser Node line numbers, treat -1 as null. if ($lineno === -1) { @@ -42,8 +42,6 @@ class FatalErrorException extends \ErrorException implements Exception /** * Return a raw (unformatted) version of the error message. - * - * @return string */ public function getRawMessage(): string { diff --git a/vendor/psy/psysh/src/Exception/ParseErrorException.php b/vendor/psy/psysh/src/Exception/ParseErrorException.php index ff4695ce..ee2e2d42 100644 --- a/vendor/psy/psysh/src/Exception/ParseErrorException.php +++ b/vendor/psy/psysh/src/Exception/ParseErrorException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,24 +19,28 @@ class ParseErrorException extends \PhpParser\Error implements Exception /** * Constructor! * - * @param string $message (default: "") - * @param int $line (default: -1) + * @param string $message (default: '') + * @param array|int $attributes Attributes of node/token where error occurred + * (or start line of error -- deprecated) */ - public function __construct(string $message = '', int $line = -1) + public function __construct(string $message = '', $attributes = []) { $message = \sprintf('PHP Parse error: %s', $message); - parent::__construct($message, $line); + + if (!\is_array($attributes)) { + $attributes = ['startLine' => $attributes]; + } + + parent::__construct($message, $attributes); } /** * Create a ParseErrorException from a PhpParser Error. * * @param \PhpParser\Error $e - * - * @return self */ public static function fromParseError(\PhpParser\Error $e): self { - return new self($e->getRawMessage(), $e->getStartLine()); + return new self($e->getRawMessage(), $e->getAttributes()); } } diff --git a/vendor/psy/psysh/src/Exception/RuntimeException.php b/vendor/psy/psysh/src/Exception/RuntimeException.php index 99e131b9..fd423ffb 100644 --- a/vendor/psy/psysh/src/Exception/RuntimeException.php +++ b/vendor/psy/psysh/src/Exception/RuntimeException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,9 +23,9 @@ class RuntimeException extends \RuntimeException implements Exception * * @param string $message (default: "") * @param int $code (default: 0) - * @param \Exception|null $previous (default: null) + * @param \Throwable|null $previous (default: null) */ - public function __construct(string $message = '', int $code = 0, \Exception $previous = null) + public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null) { $this->rawMessage = $message; parent::__construct($message, $code, $previous); @@ -33,8 +33,6 @@ class RuntimeException extends \RuntimeException implements Exception /** * Return a raw (unformatted) version of the error message. - * - * @return string */ public function getRawMessage(): string { diff --git a/vendor/psy/psysh/src/Exception/ThrowUpException.php b/vendor/psy/psysh/src/Exception/ThrowUpException.php index a2b3fc45..b2b758e6 100644 --- a/vendor/psy/psysh/src/Exception/ThrowUpException.php +++ b/vendor/psy/psysh/src/Exception/ThrowUpException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,16 +19,14 @@ class ThrowUpException extends \Exception implements Exception /** * {@inheritdoc} */ - public function __construct(\Exception $exception) + public function __construct(\Throwable $throwable) { - $message = \sprintf("Throwing %s with message '%s'", \get_class($exception), $exception->getMessage()); - parent::__construct($message, $exception->getCode(), $exception); + $message = \sprintf("Throwing %s with message '%s'", \get_class($throwable), $throwable->getMessage()); + parent::__construct($message, $throwable->getCode(), $throwable); } /** * Return a raw (unformatted) version of the error message. - * - * @return string */ public function getRawMessage(): string { @@ -38,20 +36,12 @@ class ThrowUpException extends \Exception implements Exception /** * Create a ThrowUpException from a Throwable. * - * @param \Throwable $throwable + * @deprecated PsySH no longer wraps Throwables * - * @return self + * @param \Throwable $throwable */ - public static function fromThrowable($throwable): self + public static function fromThrowable($throwable) { - if ($throwable instanceof \Error) { - $throwable = ErrorException::fromError($throwable); - } - - if (!$throwable instanceof \Exception) { - throw new \InvalidArgumentException('throw-up can only throw Exceptions and Errors'); - } - - return new self($throwable); + @\trigger_error('PsySH no longer wraps Throwables', \E_USER_DEPRECATED); } } diff --git a/vendor/psy/psysh/src/Exception/TypeErrorException.php b/vendor/psy/psysh/src/Exception/TypeErrorException.php deleted file mode 100644 index b1c828b4..00000000 --- a/vendor/psy/psysh/src/Exception/TypeErrorException.php +++ /dev/null @@ -1,55 +0,0 @@ -rawMessage = $message; - $message = \preg_replace('/, called in .*?: eval\\(\\)\'d code/', '', $message); - parent::__construct(\sprintf('TypeError: %s', $message), $code); - } - - /** - * Get the raw (unformatted) message for this error. - * - * @return string - */ - public function getRawMessage(): string - { - return $this->rawMessage; - } - - /** - * Create a TypeErrorException from a TypeError. - * - * @param \TypeError $e - * - * @return self - */ - public static function fromTypeError(\TypeError $e): self - { - return new self($e->getMessage(), $e->getCode()); - } -} diff --git a/vendor/psy/psysh/src/Exception/UnexpectedTargetException.php b/vendor/psy/psysh/src/Exception/UnexpectedTargetException.php index ef6eec78..35ce2d23 100644 --- a/vendor/psy/psysh/src/Exception/UnexpectedTargetException.php +++ b/vendor/psy/psysh/src/Exception/UnexpectedTargetException.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,9 +19,9 @@ class UnexpectedTargetException extends RuntimeException * @param mixed $target * @param string $message (default: "") * @param int $code (default: 0) - * @param \Exception|null $previous (default: null) + * @param \Throwable|null $previous (default: null) */ - public function __construct($target, string $message = '', int $code = 0, \Exception $previous = null) + public function __construct($target, string $message = '', int $code = 0, ?\Throwable $previous = null) { $this->target = $target; parent::__construct($message, $code, $previous); diff --git a/vendor/psy/psysh/src/ExecutionClosure.php b/vendor/psy/psysh/src/ExecutionClosure.php index 1418d3df..837e931b 100644 --- a/vendor/psy/psysh/src/ExecutionClosure.php +++ b/vendor/psy/psysh/src/ExecutionClosure.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/ExecutionLoop/AbstractListener.php b/vendor/psy/psysh/src/ExecutionLoop/AbstractListener.php index cd6e0024..8230c550 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/AbstractListener.php +++ b/vendor/psy/psysh/src/ExecutionLoop/AbstractListener.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/ExecutionLoop/Listener.php b/vendor/psy/psysh/src/ExecutionLoop/Listener.php index 632ef719..9f207f5b 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/Listener.php +++ b/vendor/psy/psysh/src/ExecutionLoop/Listener.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,8 +20,6 @@ interface Listener { /** * Determines whether this listener should be active. - * - * @return bool */ public static function isSupported(): bool; diff --git a/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php b/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php index dd66db8b..3d61693c 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php +++ b/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -41,8 +41,6 @@ class ProcessForker extends AbstractListener /** * Process forker is supported if pcntl and posix extensions are available. - * - * @return bool */ public static function isSupported(): bool { @@ -250,8 +248,6 @@ class ProcessForker extends AbstractListener * we can. * * @param array $return - * - * @return string */ private function serializeReturn(array $return): string { diff --git a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php index 0854ba76..987fb1cb 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php +++ b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,6 +17,8 @@ use Psy\Shell; /** * A runkit-based code reloader, which is pretty much magic. + * + * @todo Remove RunkitReloader once we drop support for PHP 7.x :( */ class RunkitReloader extends AbstractListener { @@ -25,8 +27,6 @@ class RunkitReloader extends AbstractListener /** * Only enabled if Runkit is installed. - * - * @return bool */ public static function isSupported(): bool { @@ -36,13 +36,10 @@ class RunkitReloader extends AbstractListener /** * Construct a Runkit Reloader. - * - * @todo Pass in Parser Factory instance for dependency injection? */ public function __construct() { - $parserFactory = new ParserFactory(); - $this->parser = $parserFactory->createParser(); + $this->parser = (new ParserFactory())->createParser(); } /** @@ -127,8 +124,6 @@ class RunkitReloader extends AbstractListener * Use PHP-Parser to ensure that the file is valid PHP. * * @param string $file - * - * @return bool */ private function lintFile(string $file): bool { diff --git a/vendor/psy/psysh/src/ExecutionLoopClosure.php b/vendor/psy/psysh/src/ExecutionLoopClosure.php index 2f320bfe..28c6561a 100644 --- a/vendor/psy/psysh/src/ExecutionLoopClosure.php +++ b/vendor/psy/psysh/src/ExecutionLoopClosure.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,15 +12,12 @@ namespace Psy; use Psy\Exception\BreakException; -use Psy\Exception\ErrorException; use Psy\Exception\ThrowUpException; -use Psy\Exception\TypeErrorException; /** * The Psy Shell's execution loop scope. * - * @todo Once we're on PHP 5.5, we can switch ExecutionClosure to a generator - * and get rid of the duplicate closure implementations :) + * @todo Switch ExecutionClosure to a generator and get rid of the duplicate closure implementations? */ class ExecutionLoopClosure extends ExecutionClosure { @@ -80,11 +77,7 @@ class ExecutionLoopClosure extends ExecutionClosure $__psysh__->writeException($_e); throw $_e; - } catch (\TypeError $_e) { - $__psysh__->writeException(TypeErrorException::fromTypeError($_e)); - } catch (\Error $_e) { - $__psysh__->writeException(ErrorException::fromError($_e)); - } catch (\Exception $_e) { + } catch (\Throwable $_e) { $__psysh__->writeException($_e); } diff --git a/vendor/psy/psysh/src/Formatter/CodeFormatter.php b/vendor/psy/psysh/src/Formatter/CodeFormatter.php index cbc052bc..fb306f82 100644 --- a/vendor/psy/psysh/src/Formatter/CodeFormatter.php +++ b/vendor/psy/psysh/src/Formatter/CodeFormatter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -32,7 +32,7 @@ class CodeFormatter implements ReflectorFormatter const HIGHLIGHT_CONST = 'const'; const HIGHLIGHT_NUMBER = 'number'; const HIGHLIGHT_STRING = 'string'; - const HIGHLIGHT_COMMENT = 'comment'; + const HIGHLIGHT_COMMENT = 'code_comment'; const HIGHLIGHT_INLINE_HTML = 'inline_html'; private static $tokenMap = [ @@ -76,12 +76,11 @@ class CodeFormatter implements ReflectorFormatter /** * Format the code represented by $reflector for shell output. * - * @param \Reflector $reflector - * @param string|null $colorMode (deprecated and ignored) + * @param \Reflector $reflector * * @return string formatted code */ - public static function format(\Reflector $reflector, string $colorMode = null): string + public static function format(\Reflector $reflector): string { if (self::isReflectable($reflector)) { if ($code = @\file_get_contents($reflector->getFileName())) { @@ -104,7 +103,7 @@ class CodeFormatter implements ReflectorFormatter * * @return string formatted code */ - public static function formatCode(string $code, int $startLine = 1, int $endLine = null, int $markLine = null): string + public static function formatCode(string $code, int $startLine = 1, ?int $endLine = null, ?int $markLine = null): string { $spans = self::tokenizeSpans($code); $lines = self::splitLines($spans, $startLine, $endLine); @@ -122,8 +121,6 @@ class CodeFormatter implements ReflectorFormatter * This is typehinted as \Reflector but we've narrowed the input via self::isReflectable already. * * @param \ReflectionClass|\ReflectionFunctionAbstract $reflector - * - * @return int */ private static function getStartLine(\Reflector $reflector): int { @@ -209,7 +206,7 @@ class CodeFormatter implements ReflectorFormatter * * @return \Generator lines, each an array of [$spanType, $spanText] pairs */ - private static function splitLines(\Generator $spans, int $startLine = 1, int $endLine = null): \Generator + private static function splitLines(\Generator $spans, int $startLine = 1, ?int $endLine = null): \Generator { $lineNum = 1; $buffer = []; @@ -276,7 +273,7 @@ class CodeFormatter implements ReflectorFormatter * * @return \Generator Numbered, formatted lines */ - private static function numberLines(\Generator $lines, int $markLine = null): \Generator + private static function numberLines(\Generator $lines, ?int $markLine = null): \Generator { $lines = \iterator_to_array($lines); @@ -302,16 +299,16 @@ class CodeFormatter implements ReflectorFormatter $mark = ($markLine === $lineNum) ? self::LINE_MARKER : self::NO_LINE_MARKER; } - yield \sprintf("%s: %s", $mark, $lineNum, $line); + yield \sprintf("%s: %s", $mark, $lineNum, $line); } } /** * Check whether a Reflector instance is reflectable by this formatter. * - * @param \Reflector $reflector + * @phpstan-assert-if-true \ReflectionClass|\ReflectionFunctionAbstract $reflector * - * @return bool + * @param \Reflector $reflector */ private static function isReflectable(\Reflector $reflector): bool { diff --git a/vendor/psy/psysh/src/Formatter/DocblockFormatter.php b/vendor/psy/psysh/src/Formatter/DocblockFormatter.php index 05a73bd8..282f463e 100644 --- a/vendor/psy/psysh/src/Formatter/DocblockFormatter.php +++ b/vendor/psy/psysh/src/Formatter/DocblockFormatter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -68,8 +68,6 @@ class DocblockFormatter implements ReflectorFormatter * * @param array $vector * @param array $lines - * - * @return string */ private static function formatVector(array $vector, array $lines): string { @@ -133,8 +131,6 @@ class DocblockFormatter implements ReflectorFormatter * * @param string $type Vector type * @param int $max Pad width - * - * @return string */ private static function getVectorParamTemplate(string $type, int $max): string { @@ -150,8 +146,6 @@ class DocblockFormatter implements ReflectorFormatter * * @param string $text String to indent * @param string $indent (default: ' ') - * - * @return string */ private static function indent(string $text, string $indent = ' '): string { @@ -162,8 +156,6 @@ class DocblockFormatter implements ReflectorFormatter * Convert underscored or whitespace separated words into sentence case. * * @param string $text - * - * @return string */ private static function inflect(string $text): string { diff --git a/vendor/psy/psysh/src/Formatter/Formatter.php b/vendor/psy/psysh/src/Formatter/Formatter.php deleted file mode 100644 index a8a37bc0..00000000 --- a/vendor/psy/psysh/src/Formatter/Formatter.php +++ /dev/null @@ -1,21 +0,0 @@ -getValue(); $style = self::getTypeStyle($value); @@ -173,8 +171,6 @@ class SignatureFormatter implements ReflectorFormatter * Helper for getting output style for a given value's type. * * @param mixed $value - * - * @return string */ private static function getTypeStyle($value): string { @@ -236,7 +232,7 @@ class SignatureFormatter implements ReflectorFormatter return ''; } - return \sprintf(': %s', self::formatReflectionType($reflector->getReturnType())); + return \sprintf(': %s', self::formatReflectionType($reflector->getReturnType(), true)); } /** @@ -269,7 +265,9 @@ class SignatureFormatter implements ReflectorFormatter $hint = ''; try { if (\method_exists($param, 'getType')) { - $hint = self::formatReflectionType($param->getType()); + // Only include the inquisitive nullable type iff param default value is not null. + $defaultIsNull = $param->isOptional() && $param->isDefaultValueAvailable() && $param->getDefaultValue() === null; + $hint = self::formatReflectionType($param->getType(), !$defaultIsNull); } else { if ($param->isArray()) { $hint = 'array'; @@ -324,28 +322,37 @@ class SignatureFormatter implements ReflectorFormatter * Print function param or return type(s). * * @param \ReflectionType $type - * - * @return string */ - private static function formatReflectionType(\ReflectionType $type = null): string + private static function formatReflectionType(?\ReflectionType $type, bool $indicateNullable): string { if ($type === null) { return ''; } - $types = $type instanceof \ReflectionUnionType ? $type->getTypes() : [$type]; - $formattedTypes = []; - - foreach ($types as $type) { - $typeStyle = $type->isBuiltin() ? 'keyword' : 'class'; - - // PHP 7.0 didn't have `getName` on reflection types, so wheee! - $typeName = \method_exists($type, 'getName') ? $type->getName() : (string) $type; - - // @todo Do we want to include the ? for nullable types? Maybe only sometimes? - $formattedTypes[] = \sprintf('<%s>%s', $typeStyle, OutputFormatter::escape($typeName), $typeStyle); + if ($type instanceof \ReflectionUnionType) { + $delimeter = '|'; + } elseif ($type instanceof \ReflectionIntersectionType) { + $delimeter = '&'; + } else { + return self::formatReflectionNamedType($type, $indicateNullable); } - return \implode('|', $formattedTypes); + $formattedTypes = []; + foreach ($type->getTypes() as $namedType) { + $formattedTypes[] = self::formatReflectionNamedType($namedType, $indicateNullable); + } + + return \implode($delimeter, $formattedTypes); + } + + /** + * Print a single named type. + */ + private static function formatReflectionNamedType(\ReflectionNamedType $type, bool $indicateNullable): string + { + $typeStyle = $type->isBuiltin() ? 'keyword' : 'class'; + $nullable = $indicateNullable && $type->allowsNull() ? '?' : ''; + + return \sprintf('<%s>%s%s', $typeStyle, $nullable, OutputFormatter::escape($type->getName()), $typeStyle); } } diff --git a/vendor/psy/psysh/src/Formatter/TraceFormatter.php b/vendor/psy/psysh/src/Formatter/TraceFormatter.php index 7575068e..a30b4b8c 100644 --- a/vendor/psy/psysh/src/Formatter/TraceFormatter.php +++ b/vendor/psy/psysh/src/Formatter/TraceFormatter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,7 +29,7 @@ class TraceFormatter * * @return string[] Formatted stacktrace lines */ - public static function formatTrace(\Throwable $throwable, FilterOptions $filter = null, int $count = null, bool $includePsy = true): array + public static function formatTrace(\Throwable $throwable, ?FilterOptions $filter = null, ?int $count = null, bool $includePsy = true): array { if ($cwd = \getcwd()) { $cwd = \rtrim($cwd, \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR; diff --git a/vendor/psy/psysh/src/Input/CodeArgument.php b/vendor/psy/psysh/src/Input/CodeArgument.php index f9c8bcdb..2654c943 100644 --- a/vendor/psy/psysh/src/Input/CodeArgument.php +++ b/vendor/psy/psysh/src/Input/CodeArgument.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -39,7 +39,7 @@ class CodeArgument extends InputArgument * * @throws \InvalidArgumentException When argument mode is not valid */ - public function __construct(string $name, int $mode = null, string $description = '', $default = null) + public function __construct(string $name, ?int $mode = null, string $description = '', $default = null) { if ($mode & InputArgument::IS_ARRAY) { throw new \InvalidArgumentException('Argument mode IS_ARRAY is not valid'); diff --git a/vendor/psy/psysh/src/Input/FilterOptions.php b/vendor/psy/psysh/src/Input/FilterOptions.php index f630d3b9..4f8c6b27 100644 --- a/vendor/psy/psysh/src/Input/FilterOptions.php +++ b/vendor/psy/psysh/src/Input/FilterOptions.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -73,8 +73,6 @@ class FilterOptions /** * Check whether the bound input has filter options. - * - * @return bool */ public function hasFilter(): bool { @@ -86,10 +84,8 @@ class FilterOptions * * @param string $string * @param array $matches - * - * @return bool */ - public function match(string $string, array &$matches = null): bool + public function match(string $string, ?array &$matches = null): bool { return $this->filter === false || (\preg_match($this->pattern, $string, $matches) xor $this->invert); } @@ -116,8 +112,6 @@ class FilterOptions * Check whether a string appears to be a regular expression. * * @param string $string - * - * @return bool */ private function stringIsRegex(string $string): bool { diff --git a/vendor/psy/psysh/src/Input/ShellInput.php b/vendor/psy/psysh/src/Input/ShellInput.php index af21f448..9b8bf81d 100644 --- a/vendor/psy/psysh/src/Input/ShellInput.php +++ b/vendor/psy/psysh/src/Input/ShellInput.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,6 +19,8 @@ use Symfony\Component\Console\Input\StringInput; */ class ShellInput extends StringInput { + public const REGEX_STRING = '([^\s]+?)(?:\s|(?hasCodeArgument = $hasCodeArgument; - return parent::bind($definition); + parent::bind($definition); } /** @@ -98,7 +100,7 @@ class ShellInput extends StringInput \stripcslashes(\substr($match[0], 1, \strlen($match[0]) - 2)), \stripcslashes(\substr($input, $cursor)), ]; - } elseif (\preg_match('/'.StringInput::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { + } elseif (\preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { $tokens[] = [ \stripcslashes($match[1]), \stripcslashes(\substr($input, $cursor)), @@ -119,7 +121,7 @@ class ShellInput extends StringInput /** * Same as parent, but with some bonus handling for code arguments. */ - protected function parse() + protected function parse(): void { $parseOptions = true; $this->parsed = $this->tokenPairs; diff --git a/vendor/psy/psysh/src/Input/SilentInput.php b/vendor/psy/psysh/src/Input/SilentInput.php index cf19409b..0c963f54 100644 --- a/vendor/psy/psysh/src/Input/SilentInput.php +++ b/vendor/psy/psysh/src/Input/SilentInput.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,8 +34,6 @@ class SilentInput /** * To. String. - * - * @return string */ public function __toString(): string { diff --git a/vendor/psy/psysh/src/Output/OutputPager.php b/vendor/psy/psysh/src/Output/OutputPager.php index 67f523d0..0652b70b 100644 --- a/vendor/psy/psysh/src/Output/OutputPager.php +++ b/vendor/psy/psysh/src/Output/OutputPager.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Output/PassthruPager.php b/vendor/psy/psysh/src/Output/PassthruPager.php index b2714259..6ad17b5b 100644 --- a/vendor/psy/psysh/src/Output/PassthruPager.php +++ b/vendor/psy/psysh/src/Output/PassthruPager.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Output/ProcOutputPager.php b/vendor/psy/psysh/src/Output/ProcOutputPager.php index cbeb0ff0..42e40db5 100644 --- a/vendor/psy/psysh/src/Output/ProcOutputPager.php +++ b/vendor/psy/psysh/src/Output/ProcOutputPager.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -32,9 +32,9 @@ class ProcOutputPager extends StreamOutput implements OutputPager * Constructor. * * @param StreamOutput $output - * @param string $cmd Pager process command (default: 'less -R -S -F -X') + * @param string $cmd Pager process command (default: 'less -R -F -X') */ - public function __construct(StreamOutput $output, string $cmd = 'less -R -S -F -X') + public function __construct(StreamOutput $output, string $cmd = 'less -R -F -X') { $this->stream = $output->getStream(); $this->cmd = $cmd; @@ -48,12 +48,13 @@ class ProcOutputPager extends StreamOutput implements OutputPager * * @throws \RuntimeException When unable to write output (should never happen) */ - public function doWrite($message, $newline) + public function doWrite($message, $newline): void { $pipe = $this->getPipe(); if (false === @\fwrite($pipe, $message.($newline ? \PHP_EOL : ''))) { // @codeCoverageIgnoreStart // should never happen + $this->close(); throw new \RuntimeException('Unable to write output'); // @codeCoverageIgnoreEnd } diff --git a/vendor/psy/psysh/src/Output/ShellOutput.php b/vendor/psy/psysh/src/Output/ShellOutput.php index e24c992f..a0c2a699 100644 --- a/vendor/psy/psysh/src/Output/ShellOutput.php +++ b/vendor/psy/psysh/src/Output/ShellOutput.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,7 +13,6 @@ namespace Psy\Output; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Formatter\OutputFormatterInterface; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Output\ConsoleOutput; /** @@ -24,8 +23,13 @@ class ShellOutput extends ConsoleOutput const NUMBER_LINES = 128; private $paging = 0; + + /** @var OutputPager */ private $pager; + /** @var Theme */ + private $theme; + /** * Construct a ShellOutput instance. * @@ -34,10 +38,11 @@ class ShellOutput extends ConsoleOutput * @param OutputFormatterInterface|null $formatter (default: null) * @param string|OutputPager|null $pager (default: null) */ - public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null, $pager = null) + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, ?OutputFormatterInterface $formatter = null, $pager = null, $theme = null) { parent::__construct($verbosity, $decorated, $formatter); + $this->theme = $theme ?? new Theme('modern'); $this->initFormatters(); if ($pager === null) { @@ -114,7 +119,7 @@ class ShellOutput extends ConsoleOutput * @param bool $newline Whether to add a newline or not * @param int $type The type of output */ - public function write($messages, $newline = false, $type = 0) + public function write($messages, $newline = false, $type = 0): void { if ($this->getVerbosity() === self::VERBOSITY_QUIET) { return; @@ -149,7 +154,7 @@ class ShellOutput extends ConsoleOutput * @param string $message A message to write to the output * @param bool $newline Whether to add a newline or not */ - public function doWrite($message, $newline) + public function doWrite($message, $newline): void { if ($this->paging > 0) { $this->pager->doWrite($message, $newline); @@ -158,6 +163,15 @@ class ShellOutput extends ConsoleOutput } } + /** + * Set the output Theme. + */ + public function setTheme(Theme $theme) + { + $this->theme = $theme; + $this->initFormatters(); + } + /** * Flush and close the output pager. */ @@ -173,38 +187,22 @@ class ShellOutput extends ConsoleOutput */ private function initFormatters() { - $formatter = $this->getFormatter(); + $useGrayFallback = !$this->grayExists(); + $this->theme->applyStyles($this->getFormatter(), $useGrayFallback); + $this->theme->applyErrorStyles($this->getErrorOutput()->getFormatter(), $useGrayFallback); + } - $formatter->setStyle('warning', new OutputFormatterStyle('black', 'yellow')); - $formatter->setStyle('error', new OutputFormatterStyle('white', 'red', ['bold'])); - $formatter->setStyle('aside', new OutputFormatterStyle('blue')); - $formatter->setStyle('strong', new OutputFormatterStyle(null, null, ['bold'])); - $formatter->setStyle('return', new OutputFormatterStyle('cyan')); - $formatter->setStyle('urgent', new OutputFormatterStyle('red')); - $formatter->setStyle('hidden', new OutputFormatterStyle('black')); + /** + * Checks if the "gray" color exists on the output. + */ + private function grayExists(): bool + { + try { + $this->write(''); + } catch (\InvalidArgumentException $e) { + return false; + } - // Visibility - $formatter->setStyle('public', new OutputFormatterStyle(null, null, ['bold'])); - $formatter->setStyle('protected', new OutputFormatterStyle('yellow')); - $formatter->setStyle('private', new OutputFormatterStyle('red')); - $formatter->setStyle('global', new OutputFormatterStyle('cyan', null, ['bold'])); - $formatter->setStyle('const', new OutputFormatterStyle('cyan')); - $formatter->setStyle('class', new OutputFormatterStyle('blue', null, ['underscore'])); - $formatter->setStyle('function', new OutputFormatterStyle(null)); - $formatter->setStyle('default', new OutputFormatterStyle(null)); - - // Types - $formatter->setStyle('number', new OutputFormatterStyle('magenta')); - $formatter->setStyle('integer', new OutputFormatterStyle('magenta')); - $formatter->setStyle('float', new OutputFormatterStyle('yellow')); - $formatter->setStyle('string', new OutputFormatterStyle('green')); - $formatter->setStyle('bool', new OutputFormatterStyle('cyan')); - $formatter->setStyle('keyword', new OutputFormatterStyle('yellow')); - $formatter->setStyle('comment', new OutputFormatterStyle('blue')); - $formatter->setStyle('object', new OutputFormatterStyle('blue')); - $formatter->setStyle('resource', new OutputFormatterStyle('yellow')); - - // Code-specific formatting - $formatter->setStyle('inline_html', new OutputFormatterStyle('cyan')); + return true; } } diff --git a/vendor/psy/psysh/src/ParserFactory.php b/vendor/psy/psysh/src/ParserFactory.php index fb348dd9..2b37ccd0 100644 --- a/vendor/psy/psysh/src/ParserFactory.php +++ b/vendor/psy/psysh/src/ParserFactory.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,54 +15,21 @@ use PhpParser\Parser; use PhpParser\ParserFactory as OriginalParserFactory; /** - * Parser factory to abstract over PHP parser library versions. + * Parser factory to abstract over PHP Parser library versions. */ class ParserFactory { - const ONLY_PHP5 = 'ONLY_PHP5'; - const ONLY_PHP7 = 'ONLY_PHP7'; - const PREFER_PHP5 = 'PREFER_PHP5'; - const PREFER_PHP7 = 'PREFER_PHP7'; - /** - * Possible kinds of parsers for the factory, from PHP parser library. - * - * @return array + * New parser instance. */ - public static function getPossibleKinds(): array + public function createParser(): Parser { - return ['ONLY_PHP5', 'ONLY_PHP7', 'PREFER_PHP5', 'PREFER_PHP7']; - } + $factory = new OriginalParserFactory(); - /** - * Default kind (if supported, based on current interpreter's version). - * - * @return string|null - */ - public function getDefaultKind() - { - return static::ONLY_PHP7; - } - - /** - * New parser instance with given kind. - * - * @param string|null $kind One of class constants (only for PHP parser 2.0 and above) - * - * @return Parser - */ - public function createParser($kind = null): Parser - { - $originalFactory = new OriginalParserFactory(); - - $kind = $kind ?: $this->getDefaultKind(); - - if (!\in_array($kind, static::getPossibleKinds())) { - throw new \InvalidArgumentException('Unknown parser kind'); + if (!\method_exists($factory, 'createForHostVersion')) { + return $factory->create(OriginalParserFactory::PREFER_PHP7); } - $parser = $originalFactory->create(\constant(OriginalParserFactory::class.'::'.$kind)); - - return $parser; + return $factory->createForHostVersion(); } } diff --git a/vendor/psy/psysh/src/Readline/GNUReadline.php b/vendor/psy/psysh/src/Readline/GNUReadline.php index d4dba0cc..28fd5d8c 100644 --- a/vendor/psy/psysh/src/Readline/GNUReadline.php +++ b/vendor/psy/psysh/src/Readline/GNUReadline.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,8 +34,6 @@ class GNUReadline implements Readline * * NOTE: As of PHP 7.4, PHP sometimes has history support in the Libedit * wrapper, so that will use the GNUReadline implementation as well! - * - * @return bool */ public static function isSupported(): bool { @@ -46,21 +44,12 @@ class GNUReadline implements Readline * Check whether this readline implementation supports bracketed paste. * * Currently, the GNU readline implementation does, but the libedit wrapper does not. - * - * @return bool */ public static function supportsBracketedPaste(): bool { return self::isSupported() && \stripos(\readline_info('library_version') ?: '', 'editline') === false; } - /** - * GNU Readline constructor. - * - * @param string|false $historyFile - * @param int $historySize - * @param bool $eraseDups - */ public function __construct($historyFile = null, $historySize = 0, $eraseDups = false) { $this->historyFile = ($historyFile !== null) ? $historyFile : false; @@ -116,7 +105,7 @@ class GNUReadline implements Readline /** * {@inheritdoc} */ - public function readline(string $prompt = null) + public function readline(?string $prompt = null) { return \readline($prompt); } diff --git a/vendor/psy/psysh/src/Readline/HoaConsole.php b/vendor/psy/psysh/src/Readline/HoaConsole.php deleted file mode 100644 index 99011759..00000000 --- a/vendor/psy/psysh/src/Readline/HoaConsole.php +++ /dev/null @@ -1,129 +0,0 @@ -hoaReadline = new HoaReadline(); - $this->hoaReadline->addMapping('\C-l', function () { - $this->redisplay(); - - return HoaReadline::STATE_NO_ECHO; - }); - } - - /** - * {@inheritdoc} - */ - public function addHistory(string $line): bool - { - $this->hoaReadline->addHistory($line); - - return true; - } - - /** - * {@inheritdoc} - */ - public function clearHistory(): bool - { - $this->hoaReadline->clearHistory(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function listHistory(): array - { - $i = 0; - $list = []; - while (($item = $this->hoaReadline->getHistory($i++)) !== null) { - $list[] = $item; - } - - return $list; - } - - /** - * {@inheritdoc} - */ - public function readHistory(): bool - { - return true; - } - - /** - * {@inheritdoc} - * - * @throws BreakException if user hits Ctrl+D - * - * @return false|string - */ - public function readline(string $prompt = null) - { - $this->lastPrompt = $prompt; - - return $this->hoaReadline->readLine($prompt); - } - - /** - * {@inheritdoc} - */ - public function redisplay() - { - $currentLine = $this->hoaReadline->getLine(); - Cursor::clear('all'); - echo $this->lastPrompt, $currentLine; - } - - /** - * {@inheritdoc} - */ - public function writeHistory(): bool - { - return true; - } -} diff --git a/vendor/psy/psysh/src/Readline/Libedit.php b/vendor/psy/psysh/src/Readline/Libedit.php index a2f4815e..6259e2ff 100644 --- a/vendor/psy/psysh/src/Readline/Libedit.php +++ b/vendor/psy/psysh/src/Readline/Libedit.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,8 +29,6 @@ class Libedit extends GNUReadline /** * Let's emulate GNU Readline by manually reading and parsing the history file! - * - * @return bool */ public static function isSupported(): bool { @@ -65,6 +63,7 @@ class Libedit extends GNUReadline // decode the line $history = \array_map([$this, 'parseHistoryLine'], $history); + // filter empty lines & comments return \array_values(\array_filter($history)); } diff --git a/vendor/psy/psysh/src/Readline/Readline.php b/vendor/psy/psysh/src/Readline/Readline.php index 8a8f79bb..429b2b1f 100644 --- a/vendor/psy/psysh/src/Readline/Readline.php +++ b/vendor/psy/psysh/src/Readline/Readline.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,17 +16,20 @@ namespace Psy\Readline; */ interface Readline { + /** + * @param string|false $historyFile + * @param int|null $historySize + * @param bool|null $eraseDups + */ + public function __construct($historyFile = null, $historySize = 0, $eraseDups = false); + /** * Check whether this Readline class is supported by the current system. - * - * @return bool */ public static function isSupported(): bool; /** * Check whether this Readline class supports bracketed paste. - * - * @return bool */ public static function supportsBracketedPaste(): bool; @@ -49,7 +52,7 @@ interface Readline /** * List the command history. * - * @return array + * @return string[] */ public function listHistory(): array; @@ -67,7 +70,7 @@ interface Readline * * @return false|string */ - public function readline(string $prompt = null); + public function readline(?string $prompt = null); /** * Redraw readline to redraw the display. diff --git a/vendor/psy/psysh/src/Readline/Transient.php b/vendor/psy/psysh/src/Readline/Transient.php index 128ef867..22c62493 100644 --- a/vendor/psy/psysh/src/Readline/Transient.php +++ b/vendor/psy/psysh/src/Readline/Transient.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -110,7 +110,7 @@ class Transient implements Readline * * @return false|string */ - public function readline(string $prompt = null) + public function readline(?string $prompt = null) { echo $prompt; diff --git a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php deleted file mode 100644 index 7120a470..00000000 --- a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php +++ /dev/null @@ -1,228 +0,0 @@ -class = $class; - $this->name = $name; - - $constants = $class->getConstants(); - if (!\array_key_exists($name, $constants)) { - throw new \InvalidArgumentException('Unknown constant: '.$name); - } - - $this->value = $constants[$name]; - } - - /** - * Exports a reflection. - * - * @param string|object $class - * @param string $name - * @param bool $return pass true to return the export, as opposed to emitting it - * - * @return string|null - */ - public static function export($class, string $name, bool $return = false) - { - $refl = new self($class, $name); - $value = $refl->getValue(); - - $str = \sprintf('Constant [ public %s %s ] { %s }', \gettype($value), $refl->getName(), $value); - - if ($return) { - return $str; - } - - echo $str."\n"; - } - - /** - * Gets the declaring class. - * - * @return \ReflectionClass - */ - public function getDeclaringClass(): \ReflectionClass - { - $parent = $this->class; - - // Since we don't have real reflection constants, we can't see where - // it's actually defined. Let's check for a constant that is also - // available on the parent class which has exactly the same value. - // - // While this isn't _technically_ correct, it's prolly close enough. - do { - $class = $parent; - $parent = $class->getParentClass(); - } while ($parent && $parent->hasConstant($this->name) && $parent->getConstant($this->name) === $this->value); - - return $class; - } - - /** - * Get the constant's docblock. - * - * @return false - */ - public function getDocComment(): bool - { - return false; - } - - /** - * Gets the class constant modifiers. - * - * Since this is only used for PHP < 7.1, we can just return "public". All - * the fancier modifiers are only available on PHP versions which have their - * own ReflectionClassConstant class :) - * - * @return int - */ - public function getModifiers(): int - { - return \ReflectionMethod::IS_PUBLIC; - } - - /** - * Gets the constant name. - * - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * Gets the value of the constant. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Checks if class constant is private. - * - * @return bool false - */ - public function isPrivate(): bool - { - return false; - } - - /** - * Checks if class constant is protected. - * - * @return bool false - */ - public function isProtected(): bool - { - return false; - } - - /** - * Checks if class constant is public. - * - * @return bool true - */ - public function isPublic(): bool - { - return true; - } - - /** - * To string. - * - * @return string - */ - public function __toString(): string - { - return $this->getName(); - } - - /** - * Gets the constant's file name. - * - * Currently returns null, because if it returns a file name the signature - * formatter will barf. - */ - public function getFileName() - { - return; - // return $this->class->getFileName(); - } - - /** - * Get the code start line. - * - * @throws \RuntimeException - */ - public function getStartLine() - { - throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); - } - - /** - * Get the code end line. - * - * @throws \RuntimeException - */ - public function getEndLine() - { - return $this->getStartLine(); - } - - /** - * Get a ReflectionClassConstant instance. - * - * In PHP >= 7.1, this will return a \ReflectionClassConstant from the - * standard reflection library. For older PHP, it will return this polyfill. - * - * @param string|object $class - * @param string $name - * - * @return ReflectionClassConstant|\ReflectionClassConstant - */ - public static function create($class, string $name) - { - if (\class_exists(\ReflectionClassConstant::class)) { - return new \ReflectionClassConstant($class, $name); - } - - return new self($class, $name); - } -} diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php index a56391b6..763011ff 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,19 +12,159 @@ namespace Psy\Reflection; /** - * @deprecated ReflectionConstant is now ReflectionClassConstant. This class - * name will be reclaimed in the next stable release, to be used for - * ReflectionConstant_ :) + * Somehow the standard reflection library doesn't include constants. + * + * ReflectionConstant corrects that omission. */ -class ReflectionConstant extends ReflectionClassConstant +class ReflectionConstant implements \Reflector { - /** - * {inheritDoc}. - */ - public function __construct($class, $name) - { - @\trigger_error('ReflectionConstant is now ReflectionClassConstant', \E_USER_DEPRECATED); + public $name; + private $value; - parent::__construct($class, $name); + private static $magicConstants = [ + '__LINE__', + '__FILE__', + '__DIR__', + '__FUNCTION__', + '__CLASS__', + '__TRAIT__', + '__METHOD__', + '__NAMESPACE__', + '__COMPILER_HALT_OFFSET__', + ]; + + /** + * Construct a ReflectionConstant object. + * + * @param string $name + */ + public function __construct(string $name) + { + $this->name = $name; + + if (!\defined($name) && !self::isMagicConstant($name)) { + throw new \InvalidArgumentException('Unknown constant: '.$name); + } + + if (!self::isMagicConstant($name)) { + $this->value = @\constant($name); + } + } + + /** + * Exports a reflection. + * + * @param string $name + * @param bool $return pass true to return the export, as opposed to emitting it + * + * @return string|null + */ + public static function export(string $name, bool $return = false) + { + $refl = new self($name); + $value = $refl->getValue(); + + $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value); + + if ($return) { + return $str; + } + + echo $str."\n"; + } + + public static function isMagicConstant($name) + { + return \in_array($name, self::$magicConstants); + } + + /** + * Get the constant's docblock. + * + * @return false + */ + public function getDocComment(): bool + { + return false; + } + + /** + * Gets the constant name. + */ + public function getName(): string + { + return $this->name; + } + + /** + * Gets the namespace name. + * + * Returns '' when the constant is not namespaced. + */ + public function getNamespaceName(): string + { + if (!$this->inNamespace()) { + return ''; + } + + return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name); + } + + /** + * Gets the value of the constant. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Checks if this constant is defined in a namespace. + */ + public function inNamespace(): bool + { + return \strpos($this->name, '\\') !== false; + } + + /** + * To string. + */ + public function __toString(): string + { + return $this->getName(); + } + + /** + * Gets the constant's file name. + * + * Currently returns null, because if it returns a file name the signature + * formatter will barf. + */ + public function getFileName() + { + return; + // return $this->class->getFileName(); + } + + /** + * Get the code start line. + * + * @throws \RuntimeException + */ + public function getStartLine() + { + throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); + } + + /** + * Get the code end line. + * + * @throws \RuntimeException + */ + public function getEndLine() + { + return $this->getStartLine(); } } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php deleted file mode 100644 index f1df1805..00000000 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php +++ /dev/null @@ -1,182 +0,0 @@ -name = $name; - - if (!\defined($name) && !self::isMagicConstant($name)) { - throw new \InvalidArgumentException('Unknown constant: '.$name); - } - - if (!self::isMagicConstant($name)) { - $this->value = @\constant($name); - } - } - - /** - * Exports a reflection. - * - * @param string $name - * @param bool $return pass true to return the export, as opposed to emitting it - * - * @return string|null - */ - public static function export(string $name, bool $return = false) - { - $refl = new self($name); - $value = $refl->getValue(); - - $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value); - - if ($return) { - return $str; - } - - echo $str."\n"; - } - - public static function isMagicConstant($name) - { - return \in_array($name, self::$magicConstants); - } - - /** - * Get the constant's docblock. - * - * @return false - */ - public function getDocComment(): bool - { - return false; - } - - /** - * Gets the constant name. - * - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * Gets the namespace name. - * - * Returns '' when the constant is not namespaced. - * - * @return string - */ - public function getNamespaceName(): string - { - if (!$this->inNamespace()) { - return ''; - } - - return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name); - } - - /** - * Gets the value of the constant. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Checks if this constant is defined in a namespace. - * - * @return bool - */ - public function inNamespace(): bool - { - return \strpos($this->name, '\\') !== false; - } - - /** - * To string. - * - * @return string - */ - public function __toString(): string - { - return $this->getName(); - } - - /** - * Gets the constant's file name. - * - * Currently returns null, because if it returns a file name the signature - * formatter will barf. - */ - public function getFileName() - { - return; - // return $this->class->getFileName(); - } - - /** - * Get the code start line. - * - * @throws \RuntimeException - */ - public function getStartLine() - { - throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); - } - - /** - * Get the code end line. - * - * @throws \RuntimeException - */ - public function getEndLine() - { - return $this->getStartLine(); - } -} diff --git a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php index 3a9f4293..89022146 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -95,8 +95,6 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract /** * Get language construct name. - * - * @return string */ public function getName(): string { @@ -105,8 +103,6 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract /** * None of these return references. - * - * @return bool */ public function returnsReference(): bool { @@ -145,8 +141,6 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract /** * To string. - * - * @return string */ public function __toString(): string { @@ -157,8 +151,6 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract * Check whether keyword is a (known) language construct. * * @param string $keyword - * - * @return bool */ public static function isLanguageConstruct(string $keyword): bool { diff --git a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php index 2ce89f40..756dfd8a 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -31,13 +31,10 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter /** * No class here. - * - * @todo remove \ReturnTypeWillChange attribute after dropping support for PHP 7.0 (when we can use nullable types) */ - #[\ReturnTypeWillChange] - public function getClass() + public function getClass(): ?\ReflectionClass { - return; + return null; } /** diff --git a/vendor/psy/psysh/src/Reflection/ReflectionNamespace.php b/vendor/psy/psysh/src/Reflection/ReflectionNamespace.php index f6e0fcd6..3c8b330c 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionNamespace.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionNamespace.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Shell.php b/vendor/psy/psysh/src/Shell.php index a647c01a..3d9137e2 100644 --- a/vendor/psy/psysh/src/Shell.php +++ b/vendor/psy/psysh/src/Shell.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,17 +15,19 @@ use Psy\CodeCleaner\NoReturnValue; use Psy\Exception\BreakException; use Psy\Exception\ErrorException; use Psy\Exception\Exception as PsyException; +use Psy\Exception\RuntimeException; use Psy\Exception\ThrowUpException; -use Psy\Exception\TypeErrorException; use Psy\ExecutionLoop\ProcessForker; use Psy\ExecutionLoop\RunkitReloader; use Psy\Formatter\TraceFormatter; use Psy\Input\ShellInput; use Psy\Input\SilentInput; +use Psy\Output\ShellOutput; use Psy\TabCompletion\Matcher; use Psy\VarDumper\PresenterAware; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command as BaseCommand; +use Symfony\Component\Console\Exception\ExceptionInterface as SymfonyConsoleException; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputArgument; @@ -48,12 +50,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ class Shell extends Application { - const VERSION = 'v0.11.2'; - - const PROMPT = '>>> '; - const BUFF_PROMPT = '... '; - const REPLAY = '--> '; - const RETVAL = '=> '; + const VERSION = 'v0.12.3'; private $config; private $cleaner; @@ -82,7 +79,7 @@ class Shell extends Application * * @param Configuration|null $config (default: null) */ - public function __construct(Configuration $config = null) + public function __construct(?Configuration $config = null) { $this->config = $config ?: new Configuration(); $this->cleaner = $this->config->getCodeCleaner(); @@ -124,6 +121,14 @@ class Shell extends Application return $isIncluded; } + /** + * Check if the currently running PsySH bin is a phar archive. + */ + public static function isPhar(): bool + { + return \class_exists("\Phar") && \Phar::running() !== '' && \strpos(__FILE__, \Phar::running(true)) === 0; + } + /** * Invoke a Psy Shell from the current context. * @@ -137,6 +142,8 @@ class Shell extends Application */ public static function debug(array $vars = [], $bindTo = null): array { + @\trigger_error('`Psy\\Shell::debug` is deprecated; call `Psy\\debug` instead.', \E_USER_DEPRECATED); + return \Psy\debug($vars, $bindTo); } @@ -216,7 +223,7 @@ class Shell extends Application } /** - * @return array + * @return Matcher\AbstractMatcher[] */ protected function getDefaultMatchers(): array { @@ -241,14 +248,6 @@ class Shell extends Application ]; } - /** - * @deprecated Nothing should use this anymore - */ - protected function getTabCompletionMatchers() - { - @\trigger_error('getTabCompletionMatchers is no longer used', \E_USER_DEPRECATED); - } - /** * Gets the default command loop listeners. * @@ -290,6 +289,8 @@ class Shell extends Application */ public function addTabCompletionMatchers(array $matchers) { + @\trigger_error('`addTabCompletionMatchers` is deprecated; call `addMatchers` instead.', \E_USER_DEPRECATED); + $this->addMatchers($matchers); } @@ -312,7 +313,7 @@ class Shell extends Application * * @return int 0 if everything went fine, or an error code */ - public function run(InputInterface $input = null, OutputInterface $output = null): int + public function run(?InputInterface $input = null, ?OutputInterface $output = null): int { // We'll just ignore the input passed in, and set up our own! $input = new ArrayInput([]); @@ -326,7 +327,7 @@ class Shell extends Application try { return parent::run($input, $output); - } catch (\Exception $e) { + } catch (\Throwable $e) { $this->writeException($e); } @@ -336,7 +337,7 @@ class Shell extends Application /** * Runs PsySH. * - * @throws \Exception if thrown via the `throw-up` command + * @throws \Throwable if thrown via the `throw-up` command * * @param InputInterface $input An Input instance * @param OutputInterface $output An Output instance @@ -362,7 +363,7 @@ class Shell extends Application * Initializes tab completion and readline history, then spins up the * execution loop. * - * @throws \Exception if thrown via the `throw-up` command + * @throws \Throwable if thrown via the `throw-up` command * * @return int 0 if everything went fine, or an error code */ @@ -435,7 +436,7 @@ class Shell extends Application /** * Configures the input and output instances based on the user arguments and options. */ - protected function configureIO(InputInterface $input, OutputInterface $output) + protected function configureIO(InputInterface $input, OutputInterface $output): void { // @todo overrides via environment variables (or should these happen in config? ... probably config) $input->setInteractive($this->config->getInputInteractive()); @@ -458,8 +459,6 @@ class Shell extends Application foreach ($__psysh__->getIncludes() as $__psysh_include__) { try { include_once $__psysh_include__; - } catch (\Error $_e) { - $__psysh__->writeException(ErrorException::fromError($_e)); } catch (\Exception $_e) { $__psysh__->writeException($_e); } @@ -583,8 +582,6 @@ class Shell extends Application * Run execution loop listeners on user input. * * @param string $input - * - * @return string */ public function onInput(string $input): string { @@ -601,8 +598,6 @@ class Shell extends Application * Run execution loop listeners on code to be executed. * * @param string $code - * - * @return string */ public function onExecute(string $code): string { @@ -619,7 +614,7 @@ class Shell extends Application $output = $output->getErrorOutput(); } - $output->writeln(\sprintf('', OutputFormatter::escape($code)), ConsoleOutput::VERBOSITY_DEBUG); + $output->writeln(\sprintf('%s', OutputFormatter::escape($code)), ConsoleOutput::VERBOSITY_DEBUG); return $code; } @@ -659,7 +654,7 @@ class Shell extends Application * * @param bool $includeBoundObject Pass false to exclude 'this'. If you're * passing the scope variables to `extract` - * in PHP 7.1+, you _must_ exclude 'this' + * you _must_ exclude 'this' * * @return array Associative array of scope variables */ @@ -679,7 +674,7 @@ class Shell extends Application * * @param bool $includeBoundObject Pass false to exclude 'this'. If you're * passing the scope variables to `extract` - * in PHP 7.1+, you _must_ exclude 'this' + * you _must_ exclude 'this' * * @return array Associative array of magic scope variables */ @@ -803,7 +798,7 @@ class Shell extends Application /** * Get PHP files to be parsed and executed before running the interactive shell. * - * @return array + * @return string[] */ public function getIncludes(): array { @@ -898,7 +893,7 @@ class Shell extends Application * * This is useful for commands which manipulate the buffer. * - * @return array + * @return string[] */ public function getCodeBuffer(): array { @@ -926,6 +921,9 @@ class Shell extends Application if ($input->hasParameterOption(['--help', '-h'])) { $helpCommand = $this->get('help'); + if (!$helpCommand instanceof Command\HelpCommand) { + throw new RuntimeException('Invalid help command instance'); + } $helpCommand->setCommand($command); return $helpCommand->run(new StringInput(''), $this->output); @@ -1058,6 +1056,12 @@ class Shell extends Application */ public function writeStdout(string $out, int $phase = \PHP_OUTPUT_HANDLER_END) { + if ($phase & \PHP_OUTPUT_HANDLER_START) { + if ($this->output instanceof ShellOutput) { + $this->output->startPaging(); + } + } + $isCleaning = $phase & \PHP_OUTPUT_HANDLER_CLEAN; // Incremental flush @@ -1072,7 +1076,7 @@ class Shell extends Application // Write an extra newline if stdout didn't end with one if ($this->outputWantsNewline) { if (!$this->config->rawOutput() && !$this->config->outputIsPiped()) { - $this->output->writeln(\sprintf('', $this->config->useUnicode() ? '⏎' : '\\n')); + $this->output->writeln(\sprintf('%s', $this->config->useUnicode() ? '⏎' : '\\n')); } else { $this->output->writeln(''); } @@ -1084,6 +1088,10 @@ class Shell extends Application $this->context->setLastStdout($this->stdoutBuffer); $this->stdoutBuffer = ''; } + + if ($this->output instanceof ShellOutput) { + $this->output->stopPaging(); + } } } @@ -1111,25 +1119,32 @@ class Shell extends Application if ($rawOutput) { $formatted = \var_export($ret, true); } else { - $indent = \str_repeat(' ', \strlen(static::RETVAL)); + $prompt = $this->config->theme()->returnValue(); + $indent = \str_repeat(' ', \strlen($prompt)); $formatted = $this->presentValue($ret); - $formatted = static::RETVAL.\str_replace(\PHP_EOL, \PHP_EOL.$indent, $formatted); + $formattedRetValue = \sprintf('%s', $prompt); + + $formatted = $formattedRetValue.\str_replace(\PHP_EOL, \PHP_EOL.$indent, $formatted); } - $this->output->writeln($formatted); + if ($this->output instanceof ShellOutput) { + $this->output->page($formatted.\PHP_EOL); + } else { + $this->output->writeln($formatted); + } } /** - * Renders a caught Exception. + * Renders a caught Exception or Error. * * Exceptions are formatted according to severity. ErrorExceptions which were * warnings or Strict errors aren't rendered as harshly as real errors. * * Stores $e as the last Exception in the Shell Context. * - * @param \Exception $e An exception instance + * @param \Throwable $e An exception or error instance */ - public function writeException(\Exception $e) + public function writeException(\Throwable $e) { // No need to write the break exception during a non-interactive run. if ($e instanceof BreakException && $this->nonInteractive) { @@ -1148,8 +1163,17 @@ class Shell extends Application if ($output instanceof ConsoleOutput) { $output = $output->getErrorOutput(); } + + if (!$this->config->theme()->compact()) { + $output->writeln(''); + } + $output->writeln($this->formatException($e)); + if (!$this->config->theme()->compact()) { + $output->writeln(''); + } + // Include an exception trace (as long as this isn't a BreakException). if (!$e instanceof BreakException && $output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { $trace = TraceFormatter::formatTrace($e); @@ -1167,8 +1191,6 @@ class Shell extends Application * Check whether the last exec was successful. * * Returns true if a return value was logged rather than an exception. - * - * @return bool */ public function getLastExecSuccess(): bool { @@ -1176,23 +1198,27 @@ class Shell extends Application } /** - * Helper for formatting an exception for writeException(). + * Helper for formatting an exception or error for writeException(). * * @todo extract this to somewhere it makes more sense * - * @param \Exception $e - * - * @return string + * @param \Throwable $e */ - public function formatException(\Exception $e): string + public function formatException(\Throwable $e): string { - $message = $e->getMessage(); - if (!$e instanceof PsyException) { - if ($message === '') { - $message = \get_class($e); - } else { - $message = \sprintf('%s with message \'%s\'', \get_class($e), $message); - } + $indent = $this->config->theme()->compact() ? '' : ' '; + + if ($e instanceof BreakException) { + return \sprintf('%s INFO %s.', $indent, \rtrim($e->getRawMessage(), '.')); + } elseif ($e instanceof PsyException) { + $message = $e->getLine() > 1 + ? \sprintf('%s in %s on line %d', $e->getRawMessage(), $e->getFile(), $e->getLine()) + : \sprintf('%s in %s', $e->getRawMessage(), $e->getFile()); + + $messageLabel = \strtoupper($this->getMessageLabel($e)); + } else { + $message = $e->getMessage(); + $messageLabel = $this->getMessageLabel($e); } $message = \preg_replace( @@ -1201,19 +1227,26 @@ class Shell extends Application $message ); - $message = \str_replace(" in eval()'d code", ' in Psy Shell code', $message); + $message = \str_replace(" in eval()'d code", '', $message); + $message = \trim($message); + + // Ensures the given string ends with punctuation... + if (!empty($message) && !\in_array(\substr($message, -1), ['.', '?', '!', ':'])) { + $message = "$message."; + } + + // Ensures the given message only contains relative paths... + $message = \str_replace(\getcwd().\DIRECTORY_SEPARATOR, '', $message); $severity = ($e instanceof \ErrorException) ? $this->getSeverity($e) : 'error'; - return \sprintf('<%s>%s', $severity, OutputFormatter::escape($message), $severity); + return \sprintf('%s<%s> %s %s', $indent, $severity, $messageLabel, $severity, OutputFormatter::escape($message)); } /** * Helper for getting an output style for the given ErrorException's level. * * @param \ErrorException $e - * - * @return string */ protected function getSeverity(\ErrorException $e): string { @@ -1226,6 +1259,8 @@ class Shell extends Application case \E_COMPILE_WARNING: case \E_USER_WARNING: case \E_USER_NOTICE: + case \E_USER_DEPRECATED: + case \E_DEPRECATED: case \E_STRICT: return 'warning'; @@ -1238,6 +1273,62 @@ class Shell extends Application } } + /** + * Helper for getting an output style for the given ErrorException's level. + * + * @param \Throwable $e + */ + protected function getMessageLabel(\Throwable $e): string + { + if ($e instanceof \ErrorException) { + $severity = $e->getSeverity(); + + if ($severity & \error_reporting()) { + switch ($severity) { + case \E_WARNING: + return 'Warning'; + case \E_NOTICE: + return 'Notice'; + case \E_CORE_WARNING: + return 'Core Warning'; + case \E_COMPILE_WARNING: + return 'Compile Warning'; + case \E_USER_WARNING: + return 'User Warning'; + case \E_USER_NOTICE: + return 'User Notice'; + case \E_USER_DEPRECATED: + return 'User Deprecated'; + case \E_DEPRECATED: + return 'Deprecated'; + case \E_STRICT: + return 'Strict'; + } + } + } + + if ($e instanceof PsyException || $e instanceof SymfonyConsoleException) { + $exceptionShortName = (new \ReflectionClass($e))->getShortName(); + $typeParts = \preg_split('/(?=[A-Z])/', $exceptionShortName); + + switch ($exceptionShortName) { + case 'RuntimeException': + case 'LogicException': + // These ones look weird without 'Exception' + break; + default: + if (\end($typeParts) === 'Exception') { + \array_pop($typeParts); + } + break; + } + + return \trim(\strtoupper(\implode(' ', $typeParts))); + } + + return \get_class($e); + } + /** * Execute code in the shell execution context. * @@ -1257,11 +1348,7 @@ class Shell extends Application try { return $closure->execute(); - } catch (\TypeError $_e) { - $this->writeException(TypeErrorException::fromTypeError($_e)); - } catch (\Error $_e) { - $this->writeException(ErrorException::fromError($_e)); - } catch (\Exception $_e) { + } catch (\Throwable $_e) { $this->writeException($_e); } } @@ -1367,11 +1454,13 @@ class Shell extends Application return null; } + $theme = $this->config->theme(); + if ($this->hasCode()) { - return static::BUFF_PROMPT; + return $theme->bufferPrompt(); } - return $this->config->getPrompt() ?: static::PROMPT; + return $theme->prompt(); } /** @@ -1389,10 +1478,12 @@ class Shell extends Application */ protected function readline(bool $interactive = true) { + $prompt = $this->config->theme()->replayPrompt(); + if (!empty($this->inputBuffer)) { $line = \array_shift($this->inputBuffer); if (!$line instanceof SilentInput) { - $this->output->writeln(\sprintf('', static::REPLAY, OutputFormatter::escape($line))); + $this->output->writeln(\sprintf('%s', $prompt, OutputFormatter::escape($line))); } return $line; @@ -1415,23 +1506,21 @@ class Shell extends Application /** * Get the shell output header. - * - * @return string */ protected function getHeader(): string { - return \sprintf('', $this->getVersion()); + return \sprintf('%s by Justin Hileman', self::getVersionHeader($this->config->useUnicode())); } /** * Get the current version of Psy Shell. * * @deprecated call self::getVersionHeader instead - * - * @return string */ public function getVersion(): string { + @\trigger_error('`getVersion` is deprecated; call `self::getVersionHeader` instead.', \E_USER_DEPRECATED); + return self::getVersionHeader($this->config->useUnicode()); } @@ -1439,8 +1528,6 @@ class Shell extends Application * Get a pretty header including the current version of Psy Shell. * * @param bool $useUnicode - * - * @return string */ public static function getVersionHeader(bool $useUnicode = false): string { @@ -1459,14 +1546,6 @@ class Shell extends Application return $this->config->getManualDb(); } - /** - * @deprecated Tab completion is provided by the AutoCompleter service - */ - protected function autocomplete($text) - { - @\trigger_error('Tab completion is provided by the AutoCompleter service', \E_USER_DEPRECATED); - } - /** * Initialize tab completion matchers. * @@ -1505,7 +1584,6 @@ class Shell extends Application } /** - * @todo Implement self-update * @todo Implement prompt to start update * * @return void|string @@ -1519,7 +1597,7 @@ class Shell extends Application try { $client = $this->config->getChecker(); if (!$client->isLatest()) { - $this->output->writeln(\sprintf('New version is available (current: %s, latest: %s)', self::VERSION, $client->getLatest())); + $this->output->writeln(\sprintf('New version is available at psysh.org/psysh (current: %s, latest: %s)', self::VERSION, $client->getLatest())); } } catch (\InvalidArgumentException $e) { $this->output->writeln($e->getMessage()); diff --git a/vendor/psy/psysh/src/Sudo.php b/vendor/psy/psysh/src/Sudo.php index a2516789..54016f93 100644 --- a/vendor/psy/psysh/src/Sudo.php +++ b/vendor/psy/psysh/src/Sudo.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -27,7 +27,7 @@ class Sudo */ public static function fetchProperty($object, string $property) { - $prop = static::getProperty(new \ReflectionObject($object), $property); + $prop = self::getProperty(new \ReflectionObject($object), $property); return $prop->getValue($object); } @@ -43,7 +43,7 @@ class Sudo */ public static function assignProperty($object, string $property, $value) { - $prop = static::getProperty(new \ReflectionObject($object), $property); + $prop = self::getProperty(new \ReflectionObject($object), $property); $prop->setValue($object, $value); return $value; @@ -58,12 +58,8 @@ class Sudo * * @return mixed */ - public static function callMethod($object, string $method, $args = null) + public static function callMethod($object, string $method, ...$args) { - $args = \func_get_args(); - $object = \array_shift($args); - $method = \array_shift($args); - $refl = new \ReflectionObject($object); $reflMethod = $refl->getMethod($method); $reflMethod->setAccessible(true); @@ -81,7 +77,7 @@ class Sudo */ public static function fetchStaticProperty($class, string $property) { - $prop = static::getProperty(new \ReflectionClass($class), $property); + $prop = self::getProperty(new \ReflectionClass($class), $property); $prop->setAccessible(true); return $prop->getValue(); @@ -98,8 +94,14 @@ class Sudo */ public static function assignStaticProperty($class, string $property, $value) { - $prop = static::getProperty(new \ReflectionClass($class), $property); - $prop->setValue($value); + $prop = self::getProperty(new \ReflectionClass($class), $property); + $refl = $prop->getDeclaringClass(); + + if (\method_exists($refl, 'setStaticPropertyValue')) { + $refl->setStaticPropertyValue($property, $value); + } else { + $prop->setValue($value); + } return $value; } @@ -113,12 +115,8 @@ class Sudo * * @return mixed */ - public static function callStatic($class, string $method, $args = null) + public static function callStatic($class, string $method, ...$args) { - $args = \func_get_args(); - $class = \array_shift($args); - $method = \array_shift($args); - $refl = new \ReflectionClass($class); $reflMethod = $refl->getMethod($method); $reflMethod->setAccessible(true); @@ -138,6 +136,11 @@ class Sudo { $refl = new \ReflectionClass($class); + // Special case the ::class magic constant, because `getConstant` does the wrong thing here. + if ($const === 'class') { + return $refl->getName(); + } + do { if ($refl->hasConstant($const)) { return $refl->getConstant($const); @@ -149,6 +152,24 @@ class Sudo return false; } + /** + * Construct an instance of a class, bypassing private constructors. + * + * @param string $class class name + * @param mixed $args... + */ + public static function newInstance(string $class, ...$args) + { + $refl = new \ReflectionClass($class); + $instance = $refl->newInstanceWithoutConstructor(); + + $constructor = $refl->getConstructor(); + $constructor->setAccessible(true); + $constructor->invokeArgs($instance, $args); + + return $instance; + } + /** * Get a ReflectionProperty from an object (or its parent classes). * diff --git a/vendor/psy/psysh/src/Sudo/SudoVisitor.php b/vendor/psy/psysh/src/Sudo/SudoVisitor.php index 28f5d922..151dc527 100644 --- a/vendor/psy/psysh/src/Sudo/SudoVisitor.php +++ b/vendor/psy/psysh/src/Sudo/SudoVisitor.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,6 +16,7 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Expr\MethodCall; +use PhpParser\Node\Expr\New_; use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\StaticPropertyFetch; @@ -41,9 +42,12 @@ class SudoVisitor extends NodeVisitorAbstract const STATIC_PROPERTY_ASSIGN = 'assignStaticProperty'; const STATIC_CALL = 'callStatic'; const CLASS_CONST_FETCH = 'fetchClassConst'; + const NEW_INSTANCE = 'newInstance'; /** * {@inheritdoc} + * + * @return int|Node|null Replacement node (or special return value) */ public function enterNode(Node $node) { @@ -111,6 +115,13 @@ class SudoVisitor extends NodeVisitorAbstract ]; return $this->prepareCall(self::CLASS_CONST_FETCH, $args); + } elseif ($node instanceof New_) { + $args = $node->args; + $class = $node->class instanceof Name ? $node->class->toString() : $node->class; + \array_unshift($args, new Arg(\is_string($class) ? new String_($class) : $class)); + + // not using prepareCall because the $node->args we started with are already Arg instances + return new StaticCall(new FullyQualifiedName(Sudo::class), self::NEW_INSTANCE, $args); } } diff --git a/vendor/psy/psysh/src/SuperglobalsEnv.php b/vendor/psy/psysh/src/SuperglobalsEnv.php index 0d0b0025..d3369c6a 100644 --- a/vendor/psy/psysh/src/SuperglobalsEnv.php +++ b/vendor/psy/psysh/src/SuperglobalsEnv.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php index 17d0ec56..400b797a 100644 --- a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php +++ b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php index ac0a5250..bc39e604 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractContextAwareMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php index 46d261e8..0887333a 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,7 +29,7 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc $defaultValue = $this->valueToShortString($parameter->getDefaultValue()); - $parametersProcessed[] = "\${$parameter->getName()} = $defaultValue"; + $parametersProcessed[] = \sprintf('$%s = %s', $parameter->getName(), $defaultValue); } if (empty($parametersProcessed)) { @@ -45,8 +45,6 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc * This is not 100% true to the original (newlines are inlined, for example). * * @param mixed $value - * - * @return string */ private function valueToShortString($value): string { diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php index 64726e84..209cae2f 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -48,7 +48,7 @@ abstract class AbstractMatcher * * @param array $tokens Tokenized readline input * - * @return bool + * @return false */ public function hasMatched(array $tokens): bool { @@ -59,8 +59,6 @@ abstract class AbstractMatcher * Get current readline input word. * * @param array $tokens Tokenized readline input (see token_get_all) - * - * @return string */ protected function getInput(array $tokens): string { @@ -77,8 +75,6 @@ abstract class AbstractMatcher * Get current namespace and class (if any) from readline input. * * @param array $tokens Tokenized readline input (see token_get_all) - * - * @return string */ protected function getNamespaceAndClass(array $tokens): string { @@ -112,8 +108,6 @@ abstract class AbstractMatcher * * @param string $prefix * @param string $word - * - * @return bool */ public static function startsWith(string $prefix, string $word): bool { @@ -125,8 +119,6 @@ abstract class AbstractMatcher * * @param mixed $token A PHP token (see token_get_all) * @param string $syntax A syntax pattern (default: variable pattern) - * - * @return bool */ public static function hasSyntax($token, string $syntax = self::VAR_SYNTAX): bool { @@ -144,8 +136,6 @@ abstract class AbstractMatcher * * @param mixed $token A PHP token (see token_get_all) * @param string $which A PHP token type - * - * @return bool */ public static function tokenIs($token, string $which): bool { @@ -160,8 +150,6 @@ abstract class AbstractMatcher * Check whether $token is an operator. * * @param mixed $token A PHP token (see token_get_all) - * - * @return bool */ public static function isOperator($token): bool { @@ -182,8 +170,6 @@ abstract class AbstractMatcher * * @param array $coll A list of token types * @param mixed $token A PHP token (see token_get_all) - * - * @return bool */ public static function hasToken(array $coll, $token): bool { diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php index 8d17b4a8..0503d71d 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php index a15f8868..118740ef 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php index 671d050d..a526e1ec 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php index 1b9835a1..32a34640 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -36,6 +36,7 @@ class ClassNamesMatcher extends AbstractMatcher // get the number of namespace separators $nsPos = \substr_count($class, '\\'); $pieces = \explode('\\', $className); + // $methods = Mirror::get($class); return \implode('\\', \array_slice($pieces, $nsPos, \count($pieces))); }, diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php index 8f7f3f61..952329a5 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -55,8 +55,6 @@ class CommandsMatcher extends AbstractMatcher * Check whether a command $name is defined. * * @param string $name - * - * @return bool */ protected function isCommand(string $name): bool { @@ -67,8 +65,6 @@ class CommandsMatcher extends AbstractMatcher * Check whether input matches a defined command. * * @param string $name - * - * @return bool */ protected function matchCommand(string $name): bool { @@ -103,9 +99,9 @@ class CommandsMatcher extends AbstractMatcher switch (true) { case self::tokenIs($command, self::T_STRING) && - !$this->isCommand($command[1]) && - $this->matchCommand($command[1]) && - empty($tokens): + !$this->isCommand($command[1]) && + $this->matchCommand($command[1]) && + empty($tokens): return true; } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php index 58634352..cad81a53 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php index 3d683bd8..2bbf1262 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php index e31f14d8..96456599 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php index cc4c643d..9f2bdef7 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -32,7 +32,7 @@ class KeywordsMatcher extends AbstractMatcher /** * Get all (completable) PHP keywords. * - * @return array + * @return string[] */ public function getKeywords(): array { @@ -43,8 +43,6 @@ class KeywordsMatcher extends AbstractMatcher * Check whether $keyword is a (completable) PHP keyword. * * @param string $keyword - * - * @return bool */ public function isKeyword(string $keyword): bool { @@ -75,7 +73,7 @@ class KeywordsMatcher extends AbstractMatcher case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token): // case is_string($token) && $token === '$': case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $prevToken) && - self::tokenIs($token, self::T_STRING): + self::tokenIs($token, self::T_STRING): case self::isOperator($token): return true; } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php index 2f3e1633..3c70ee09 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php index c1edbc93..7cea95f4 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php index 29281f6e..e0e96679 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php index fbf111e8..73221fd3 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php index 918f1688..4f10b079 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php index 0c401068..6a5167f7 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/Util/Docblock.php b/vendor/psy/psysh/src/Util/Docblock.php index 1d06ba6f..1b98f279 100644 --- a/vendor/psy/psysh/src/Util/Docblock.php +++ b/vendor/psy/psysh/src/Util/Docblock.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -74,7 +74,10 @@ class Docblock public function __construct(\Reflector $reflector) { $this->reflector = $reflector; - $this->setComment($reflector->getDocComment()); + + if ($reflector instanceof \ReflectionClass || $reflector instanceof \ReflectionClassConstant || $reflector instanceof \ReflectionFunctionAbstract || $reflector instanceof \ReflectionProperty) { + $this->setComment($reflector->getDocComment()); + } } /** @@ -198,8 +201,6 @@ class Docblock * Whether or not a docblock contains a given @tag. * * @param string $tag The name of the @tag to check for - * - * @return bool */ public function hasTag(string $tag): bool { @@ -211,9 +212,9 @@ class Docblock * * @param string $tag * - * @return array + * @return array|null */ - public function tag(string $tag): array + public function tag(string $tag): ?array { return $this->hasTag($tag) ? $this->tags[$tag] : null; } @@ -222,8 +223,6 @@ class Docblock * Whether or not a string begins with a @tag. * * @param string $str - * - * @return bool */ public static function isTagged(string $str): bool { diff --git a/vendor/psy/psysh/src/Util/Json.php b/vendor/psy/psysh/src/Util/Json.php index 71e6336f..a7eebca9 100644 --- a/vendor/psy/psysh/src/Util/Json.php +++ b/vendor/psy/psysh/src/Util/Json.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,8 +21,6 @@ class Json * * @param mixed $val * @param int $opt - * - * @return string */ public static function encode($val, int $opt = 0): string { diff --git a/vendor/psy/psysh/src/Util/Mirror.php b/vendor/psy/psysh/src/Util/Mirror.php index d13d8d75..9dd0c1b0 100644 --- a/vendor/psy/psysh/src/Util/Mirror.php +++ b/vendor/psy/psysh/src/Util/Mirror.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,8 +12,7 @@ namespace Psy\Util; use Psy\Exception\RuntimeException; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; use Psy\Reflection\ReflectionNamespace; /** @@ -43,13 +42,13 @@ class Mirror * * @return \Reflector */ - public static function get($value, string $member = null, int $filter = 15): \Reflector + public static function get($value, ?string $member = null, int $filter = 15): \Reflector { if ($member === null && \is_string($value)) { if (\function_exists($value)) { return new \ReflectionFunction($value); - } elseif (\defined($value) || ReflectionConstant_::isMagicConstant($value)) { - return new ReflectionConstant_($value); + } elseif (\defined($value) || ReflectionConstant::isMagicConstant($value)) { + return new ReflectionConstant($value); } } @@ -58,7 +57,7 @@ class Mirror if ($member === null) { return $class; } elseif ($filter & self::CONSTANT && $class->hasConstant($member)) { - return ReflectionClassConstant::create($value, $member); + return new \ReflectionClassConstant($value, $member); } elseif ($filter & self::METHOD && $class->hasMethod($member)) { return $class->getMethod($member); } elseif ($filter & self::PROPERTY && $class->hasProperty($member)) { diff --git a/vendor/psy/psysh/src/Util/Str.php b/vendor/psy/psysh/src/Util/Str.php index f6d93e1f..dd126d1b 100644 --- a/vendor/psy/psysh/src/Util/Str.php +++ b/vendor/psy/psysh/src/Util/Str.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -56,12 +56,11 @@ EOS; * except for the \s sequence (ASCII space). * * @param string $input The string to decode - * - * @return string */ public static function unvis(string $input): string { - $output = \preg_replace_callback(self::UNVIS_RX, 'self::unvisReplace', $input); + $output = \preg_replace_callback(self::UNVIS_RX, [self::class, 'unvisReplace'], $input); + // other escapes & octal are handled by stripcslashes return \stripcslashes($output); } @@ -70,8 +69,6 @@ EOS; * Callback for Str::unvis. * * @param array $match The matches passed by preg_replace_callback - * - * @return string */ protected static function unvisReplace(array $match): string { diff --git a/vendor/psy/psysh/src/VarDumper/Cloner.php b/vendor/psy/psysh/src/VarDumper/Cloner.php index 2b58594a..e0aaab97 100644 --- a/vendor/psy/psysh/src/VarDumper/Cloner.php +++ b/vendor/psy/psysh/src/VarDumper/Cloner.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/VarDumper/Dumper.php b/vendor/psy/psysh/src/VarDumper/Dumper.php index 230880e2..def61d4a 100644 --- a/vendor/psy/psysh/src/VarDumper/Dumper.php +++ b/vendor/psy/psysh/src/VarDumper/Dumper.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,9 +23,9 @@ class Dumper extends CliDumper private $formatter; private $forceArrayIndexes; - protected static $onlyControlCharsRx = '/^[\x00-\x1F\x7F]+$/'; - protected static $controlCharsRx = '/([\x00-\x1F\x7F]+)/'; - protected static $controlCharsMap = [ + private const ONLY_CONTROL_CHARS = '/^[\x00-\x1F\x7F]+$/'; + private const CONTROL_CHARS = '/([\x00-\x1F\x7F]+)/'; + private const CONTROL_CHARS_MAP = [ "\0" => '\0', "\t" => '\t', "\n" => '\n', @@ -46,7 +46,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) + public function enterHash(Cursor $cursor, $type, $class, $hasChild): void { if (Cursor::HASH_INDEXED === $type || Cursor::HASH_ASSOC === $type) { $class = 0; @@ -57,7 +57,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - protected function dumpKey(Cursor $cursor) + protected function dumpKey(Cursor $cursor): void { if ($this->forceArrayIndexes || Cursor::HASH_INDEXED !== $cursor->hashType) { parent::dumpKey($cursor); @@ -71,16 +71,15 @@ class Dumper extends CliDumper } $styled = ''; - $map = self::$controlCharsMap; $cchr = $this->styles['cchr']; - $chunks = \preg_split(self::$controlCharsRx, $value, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); + $chunks = \preg_split(self::CONTROL_CHARS, $value, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); foreach ($chunks as $chunk) { - if (\preg_match(self::$onlyControlCharsRx, $chunk)) { + if (\preg_match(self::ONLY_CONTROL_CHARS, $chunk)) { $chars = ''; $i = 0; do { - $chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i])); + $chars .= isset(self::CONTROL_CHARS_MAP[$chunk[$i]]) ? self::CONTROL_CHARS_MAP[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i])); } while (isset($chunk[++$i])); $chars = $this->formatter->escape($chars); @@ -98,7 +97,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - protected function dumpLine($depth, $endOfValue = false) + protected function dumpLine($depth, $endOfValue = false): void { if ($endOfValue && 0 < $depth) { $this->line .= ','; diff --git a/vendor/psy/psysh/src/VarDumper/Presenter.php b/vendor/psy/psysh/src/VarDumper/Presenter.php index 7319534f..b63ca8d0 100644 --- a/vendor/psy/psysh/src/VarDumper/Presenter.php +++ b/vendor/psy/psysh/src/VarDumper/Presenter.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -63,7 +63,7 @@ class Presenter $this->cloner = new Cloner(); $this->cloner->addCasters(['*' => function ($obj, array $a, Stub $stub, $isNested, $filter = 0) { if ($filter || $isNested) { - if ($obj instanceof \Exception) { + if ($obj instanceof \Throwable) { $a = Caster::filter($a, Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, $this->exceptionsImportants); } else { $a = Caster::filter($a, Caster::EXCLUDE_PROTECTED | Caster::EXCLUDE_PRIVATE); @@ -90,8 +90,6 @@ class Presenter * Present a reference to the value. * * @param mixed $value - * - * @return string */ public function presentRef($value): string { @@ -106,10 +104,8 @@ class Presenter * @param mixed $value * @param int $depth (default: null) * @param int $options One of Presenter constants - * - * @return string */ - public function present($value, int $depth = null, int $options = 0): string + public function present($value, ?int $depth = null, int $options = 0): string { $data = $this->cloner->cloneVar($value, !($options & self::VERBOSE) ? Caster::EXCLUDE_VERBOSE : 0); diff --git a/vendor/psy/psysh/src/VarDumper/PresenterAware.php b/vendor/psy/psysh/src/VarDumper/PresenterAware.php index 9375d67d..47590fb3 100644 --- a/vendor/psy/psysh/src/VarDumper/PresenterAware.php +++ b/vendor/psy/psysh/src/VarDumper/PresenterAware.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/psy/psysh/src/VersionUpdater/Checker.php b/vendor/psy/psysh/src/VersionUpdater/Checker.php index 8e6f845e..4de48013 100644 --- a/vendor/psy/psysh/src/VersionUpdater/Checker.php +++ b/vendor/psy/psysh/src/VersionUpdater/Checker.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,13 +19,7 @@ interface Checker const MONTHLY = 'monthly'; const NEVER = 'never'; - /** - * @return bool - */ public function isLatest(): bool; - /** - * @return string - */ public function getLatest(): string; } diff --git a/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php b/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php index 4093b6f8..e1fc7cea 100644 --- a/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php +++ b/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,9 +19,6 @@ class GitHubChecker implements Checker private $latest; - /** - * @return bool - */ public function isLatest(): bool { // version_compare doesn't handle semver completely; @@ -31,9 +28,6 @@ class GitHubChecker implements Checker return \version_compare($version, $this->getLatest(), '>='); } - /** - * @return string - */ public function getLatest(): string { if (!isset($this->latest)) { @@ -75,7 +69,7 @@ class GitHubChecker implements Checker $context = \stream_context_create([ 'http' => [ 'user_agent' => 'PsySH/'.Shell::VERSION, - 'timeout' => 3, + 'timeout' => 1.0, ], ]); diff --git a/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php b/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php index 0e40b74b..06a67775 100644 --- a/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php +++ b/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -43,6 +43,9 @@ class IntervalChecker extends GitHubChecker return $release; } + /** + * @throws \RuntimeException if interval passed to constructor is not supported + */ private function getDateInterval(): \DateInterval { switch ($this->interval) { @@ -53,6 +56,8 @@ class IntervalChecker extends GitHubChecker case Checker::MONTHLY: return new \DateInterval('P1M'); } + + throw new \RuntimeException('Invalid interval configured'); } private function updateCache($release) diff --git a/vendor/psy/psysh/src/VersionUpdater/NoopChecker.php b/vendor/psy/psysh/src/VersionUpdater/NoopChecker.php index 40d0fb22..2c8240e6 100644 --- a/vendor/psy/psysh/src/VersionUpdater/NoopChecker.php +++ b/vendor/psy/psysh/src/VersionUpdater/NoopChecker.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,21 +14,15 @@ namespace Psy\VersionUpdater; use Psy\Shell; /** - * A version checker stub which always thinks the current verion is up to date. + * A version checker stub which always thinks the current version is up to date. */ class NoopChecker implements Checker { - /** - * @return bool - */ public function isLatest(): bool { return true; } - /** - * @return string - */ public function getLatest(): string { return Shell::VERSION; diff --git a/vendor/psy/psysh/src/functions.php b/vendor/psy/psysh/src/functions.php index 2ca1ec5d..7b58344e 100644 --- a/vendor/psy/psysh/src/functions.php +++ b/vendor/psy/psysh/src/functions.php @@ -3,7 +3,7 @@ /* * This file is part of Psy Shell. * - * (c) 2012-2022 Justin Hileman + * (c) 2012-2023 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,6 +13,8 @@ namespace Psy; use Psy\ExecutionLoop\ProcessForker; use Psy\VersionUpdater\GitHubChecker; +use Psy\VersionUpdater\Installer; +use Psy\VersionUpdater\SelfUpdate; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; @@ -23,8 +25,6 @@ if (!\function_exists('Psy\\sh')) { * Command to return the eval-able code to startup PsySH. * * eval(\Psy\sh()); - * - * @return string */ function sh(): string { @@ -128,7 +128,7 @@ if (!\function_exists('Psy\\info')) { * * @return array|null */ - function info(Configuration $config = null) + function info(?Configuration $config = null) { static $lastConfig; if ($config !== null) { @@ -155,6 +155,9 @@ if (!\function_exists('Psy\\info')) { $config = $lastConfig ?: new Configuration(); $configEnv = (isset($_SERVER['PSYSH_CONFIG']) && $_SERVER['PSYSH_CONFIG']) ? $_SERVER['PSYSH_CONFIG'] : false; + if ($configEnv === false && \PHP_SAPI === 'cli-server') { + $configEnv = \getenv('PSYSH_CONFIG'); + } $shellInfo = [ 'PsySH version' => Shell::VERSION, @@ -165,6 +168,7 @@ if (!\function_exists('Psy\\info')) { 'OS' => \PHP_OS, 'default includes' => $config->getDefaultIncludes(), 'require semicolons' => $config->requireSemicolons(), + 'strict types' => $config->strictTypes(), 'error logging level' => $config->errorLoggingLevel(), 'config file' => [ 'default config file' => $prettyPath($config->getConfigFile()), @@ -225,6 +229,17 @@ if (!\function_exists('Psy\\info')) { 'color mode' => $config->colorMode(), 'output decorated' => $config->getOutputDecorated(), 'output verbosity' => $config->verbosity(), + 'output pager' => $config->getPager(), + ]; + + $theme = $config->theme(); + // @todo show styles (but only if they're different than default?) + $output['theme'] = [ + 'compact' => $theme->compact(), + 'prompt' => $theme->prompt(), + 'bufferPrompt' => $theme->bufferPrompt(), + 'replayPrompt' => $theme->replayPrompt(), + 'returnValue' => $theme->returnValue(), ]; $pcntl = [ @@ -336,8 +351,8 @@ if (!\function_exists('Psy\\bin')) { exit(1); } - if (\PHP_VERSION_ID < 70000) { - \fwrite(\STDERR, 'PHP 7.0.0 or higher is required. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); + if (\PHP_VERSION_ID < 70400) { + \fwrite(\STDERR, 'PHP 7.4.0 or higher is required. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } @@ -358,12 +373,14 @@ if (!\function_exists('Psy\\bin')) { } $usageException = null; + $shellIsPhar = Shell::isPhar(); $input = new ArgvInput(); try { $input->bind(new InputDefinition(\array_merge(Configuration::getInputOptions(), [ new InputOption('help', 'h', InputOption::VALUE_NONE), new InputOption('version', 'V', InputOption::VALUE_NONE), + new InputOption('self-update', 'u', InputOption::VALUE_NONE), new InputArgument('include', InputArgument::IS_ARRAY), ]))); @@ -378,7 +395,7 @@ if (!\function_exists('Psy\\bin')) { } // Handle --help - if ($usageException !== null || $input->getOption('help')) { + if (!isset($config) || $usageException !== null || $input->getOption('help')) { if ($usageException !== null) { echo $usageException->getMessage().\PHP_EOL.\PHP_EOL; } @@ -398,16 +415,27 @@ Options: -c, --config FILE Use an alternate PsySH config file location. --cwd PATH Use an alternate working directory. -V, --version Display the PsySH version. + +EOL; + if ($shellIsPhar) { + echo <<getOption('self-update')) { + if (!$shellIsPhar) { + \fwrite(\STDERR, 'The --self-update option can only be used with with a phar based install.'.\PHP_EOL); + exit(1); + } + $selfUpdate = new SelfUpdate(new GitHubChecker(), new Installer()); + $result = $selfUpdate->run($input, $config->getOutput()); + exit($result); + } + $shell = new Shell($config); // Pass additional arguments to Shell as 'includes' diff --git a/vendor/ramsey/collection/LICENSE b/vendor/ramsey/collection/LICENSE index ae15f590..a7fcf120 100644 --- a/vendor/ramsey/collection/LICENSE +++ b/vendor/ramsey/collection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2021 Ben Ramsey +Copyright (c) 2015-2022 Ben Ramsey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/ramsey/collection/README.md b/vendor/ramsey/collection/README.md index 9124dd77..c77ffcb1 100644 --- a/vendor/ramsey/collection/README.md +++ b/vendor/ramsey/collection/README.md @@ -9,7 +9,7 @@ Download Package PHP Programming Language Read License - Build Status + Build Status Codecov Code Coverage Psalm Type Coverage

    @@ -34,25 +34,13 @@ composer require ramsey/collection ## Usage -Examples of how to use this framework can be found in the +Examples of how to use this library may be found in the [Wiki pages](https://github.com/ramsey/collection/wiki/Examples). ## Contributing -Contributions are welcome! Before contributing to this project, familiarize -yourself with [CONTRIBUTING.md](CONTRIBUTING.md). - -To develop this project, you will need [PHP](https://www.php.net) 7.3 or greater -and [Composer](https://getcomposer.org). - -After cloning this repository locally, execute the following commands: - -``` bash -cd /path/to/repository -composer install -``` - -Now, you are ready to develop! +Contributions are welcome! To contribute, please familiarize yourself with +[CONTRIBUTING.md](CONTRIBUTING.md). ## Coordinated Disclosure @@ -79,4 +67,4 @@ MIT License (MIT). Please see [LICENSE](LICENSE) for more information. [java]: http://docs.oracle.com/javase/8/docs/technotes/guides/collections/index.html -[security.md]: https://github.com/ramsey/collection/blob/master/SECURITY.md +[security.md]: https://github.com/ramsey/collection/blob/main/SECURITY.md diff --git a/vendor/ramsey/collection/SECURITY.md b/vendor/ramsey/collection/SECURITY.md index b052f3b6..3de4c0cb 100644 --- a/vendor/ramsey/collection/SECURITY.md +++ b/vendor/ramsey/collection/SECURITY.md @@ -1,29 +1,59 @@ -# Vulnerability Disclosure Policy +# Vulnerability Disclosure Policy (VDP) + +## Brand Promise + + Keeping user information safe and secure is a top priority, and we welcome the contribution of external security researchers. ## Scope + + If you believe you've found a security issue in software that is maintained in this repository, we encourage you to notify us. | Version | In scope | Source code | -| :-----: | :------: | :---------- | +| ------- | :------: | ----------- | | latest | ✅ | https://github.com/ramsey/collection | ## How to Submit a Report -To submit a vulnerability report, please contact us at . + + +To submit a vulnerability report, please contact us at security@ramsey.dev. Your submission will be reviewed and validated by a member of our team. ## Safe Harbor + + We support safe harbor for security researchers who: * Make a good faith effort to avoid privacy violations, destruction of data, and @@ -33,7 +63,7 @@ We support safe harbor for security researchers who: us immediately, do not proceed with access, and immediately purge any local information. * Provide us with a reasonable amount of time to resolve vulnerabilities prior - to any disclosure to the public or a third-party. + to any disclosure to the public or a third party. We will consider activities conducted consistent with this policy to constitute "authorized" conduct and will not pursue civil action or initiate a complaint to @@ -45,15 +75,41 @@ with or unaddressed by this policy. ## Preferences + + * Please provide detailed reports with reproducible steps and a clearly defined impact. * Include the version number of the vulnerable package in your report * Social engineering (e.g. phishing, vishing, smishing) is prohibited. + + ## Encryption Key for security@ramsey.dev For increased privacy when reporting sensitive issues, you may encrypt your -messages using the following key: +message using the following public key: ``` -----BEGIN PGP PUBLIC KEY BLOCK----- diff --git a/vendor/ramsey/collection/composer.json b/vendor/ramsey/collection/composer.json index 98862ee4..f09106a1 100644 --- a/vendor/ramsey/collection/composer.json +++ b/vendor/ramsey/collection/composer.json @@ -1,7 +1,8 @@ { "name": "ramsey/collection", - "type": "library", "description": "A PHP library for representing and manipulating collections.", + "license": "MIT", + "type": "library", "keywords": [ "array", "collection", @@ -10,7 +11,6 @@ "queue", "set" ], - "license": "MIT", "authors": [ { "name": "Ben Ramsey", @@ -19,31 +19,33 @@ } ], "require": { - "php": "^7.3 || ^8", + "php": "^7.4 || ^8.0", "symfony/polyfill-php81": "^1.23" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" - }, - "config": { - "sort-packages": true + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, + "minimum-stability": "RC", + "prefer-stable": true, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -51,7 +53,6 @@ }, "autoload-dev": { "psr-4": { - "Ramsey\\Console\\": "resources/console/", "Ramsey\\Collection\\Test\\": "tests/", "Ramsey\\Test\\Generics\\": "tests/generics/" }, @@ -59,44 +60,61 @@ "vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php" ] }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, + "phpstan/extension-installer": true, + "captainhook/plugin-composer": true + }, + "sort-packages": true + }, + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "scripts": { - "post-autoload-dump": "captainhook install --ansi -f -s", "dev:analyze": [ "@dev:analyze:phpstan", "@dev:analyze:psalm" ], - "dev:analyze:phpstan": "phpstan --memory-limit=1G analyse", - "dev:analyze:psalm": "psalm --diff --config=psalm.xml", - "dev:build:clean": "git clean -fX build/.", - "dev:build:clear-cache": "git clean -fX build/cache/.", - "dev:lint": "phpcs --cache=build/cache/phpcs.cache", - "dev:lint:fix": "./bin/lint-fix.sh", - "dev:repl": [ - "echo ; echo 'Type ./bin/repl to start the REPL.'" + "dev:analyze:phpstan": "phpstan analyse --ansi --memory-limit=1G", + "dev:analyze:psalm": "psalm", + "dev:build:clean": "git clean -fX build/", + "dev:lint": [ + "@dev:lint:syntax", + "@dev:lint:style" ], - "dev:test": "phpunit", - "dev:test:all": [ + "dev:lint:fix": "phpcbf", + "dev:lint:style": "phpcs --colors", + "dev:lint:syntax": "parallel-lint --colors src/ tests/", + "dev:test": [ "@dev:lint", "@dev:analyze", - "@dev:test" + "@dev:test:unit" ], - "dev:test:coverage:ci": "phpunit --coverage-clover build/logs/clover.xml", - "dev:test:coverage:html": "phpunit --coverage-html build/coverage", - "test": "@dev:test:all" + "dev:test:coverage:ci": "phpunit --colors=always --coverage-text --coverage-clover build/coverage/clover.xml --coverage-cobertura build/coverage/cobertura.xml --coverage-crap4j build/coverage/crap4j.xml --coverage-xml build/coverage/coverage-xml --log-junit build/junit.xml", + "dev:test:coverage:html": "phpunit --colors=always --coverage-html build/coverage/coverage-html/", + "dev:test:unit": "phpunit --colors=always", + "test": "@dev:test" }, "scripts-descriptions": { - "dev:analyze": "Performs static analysis on the code base.", + "dev:analyze": "Runs all static analysis checks.", "dev:analyze:phpstan": "Runs the PHPStan static analyzer.", "dev:analyze:psalm": "Runs the Psalm static analyzer.", - "dev:build:clean": "Removes everything not under version control from the build directory.", - "dev:build:clear-cache": "Removes everything not under version control from build/cache/.", - "dev:lint": "Checks all source code for coding standards issues.", - "dev:lint:fix": "Checks source code for coding standards issues and fixes them, if possible.", - "dev:repl": "Note: Use ./bin/repl to run the REPL.", - "dev:test": "Runs the full unit test suite.", - "dev:test:all": "Runs linting, static analysis, and unit tests.", - "dev:test:coverage:ci": "Runs the unit test suite and generates a Clover coverage report.", - "dev:test:coverage:html": "Runs the unit tests suite and generates an HTML coverage report.", - "test": "Shortcut to run the full test suite." + "dev:build:clean": "Cleans the build/ directory.", + "dev:lint": "Runs all linting checks.", + "dev:lint:fix": "Auto-fixes coding standards issues, if possible.", + "dev:lint:style": "Checks for coding standards issues.", + "dev:lint:syntax": "Checks for syntax errors.", + "dev:test": "Runs linting, static analysis, and unit tests.", + "dev:test:coverage:ci": "Runs unit tests and generates CI coverage reports.", + "dev:test:coverage:html": "Runs unit tests and generates HTML coverage report.", + "dev:test:unit": "Runs unit tests.", + "test": "Runs linting, static analysis, and unit tests." } } diff --git a/vendor/ramsey/collection/src/AbstractArray.php b/vendor/ramsey/collection/src/AbstractArray.php index d72dbe69..9b39dd0c 100644 --- a/vendor/ramsey/collection/src/AbstractArray.php +++ b/vendor/ramsey/collection/src/AbstractArray.php @@ -17,6 +17,7 @@ namespace Ramsey\Collection; use ArrayIterator; use Traversable; +use function count; use function serialize; use function unserialize; @@ -34,7 +35,7 @@ abstract class AbstractArray implements ArrayInterface * * @var array */ - protected $data = []; + protected array $data = []; /** * Constructs a new array object. @@ -83,8 +84,6 @@ abstract class AbstractArray implements ArrayInterface * * @return T|null the value stored at the offset, or null if the offset * does not exist. - * - * @psalm-suppress InvalidAttribute */ #[\ReturnTypeWillChange] // phpcs:ignore public function offsetGet($offset) diff --git a/vendor/ramsey/collection/src/AbstractCollection.php b/vendor/ramsey/collection/src/AbstractCollection.php index d2cd1151..38ef7144 100644 --- a/vendor/ramsey/collection/src/AbstractCollection.php +++ b/vendor/ramsey/collection/src/AbstractCollection.php @@ -33,7 +33,9 @@ use function current; use function end; use function in_array; use function is_int; +use function is_object; use function reset; +use function spl_object_id; use function sprintf; use function unserialize; use function usort; @@ -78,7 +80,7 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt if ($this->checkType($this->getType(), $value) === false) { throw new InvalidArgumentException( 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($value) + . $this->toolValueToString($value), ); } @@ -95,7 +97,7 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt public function remove($element): bool { if (($position = array_search($element, $this->data, true)) !== false) { - unset($this->data[$position]); + unset($this[$position]); return true; } @@ -176,7 +178,7 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt $bValue = $this->extractValue($b, $propertyOrMethod); return ($aValue <=> $bValue) * ($order === self::SORT_DESC ? -1 : 1); - } + }, ); return $collection; @@ -244,15 +246,19 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt foreach ($collections as $index => $collection) { if (!$collection instanceof static) { throw new CollectionMismatchException( - sprintf('Collection with index %d must be of type %s', $index, static::class) + sprintf('Collection with index %d must be of type %s', $index, static::class), ); } // When using generics (Collection.php, Set.php, etc), // we also need to make sure that the internal types match each other - if ($collection->getType() !== $this->getType()) { + if ($this->getUniformType($collection) !== $this->getUniformType($this)) { throw new CollectionMismatchException( - sprintf('Collection items in collection with index %d must be of type %s', $index, $this->getType()) + sprintf( + 'Collection items in collection with index %d must be of type %s', + $index, + $this->getType(), + ), ); } @@ -290,7 +296,7 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt // When using generics (Collection.php, Set.php, etc), // we also need to make sure that the internal types match each other - if ($other->getType() !== $this->getType()) { + if ($this->getUniformType($other) !== $this->getUniformType($this)) { throw new CollectionMismatchException('Collection items must be of type ' . $this->getType()); } } @@ -315,4 +321,21 @@ abstract class AbstractCollection extends AbstractArray implements CollectionInt return $a === $b ? 0 : ($a < $b ? 1 : -1); }; } + + /** + * @param CollectionInterface $collection + */ + private function getUniformType(CollectionInterface $collection): string + { + switch ($collection->getType()) { + case 'integer': + return 'int'; + case 'boolean': + return 'bool'; + case 'double': + return 'float'; + default: + return $collection->getType(); + } + } } diff --git a/vendor/ramsey/collection/src/Collection.php b/vendor/ramsey/collection/src/Collection.php index 1299c12c..532b971b 100644 --- a/vendor/ramsey/collection/src/Collection.php +++ b/vendor/ramsey/collection/src/Collection.php @@ -80,10 +80,8 @@ class Collection extends AbstractCollection * * A collection's type is immutable once it is set. For this reason, this * property is set private. - * - * @var string */ - private $collectionType; + private string $collectionType; /** * Constructs a collection object of the specified type, optionally with the diff --git a/vendor/ramsey/collection/src/CollectionInterface.php b/vendor/ramsey/collection/src/CollectionInterface.php index aa86feb0..9f86a283 100644 --- a/vendor/ramsey/collection/src/CollectionInterface.php +++ b/vendor/ramsey/collection/src/CollectionInterface.php @@ -151,6 +151,7 @@ interface CollectionInterface extends ArrayInterface * * @return CollectionInterface */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint public function where(string $propertyOrMethod, $value): self; /** diff --git a/vendor/ramsey/collection/src/DoubleEndedQueue.php b/vendor/ramsey/collection/src/DoubleEndedQueue.php index c9c59502..4d1f71ea 100644 --- a/vendor/ramsey/collection/src/DoubleEndedQueue.php +++ b/vendor/ramsey/collection/src/DoubleEndedQueue.php @@ -29,10 +29,8 @@ class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface { /** * Index of the last element in the queue. - * - * @var int */ - private $tail = -1; + private int $tail = -1; /** * @inheritDoc @@ -42,7 +40,7 @@ class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface if ($this->checkType($this->getType(), $value) === false) { throw new InvalidArgumentException( 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($value) + . $this->toolValueToString($value), ); } @@ -52,6 +50,8 @@ class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface } /** + * @throws InvalidArgumentException if $element is of the wrong type + * * @inheritDoc */ public function addFirst($element): bool @@ -59,7 +59,7 @@ class DoubleEndedQueue extends Queue implements DoubleEndedQueueInterface if ($this->checkType($this->getType(), $element) === false) { throw new InvalidArgumentException( 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($element) + . $this->toolValueToString($element), ); } diff --git a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php index d7df5346..3fa4ecab 100644 --- a/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php +++ b/vendor/ramsey/collection/src/DoubleEndedQueueInterface.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Ramsey\Collection; use Ramsey\Collection\Exception\NoSuchElementException; +use RuntimeException; /** * A linear collection that supports element insertion and removal at both ends. @@ -175,7 +176,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @return bool `true` if this queue changed as a result of the call. * - * @throws \RuntimeException if a queue refuses to add a particular element + * @throws RuntimeException if a queue refuses to add a particular element * for any reason other than that it already contains the element. * Implementations should use a more-specific exception that extends * `\RuntimeException`. @@ -196,7 +197,7 @@ interface DoubleEndedQueueInterface extends QueueInterface * * @return bool `true` if this queue changed as a result of the call. * - * @throws \RuntimeException if a queue refuses to add a particular element + * @throws RuntimeException if a queue refuses to add a particular element * for any reason other than that it already contains the element. * Implementations should use a more-specific exception that extends * `\RuntimeException`. diff --git a/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php b/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php index d4b335f4..7058bcf6 100644 --- a/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php +++ b/vendor/ramsey/collection/src/Exception/CollectionMismatchException.php @@ -14,9 +14,11 @@ declare(strict_types=1); namespace Ramsey\Collection\Exception; +use RuntimeException; + /** * Thrown when attempting to operate on collections of differing types. */ -class CollectionMismatchException extends \RuntimeException +class CollectionMismatchException extends RuntimeException { } diff --git a/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php b/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php index 9337ccc6..4491429c 100644 --- a/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php +++ b/vendor/ramsey/collection/src/Exception/InvalidSortOrderException.php @@ -14,9 +14,11 @@ declare(strict_types=1); namespace Ramsey\Collection\Exception; +use RuntimeException; + /** * Thrown when attempting to use a sort order that is not recognized. */ -class InvalidSortOrderException extends \RuntimeException +class InvalidSortOrderException extends RuntimeException { } diff --git a/vendor/ramsey/collection/src/Exception/NoSuchElementException.php b/vendor/ramsey/collection/src/Exception/NoSuchElementException.php index 9debe8f6..cabcb9d8 100644 --- a/vendor/ramsey/collection/src/Exception/NoSuchElementException.php +++ b/vendor/ramsey/collection/src/Exception/NoSuchElementException.php @@ -14,9 +14,11 @@ declare(strict_types=1); namespace Ramsey\Collection\Exception; +use RuntimeException; + /** * Thrown when attempting to access an element that does not exist. */ -class NoSuchElementException extends \RuntimeException +class NoSuchElementException extends RuntimeException { } diff --git a/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php b/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php index 8f45e583..9b622897 100644 --- a/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php +++ b/vendor/ramsey/collection/src/Exception/UnsupportedOperationException.php @@ -14,9 +14,11 @@ declare(strict_types=1); namespace Ramsey\Collection\Exception; +use RuntimeException; + /** * Thrown to indicate that the requested operation is not supported. */ -class UnsupportedOperationException extends \RuntimeException +class UnsupportedOperationException extends RuntimeException { } diff --git a/vendor/ramsey/collection/src/Exception/ValueExtractionException.php b/vendor/ramsey/collection/src/Exception/ValueExtractionException.php index f6c6cb4e..32f2a175 100644 --- a/vendor/ramsey/collection/src/Exception/ValueExtractionException.php +++ b/vendor/ramsey/collection/src/Exception/ValueExtractionException.php @@ -14,9 +14,11 @@ declare(strict_types=1); namespace Ramsey\Collection\Exception; +use RuntimeException; + /** * Thrown when attempting to extract a value for a method or property that does not exist. */ -class ValueExtractionException extends \RuntimeException +class ValueExtractionException extends RuntimeException { } diff --git a/vendor/ramsey/collection/src/Map/AbstractMap.php b/vendor/ramsey/collection/src/Map/AbstractMap.php index ae9f2fe6..37880728 100644 --- a/vendor/ramsey/collection/src/Map/AbstractMap.php +++ b/vendor/ramsey/collection/src/Map/AbstractMap.php @@ -20,6 +20,7 @@ use Ramsey\Collection\Exception\InvalidArgumentException; use function array_key_exists; use function array_keys; use function in_array; +use function var_export; /** * This class provides a basic implementation of `MapInterface`, to minimize the @@ -39,7 +40,7 @@ abstract class AbstractMap extends AbstractArray implements MapInterface if ($offset === null) { throw new InvalidArgumentException( 'Map elements are key/value pairs; a key must be provided for ' - . 'value ' . var_export($value, true) + . 'value ' . var_export($value, true), ); } diff --git a/vendor/ramsey/collection/src/Map/AbstractTypedMap.php b/vendor/ramsey/collection/src/Map/AbstractTypedMap.php index 551d2e6c..486dc2e2 100644 --- a/vendor/ramsey/collection/src/Map/AbstractTypedMap.php +++ b/vendor/ramsey/collection/src/Map/AbstractTypedMap.php @@ -18,11 +18,13 @@ use Ramsey\Collection\Exception\InvalidArgumentException; use Ramsey\Collection\Tool\TypeTrait; use Ramsey\Collection\Tool\ValueToStringTrait; +use function var_export; + /** * This class provides a basic implementation of `TypedMapInterface`, to * minimize the effort required to implement this interface. * - * @template K + * @template K of array-key * @template T * @extends AbstractMap * @implements TypedMapInterface @@ -37,33 +39,30 @@ abstract class AbstractTypedMap extends AbstractMap implements TypedMapInterface * @param T $value * * @inheritDoc - * - * @psalm-suppress MoreSpecificImplementedParamType */ public function offsetSet($offset, $value): void { if ($offset === null) { throw new InvalidArgumentException( 'Map elements are key/value pairs; a key must be provided for ' - . 'value ' . var_export($value, true) + . 'value ' . var_export($value, true), ); } if ($this->checkType($this->getKeyType(), $offset) === false) { throw new InvalidArgumentException( 'Key must be of type ' . $this->getKeyType() . '; key is ' - . $this->toolValueToString($offset) + . $this->toolValueToString($offset), ); } if ($this->checkType($this->getValueType(), $value) === false) { throw new InvalidArgumentException( 'Value must be of type ' . $this->getValueType() . '; value is ' - . $this->toolValueToString($value) + . $this->toolValueToString($value), ); } - /** @psalm-suppress MixedArgumentTypeCoercion */ parent::offsetSet($offset, $value); } } diff --git a/vendor/ramsey/collection/src/Map/NamedParameterMap.php b/vendor/ramsey/collection/src/Map/NamedParameterMap.php index 9926ddd8..6e391e97 100644 --- a/vendor/ramsey/collection/src/Map/NamedParameterMap.php +++ b/vendor/ramsey/collection/src/Map/NamedParameterMap.php @@ -21,6 +21,7 @@ use Ramsey\Collection\Tool\ValueToStringTrait; use function array_combine; use function array_key_exists; use function is_int; +use function var_export; /** * `NamedParameterMap` represents a mapping of values to a set of named keys @@ -38,7 +39,7 @@ class NamedParameterMap extends AbstractMap * * @var array */ - protected $namedParameters; + protected array $namedParameters; /** * Constructs a new `NamedParameterMap`. @@ -70,14 +71,14 @@ class NamedParameterMap extends AbstractMap if ($offset === null) { throw new InvalidArgumentException( 'Map elements are key/value pairs; a key must be provided for ' - . 'value ' . var_export($value, true) + . 'value ' . var_export($value, true), ); } if (!array_key_exists($offset, $this->namedParameters)) { throw new InvalidArgumentException( 'Attempting to set value for unconfigured parameter \'' - . $offset . '\'' + . $offset . '\'', ); } @@ -85,7 +86,7 @@ class NamedParameterMap extends AbstractMap throw new InvalidArgumentException( 'Value for \'' . $offset . '\' must be of type ' . $this->namedParameters[$offset] . '; value is ' - . $this->toolValueToString($value) + . $this->toolValueToString($value), ); } diff --git a/vendor/ramsey/collection/src/Map/TypedMap.php b/vendor/ramsey/collection/src/Map/TypedMap.php index 2e796377..77ef8d31 100644 --- a/vendor/ramsey/collection/src/Map/TypedMap.php +++ b/vendor/ramsey/collection/src/Map/TypedMap.php @@ -20,7 +20,7 @@ use Ramsey\Collection\Tool\TypeTrait; * A `TypedMap` represents a map of elements where key and value are typed. * * Each element is identified by a key with defined type and a value of defined - * type. The keys of the map must be unique. The values on the map can be= + * type. The keys of the map must be unique. The values on the map can be * repeated but each with its own different key. * * The most common case is to use a string type key, but it's not limited to @@ -80,7 +80,7 @@ use Ramsey\Collection\Tool\TypeTrait; * } * ``` * - * @template K + * @template K of array-key * @template T * @extends AbstractTypedMap */ @@ -93,20 +93,16 @@ class TypedMap extends AbstractTypedMap * * A map key's type is immutable once it is set. For this reason, this * property is set private. - * - * @var string data type of the map key. */ - private $keyType; + private string $keyType; /** * The data type of values stored in this collection. * * A map value's type is immutable once it is set. For this reason, this * property is set private. - * - * @var string data type of the map value. */ - private $valueType; + private string $valueType; /** * Constructs a map object of the specified key and value types, @@ -121,7 +117,6 @@ class TypedMap extends AbstractTypedMap $this->keyType = $keyType; $this->valueType = $valueType; - /** @psalm-suppress MixedArgumentTypeCoercion */ parent::__construct($data); } diff --git a/vendor/ramsey/collection/src/Queue.php b/vendor/ramsey/collection/src/Queue.php index 93e032b4..bc8c24e1 100644 --- a/vendor/ramsey/collection/src/Queue.php +++ b/vendor/ramsey/collection/src/Queue.php @@ -37,17 +37,13 @@ class Queue extends AbstractArray implements QueueInterface * * A queue's type is immutable once it is set. For this reason, this * property is set private. - * - * @var string */ - private $queueType; + private string $queueType; /** * The index of the head of the queue. - * - * @var int */ - protected $index = 0; + protected int $index = 0; /** * Constructs a queue object of the specified type, optionally with the @@ -68,13 +64,15 @@ class Queue extends AbstractArray implements QueueInterface * Since arbitrary offsets may not be manipulated in a queue, this method * serves only to fulfill the `ArrayAccess` interface requirements. It is * invoked by other operations when adding values to the queue. + * + * @throws InvalidArgumentException if $value is of the wrong type */ public function offsetSet($offset, $value): void { if ($this->checkType($this->getType(), $value) === false) { throw new InvalidArgumentException( 'Value must be of type ' . $this->getType() . '; value is ' - . $this->toolValueToString($value) + . $this->toolValueToString($value), ); } @@ -82,6 +80,8 @@ class Queue extends AbstractArray implements QueueInterface } /** + * @throws InvalidArgumentException if $value is of the wrong type + * * @inheritDoc */ public function add($element): bool @@ -100,7 +100,7 @@ class Queue extends AbstractArray implements QueueInterface if ($element === null) { throw new NoSuchElementException( - 'Can\'t return element from Queue. Queue is empty.' + 'Can\'t return element from Queue. Queue is empty.', ); } diff --git a/vendor/ramsey/collection/src/QueueInterface.php b/vendor/ramsey/collection/src/QueueInterface.php index 8c7383df..4f91487f 100644 --- a/vendor/ramsey/collection/src/QueueInterface.php +++ b/vendor/ramsey/collection/src/QueueInterface.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Ramsey\Collection; use Ramsey\Collection\Exception\NoSuchElementException; +use RuntimeException; /** * A queue is a collection in which the entities in the collection are kept in @@ -123,7 +124,7 @@ interface QueueInterface extends ArrayInterface * * @return bool `true` if this queue changed as a result of the call. * - * @throws \RuntimeException if a queue refuses to add a particular element + * @throws RuntimeException if a queue refuses to add a particular element * for any reason other than that it already contains the element. * Implementations should use a more-specific exception that extends * `\RuntimeException`. diff --git a/vendor/ramsey/collection/src/Set.php b/vendor/ramsey/collection/src/Set.php index 6932f247..c1d37ccc 100644 --- a/vendor/ramsey/collection/src/Set.php +++ b/vendor/ramsey/collection/src/Set.php @@ -44,10 +44,8 @@ class Set extends AbstractSet * The type of elements stored in this set * * A set's type is immutable. For this reason, this property is private. - * - * @var string */ - private $setType; + private string $setType; /** * Constructs a set object of the specified type, optionally with the diff --git a/vendor/ramsey/collection/src/Tool/TypeTrait.php b/vendor/ramsey/collection/src/Tool/TypeTrait.php index 8214e965..728d44b6 100644 --- a/vendor/ramsey/collection/src/Tool/TypeTrait.php +++ b/vendor/ramsey/collection/src/Tool/TypeTrait.php @@ -36,6 +36,7 @@ trait TypeTrait * @param string $type The type to check the value against. * @param mixed $value The value to check. */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint protected function checkType(string $type, $value): bool { switch ($type) { diff --git a/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php b/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php index f9be1be2..e1082428 100644 --- a/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php +++ b/vendor/ramsey/collection/src/Tool/ValueExtractorTrait.php @@ -17,6 +17,7 @@ namespace Ramsey\Collection\Tool; use Ramsey\Collection\Exception\ValueExtractionException; use function get_class; +use function is_object; use function method_exists; use function property_exists; use function sprintf; @@ -37,6 +38,7 @@ trait ValueExtractorTrait * * @throws ValueExtractionException if the method or property is not defined. */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint protected function extractValue($object, string $propertyOrMethod) { if (!is_object($object)) { @@ -52,7 +54,8 @@ trait ValueExtractorTrait } throw new ValueExtractionException( - sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, get_class($object)) + // phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall + sprintf('Method or property "%s" not defined in %s', $propertyOrMethod, get_class($object)), ); } } diff --git a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php b/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php index 721ade00..cacefc8b 100644 --- a/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php +++ b/vendor/ramsey/collection/src/Tool/ValueToStringTrait.php @@ -21,8 +21,10 @@ use function get_resource_type; use function is_array; use function is_bool; use function is_callable; +use function is_object; use function is_resource; use function is_scalar; +use function var_export; /** * Provides functionality to express a value as string @@ -44,6 +46,7 @@ trait ValueToStringTrait * * @param mixed $value the value to return as a string. */ + // phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint protected function toolValueToString($value): string { // null @@ -89,6 +92,7 @@ trait ValueToStringTrait } // unknown type + // phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall return '(' . get_class($value) . ' Object)'; } } diff --git a/vendor/ramsey/uuid/LICENSE b/vendor/ramsey/uuid/LICENSE index 2e8ef166..5b2acc5b 100644 --- a/vendor/ramsey/uuid/LICENSE +++ b/vendor/ramsey/uuid/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2022 Ben Ramsey +Copyright (c) 2012-2023 Ben Ramsey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/ramsey/uuid/README.md b/vendor/ramsey/uuid/README.md index 97e81a50..0db81495 100644 --- a/vendor/ramsey/uuid/README.md +++ b/vendor/ramsey/uuid/README.md @@ -8,9 +8,9 @@ Source Code Download Package PHP Programming Language - Read License - Build Status - Codecov Code Coverage + Read License + Build Status + Codecov Code Coverage Psalm Type Coverage

    @@ -38,7 +38,7 @@ composer require ramsey/uuid See the documentation for a thorough upgrade guide: -* [Upgrading ramsey/uuid Version 3 to 4](https://uuid.ramsey.dev/en/latest/upgrading/3-to-4.html) +* [Upgrading ramsey/uuid Version 3 to 4](https://uuid.ramsey.dev/en/stable/upgrading/3-to-4.html) ## Documentation @@ -74,10 +74,10 @@ licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information. [rfc4122]: http://tools.ietf.org/html/rfc4122 -[conduct]: https://github.com/ramsey/uuid/blob/main/CODE_OF_CONDUCT.md +[conduct]: https://github.com/ramsey/uuid/blob/4.x/CODE_OF_CONDUCT.md [javauuid]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html [pyuuid]: http://docs.python.org/3/library/uuid.html [composer]: http://getcomposer.org/ -[contributing.md]: https://github.com/ramsey/uuid/blob/main/CONTRIBUTING.md -[security.md]: https://github.com/ramsey/uuid/blob/main/SECURITY.md -[license]: https://github.com/ramsey/uuid/blob/main/LICENSE +[contributing.md]: https://github.com/ramsey/uuid/blob/4.x/CONTRIBUTING.md +[security.md]: https://github.com/ramsey/uuid/blob/4.x/SECURITY.md +[license]: https://github.com/ramsey/uuid/blob/4.x/LICENSE diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json index 112fabf1..8139b54e 100644 --- a/vendor/ramsey/uuid/composer.json +++ b/vendor/ramsey/uuid/composer.json @@ -10,10 +10,9 @@ ], "require": { "php": "^8.0", - "ext-ctype": "*", "ext-json": "*", - "brick/math": "^0.8 || ^0.9", - "ramsey/collection": "^1.0" + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", + "ramsey/collection": "^1.2 || ^2.0" }, "require-dev": { "captainhook/captainhook": "^5.10", @@ -22,18 +21,18 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", - "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, @@ -42,7 +41,6 @@ }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -70,7 +68,8 @@ "captainhook/plugin-composer": true, "ergebnis/composer-normalize": true, "phpstan/extension-installer": true, - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "ramsey/composer-repl": true }, "sort-packages": true }, @@ -91,8 +90,8 @@ "phpcbf": "phpcbf -vpw --cache=build/cache/phpcs.cache", "phpcs": "phpcs --cache=build/cache/phpcs.cache", "phpstan": [ - "phpstan analyse --no-progress", - "phpstan analyse -c phpstan-tests.neon --no-progress" + "phpstan analyse --no-progress --memory-limit=1G", + "phpstan analyse -c phpstan-tests.neon --no-progress --memory-limit=1G" ], "phpunit": "phpunit --verbose --colors=always", "phpunit-coverage": "phpunit --verbose --colors=always --coverage-html build/coverage", diff --git a/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php b/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php index 23931e41..20b38421 100644 --- a/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php +++ b/vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php @@ -30,15 +30,7 @@ use Ramsey\Uuid\UuidInterface; */ class DegradedUuidBuilder implements UuidBuilderInterface { - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; + private TimeConverterInterface $timeConverter; /** * @param NumberConverterInterface $numberConverter The number converter to @@ -47,10 +39,9 @@ class DegradedUuidBuilder implements UuidBuilderInterface * for converting timestamps extracted from a UUID to Unix timestamps */ public function __construct( - NumberConverterInterface $numberConverter, + private NumberConverterInterface $numberConverter, ?TimeConverterInterface $timeConverter = null ) { - $this->numberConverter = $numberConverter; $this->timeConverter = $timeConverter ?: new DegradedTimeConverter(); } diff --git a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php index 8ab438a1..ba5f31fb 100644 --- a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php +++ b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php @@ -27,17 +27,11 @@ use Ramsey\Uuid\UuidInterface; */ class FallbackBuilder implements UuidBuilderInterface { - /** - * @var iterable - */ - private $builders; - /** * @param iterable $builders An array of UUID builders */ - public function __construct(iterable $builders) + public function __construct(private iterable $builders) { - $this->builders = $builders; } /** diff --git a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php b/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php index f11e9d50..04872e0b 100644 --- a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php +++ b/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php @@ -18,6 +18,7 @@ use Ramsey\Uuid\Guid\Guid; use Ramsey\Uuid\UuidInterface; use function bin2hex; +use function sprintf; use function substr; /** @@ -29,6 +30,26 @@ use function substr; */ class GuidStringCodec extends StringCodec { + public function encode(UuidInterface $uuid): string + { + $hex = bin2hex($uuid->getFields()->getBytes()); + + /** @var non-empty-string */ + return sprintf( + '%02s%02s%02s%02s-%02s%02s-%02s%02s-%04s-%012s', + substr($hex, 6, 2), + substr($hex, 4, 2), + substr($hex, 2, 2), + substr($hex, 0, 2), + substr($hex, 10, 2), + substr($hex, 8, 2), + substr($hex, 14, 2), + substr($hex, 12, 2), + substr($hex, 16, 4), + substr($hex, 20), + ); + } + public function decode(string $encodedUuid): UuidInterface { $bytes = $this->getBytes($encodedUuid); diff --git a/vendor/ramsey/uuid/src/Codec/StringCodec.php b/vendor/ramsey/uuid/src/Codec/StringCodec.php index 58c9f580..95f38d2e 100644 --- a/vendor/ramsey/uuid/src/Codec/StringCodec.php +++ b/vendor/ramsey/uuid/src/Codec/StringCodec.php @@ -17,12 +17,13 @@ namespace Ramsey\Uuid\Codec; use Ramsey\Uuid\Builder\UuidBuilderInterface; use Ramsey\Uuid\Exception\InvalidArgumentException; use Ramsey\Uuid\Exception\InvalidUuidStringException; -use Ramsey\Uuid\Rfc4122\FieldsInterface; use Ramsey\Uuid\Uuid; use Ramsey\Uuid\UuidInterface; +use function bin2hex; use function hex2bin; use function implode; +use function sprintf; use function str_replace; use function strlen; use function substr; @@ -36,36 +37,28 @@ use function substr; */ class StringCodec implements CodecInterface { - /** - * @var UuidBuilderInterface - */ - private $builder; - /** * Constructs a StringCodec * * @param UuidBuilderInterface $builder The builder to use when encoding UUIDs */ - public function __construct(UuidBuilderInterface $builder) + public function __construct(private UuidBuilderInterface $builder) { - $this->builder = $builder; } public function encode(UuidInterface $uuid): string { - /** @var FieldsInterface $fields */ - $fields = $uuid->getFields(); + $hex = bin2hex($uuid->getFields()->getBytes()); - return $fields->getTimeLow()->toString() - . '-' - . $fields->getTimeMid()->toString() - . '-' - . $fields->getTimeHiAndVersion()->toString() - . '-' - . $fields->getClockSeqHiAndReserved()->toString() - . $fields->getClockSeqLow()->toString() - . '-' - . $fields->getNode()->toString(); + /** @var non-empty-string */ + return sprintf( + '%08s-%04s-%04s-%04s-%012s', + substr($hex, 0, 8), + substr($hex, 8, 4), + substr($hex, 12, 4), + substr($hex, 16, 4), + substr($hex, 20), + ); } /** diff --git a/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php b/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php index fef63fd0..99b88b3b 100644 --- a/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php @@ -27,10 +27,7 @@ use Ramsey\Uuid\Math\BrickMathCalculator; */ class BigNumberConverter implements NumberConverterInterface { - /** - * @var NumberConverterInterface - */ - private $converter; + private NumberConverterInterface $converter; public function __construct() { diff --git a/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php b/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php index 501eac0f..043c3c43 100644 --- a/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Number/GenericNumberConverter.php @@ -26,14 +26,8 @@ use Ramsey\Uuid\Type\Integer as IntegerObject; */ class GenericNumberConverter implements NumberConverterInterface { - /** - * @var CalculatorInterface - */ - private $calculator; - - public function __construct(CalculatorInterface $calculator) + public function __construct(private CalculatorInterface $calculator) { - $this->calculator = $calculator; } /** diff --git a/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php index 7390dad8..b6bca9ee 100644 --- a/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php @@ -29,10 +29,7 @@ use Ramsey\Uuid\Type\Time; */ class BigNumberTimeConverter implements TimeConverterInterface { - /** - * @var TimeConverterInterface - */ - private $converter; + private TimeConverterInterface $converter; public function __construct() { diff --git a/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php index a8aa64b7..f6b60abb 100644 --- a/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Time/GenericTimeConverter.php @@ -50,14 +50,8 @@ class GenericTimeConverter implements TimeConverterInterface */ private const MICROSECOND_INTERVALS = '10'; - /** - * @var CalculatorInterface - */ - private $calculator; - - public function __construct(CalculatorInterface $calculator) + public function __construct(private CalculatorInterface $calculator) { - $this->calculator = $calculator; } public function calculateTime(string $seconds, string $microseconds): Hexadecimal diff --git a/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php index 538d2f2f..66009f14 100644 --- a/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Time/PhpTimeConverter.php @@ -58,20 +58,9 @@ class PhpTimeConverter implements TimeConverterInterface */ private const MICROSECOND_INTERVALS = 10; - /** - * @var CalculatorInterface - */ - private $calculator; - - /** - * @var TimeConverterInterface - */ - private $fallbackConverter; - - /** - * @var int - */ - private $phpPrecision; + private int $phpPrecision; + private CalculatorInterface $calculator; + private TimeConverterInterface $fallbackConverter; public function __construct( ?CalculatorInterface $calculator = null, @@ -132,11 +121,11 @@ class PhpTimeConverter implements TimeConverterInterface } /** - * @param int|float $time The time to split into seconds and microseconds + * @param float|int $time The time to split into seconds and microseconds * * @return string[] */ - private function splitTime($time): array + private function splitTime(float | int $time): array { $split = explode('.', (string) $time, 2); diff --git a/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php b/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php index ed6d9dec..ac01a79c 100644 --- a/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php +++ b/vendor/ramsey/uuid/src/DeprecatedUuidInterface.php @@ -18,8 +18,7 @@ use DateTimeInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; /** - * This interface encapsulates deprecated methods for ramsey/uuid; this - * interface and its methods will be removed in ramsey/uuid 5.0.0. + * This interface encapsulates deprecated methods for ramsey/uuid * * @psalm-immutable */ @@ -123,12 +122,6 @@ interface DeprecatedUuidInterface */ public function getTimestampHex(): string; - /** - * @deprecated In ramsey/uuid version 5.0.0, this will be removed from this - * interface. It has moved to {@see \Ramsey\Uuid\Rfc4122\UuidInterface::getUrn()}. - */ - public function getUrn(): string; - /** * @deprecated Use {@see UuidInterface::getFields()} to get a * {@see FieldsInterface} instance. If it is a diff --git a/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php b/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php index 34282952..d3fbb0cc 100644 --- a/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php +++ b/vendor/ramsey/uuid/src/DeprecatedUuidMethodsTrait.php @@ -17,10 +17,8 @@ namespace Ramsey\Uuid; use DateTimeImmutable; use DateTimeInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Converter\TimeConverterInterface; use Ramsey\Uuid\Exception\DateTimeException; use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; use Throwable; use function str_pad; @@ -32,29 +30,17 @@ use const STR_PAD_LEFT; * This trait encapsulates deprecated methods for ramsey/uuid; this trait and * its methods will be removed in ramsey/uuid 5.0.0. * + * @deprecated This trait and its methods will be removed in ramsey/uuid 5.0.0. + * * @psalm-immutable */ trait DeprecatedUuidMethodsTrait { - /** - * @var Rfc4122FieldsInterface - */ - protected $fields; - - /** - * @var NumberConverterInterface - */ - protected $numberConverter; - - /** - * @var TimeConverterInterface - */ - protected $timeConverter; - /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()} + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()} * and use the arbitrary-precision math library of your choice to * convert it to a string integer. */ @@ -65,8 +51,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqHiAndReserved()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}. */ public function getClockSeqHiAndReservedHex(): string { @@ -75,8 +62,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()} + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()} * and use the arbitrary-precision math library of your choice to * convert it to a string integer. */ @@ -87,8 +75,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeqLow()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}. */ public function getClockSeqLowHex(): string { @@ -97,8 +86,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()} + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()} * and use the arbitrary-precision math library of your choice to * convert it to a string integer. */ @@ -109,8 +99,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getClockSeq()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}. */ public function getClockSequenceHex(): string { @@ -157,7 +148,7 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. * * @return string[] */ @@ -219,10 +210,11 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getNode()} - * and use the arbitrary-precision math library of your choice to - * convert it to a string integer. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. */ public function getNode(): string { @@ -231,8 +223,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getNode()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}. */ public function getNodeHex(): string { @@ -241,8 +234,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()} + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()} * and use the arbitrary-precision math library of your choice to * convert it to a string integer. */ @@ -253,8 +247,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeHiAndVersion()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}. */ public function getTimeHiAndVersionHex(): string { @@ -263,10 +258,11 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()} - * and use the arbitrary-precision math library of your choice to - * convert it to a string integer. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. */ public function getTimeLow(): string { @@ -275,8 +271,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeLow()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}. */ public function getTimeLowHex(): string { @@ -285,10 +282,11 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()} - * and use the arbitrary-precision math library of your choice to - * convert it to a string integer. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()} and use the + * arbitrary-precision math library of your choice to convert it to a + * string integer. */ public function getTimeMid(): string { @@ -297,8 +295,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimeMid()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}. */ public function getTimeMidHex(): string { @@ -307,10 +306,11 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()} - * and use the arbitrary-precision math library of your choice to - * convert it to a string integer. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()} and use + * the arbitrary-precision math library of your choice to convert it to + * a string integer. */ public function getTimestamp(): string { @@ -323,8 +323,9 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a {@see Rfc4122FieldsInterface} - * instance, you may call {@see Rfc4122FieldsInterface::getTimestamp()}. + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call + * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}. */ public function getTimestampHex(): string { @@ -335,20 +336,9 @@ trait DeprecatedUuidMethodsTrait return $this->fields->getTimestamp()->toString(); } - /** - * @deprecated This has moved to {@see Rfc4122FieldsInterface::getUrn()} and - * is available on {@see \Ramsey\Uuid\Rfc4122\UuidV1}, - * {@see \Ramsey\Uuid\Rfc4122\UuidV3}, {@see \Ramsey\Uuid\Rfc4122\UuidV4}, - * and {@see \Ramsey\Uuid\Rfc4122\UuidV5}. - */ - public function getUrn(): string - { - return 'urn:uuid:' . $this->toString(); - } - /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}. */ @@ -359,7 +349,7 @@ trait DeprecatedUuidMethodsTrait /** * @deprecated Use {@see UuidInterface::getFields()} to get a - * {@see FieldsInterface} instance. If it is a + * {@see \Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}. */ diff --git a/vendor/ramsey/uuid/src/FeatureSet.php b/vendor/ramsey/uuid/src/FeatureSet.php index 66836660..b9af869f 100644 --- a/vendor/ramsey/uuid/src/FeatureSet.php +++ b/vendor/ramsey/uuid/src/FeatureSet.php @@ -35,6 +35,7 @@ use Ramsey\Uuid\Generator\RandomGeneratorFactory; use Ramsey\Uuid\Generator\RandomGeneratorInterface; use Ramsey\Uuid\Generator\TimeGeneratorFactory; use Ramsey\Uuid\Generator\TimeGeneratorInterface; +use Ramsey\Uuid\Generator\UnixTimeGenerator; use Ramsey\Uuid\Guid\GuidBuilder; use Ramsey\Uuid\Math\BrickMathCalculator; use Ramsey\Uuid\Math\CalculatorInterface; @@ -61,92 +62,25 @@ use const PHP_INT_SIZE; */ class FeatureSet { - /** - * @var bool - */ - private $disableBigNumber = false; - - /** - * @var bool - */ - private $disable64Bit = false; - - /** - * @var bool - */ - private $ignoreSystemNode = false; - - /** - * @var bool - */ - private $enablePecl = false; - - /** - * @var UuidBuilderInterface - */ - private $builder; - - /** - * @var CodecInterface - */ - private $codec; - - /** - * @var DceSecurityGeneratorInterface - */ - private $dceSecurityGenerator; - - /** - * @var NameGeneratorInterface - */ - private $nameGenerator; - - /** - * @var NodeProviderInterface - */ - private $nodeProvider; - - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - - /** - * @var RandomGeneratorInterface - */ - private $randomGenerator; - - /** - * @var TimeGeneratorInterface - */ - private $timeGenerator; - - /** - * @var TimeProviderInterface - */ - private $timeProvider; - - /** - * @var ValidatorInterface - */ - private $validator; - - /** - * @var CalculatorInterface - */ - private $calculator; + private ?TimeProviderInterface $timeProvider = null; + private CalculatorInterface $calculator; + private CodecInterface $codec; + private DceSecurityGeneratorInterface $dceSecurityGenerator; + private NameGeneratorInterface $nameGenerator; + private NodeProviderInterface $nodeProvider; + private NumberConverterInterface $numberConverter; + private RandomGeneratorInterface $randomGenerator; + private TimeConverterInterface $timeConverter; + private TimeGeneratorInterface $timeGenerator; + private TimeGeneratorInterface $unixTimeGenerator; + private UuidBuilderInterface $builder; + private ValidatorInterface $validator; /** * @param bool $useGuids True build UUIDs using the GuidStringCodec * @param bool $force32Bit True to force the use of 32-bit functionality * (primarily for testing purposes) - * @param bool $forceNoBigNumber True to disable the use of moontoast/math - * (primarily for testing purposes) + * @param bool $forceNoBigNumber (obsolete) * @param bool $ignoreSystemNode True to disable attempts to check for the * system node ID (primarily for testing purposes) * @param bool $enablePecl True to enable the use of the PeclUuidTimeGenerator @@ -154,25 +88,23 @@ class FeatureSet */ public function __construct( bool $useGuids = false, - bool $force32Bit = false, + private bool $force32Bit = false, bool $forceNoBigNumber = false, - bool $ignoreSystemNode = false, - bool $enablePecl = false + private bool $ignoreSystemNode = false, + private bool $enablePecl = false ) { - $this->disableBigNumber = $forceNoBigNumber; - $this->disable64Bit = $force32Bit; - $this->ignoreSystemNode = $ignoreSystemNode; - $this->enablePecl = $enablePecl; - + $this->randomGenerator = $this->buildRandomGenerator(); $this->setCalculator(new BrickMathCalculator()); $this->builder = $this->buildUuidBuilder($useGuids); $this->codec = $this->buildCodec($useGuids); $this->nodeProvider = $this->buildNodeProvider(); $this->nameGenerator = $this->buildNameGenerator(); - $this->randomGenerator = $this->buildRandomGenerator(); $this->setTimeProvider(new SystemTimeProvider()); $this->setDceSecurityProvider(new SystemDceSecurityProvider()); $this->validator = new GenericValidator(); + + assert($this->timeProvider !== null); + $this->unixTimeGenerator = $this->buildUnixTimeGenerator(); } /** @@ -255,6 +187,14 @@ class FeatureSet return $this->timeGenerator; } + /** + * Returns the Unix Epoch time generator configured for this environment + */ + public function getUnixTimeGenerator(): TimeGeneratorInterface + { + return $this->unixTimeGenerator; + } + /** * Returns the validator configured for this environment */ @@ -292,7 +232,10 @@ class FeatureSet public function setNodeProvider(NodeProviderInterface $nodeProvider): void { $this->nodeProvider = $nodeProvider; - $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + + if (isset($this->timeProvider)) { + $this->timeGenerator = $this->buildTimeGenerator($this->timeProvider); + } } /** @@ -393,6 +336,14 @@ class FeatureSet ))->getGenerator(); } + /** + * Returns a Unix Epoch time generator configured for this environment + */ + private function buildUnixTimeGenerator(): TimeGeneratorInterface + { + return new UnixTimeGenerator($this->randomGenerator); + } + /** * Returns a name generator configured for this environment */ @@ -441,6 +392,6 @@ class FeatureSet */ private function is64BitSystem(): bool { - return PHP_INT_SIZE === 8 && !$this->disable64Bit; + return PHP_INT_SIZE === 8 && !$this->force32Bit; } } diff --git a/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php b/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php index 16e6525d..3d36b6f1 100644 --- a/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php +++ b/vendor/ramsey/uuid/src/Fields/SerializableFieldsTrait.php @@ -56,22 +56,23 @@ trait SerializableFieldsTrait /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - if (strlen($serialized) === 16) { - $this->__construct($serialized); + if (strlen($data) === 16) { + $this->__construct($data); } else { - $this->__construct(base64_decode($serialized)); + $this->__construct(base64_decode($data)); } } /** - * @param array{bytes: string} $data + * @param array{bytes?: string} $data + * + * @psalm-suppress UnusedMethodCall */ public function __unserialize(array $data): void { diff --git a/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/vendor/ramsey/uuid/src/Generator/CombGenerator.php index 25b7988e..0e887060 100644 --- a/vendor/ramsey/uuid/src/Generator/CombGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/CombGenerator.php @@ -61,22 +61,10 @@ class CombGenerator implements RandomGeneratorInterface { public const TIMESTAMP_BYTES = 6; - /** - * @var RandomGeneratorInterface - */ - private $randomGenerator; - - /** - * @var NumberConverterInterface - */ - private $converter; - public function __construct( - RandomGeneratorInterface $generator, - NumberConverterInterface $numberConverter + private RandomGeneratorInterface $generator, + private NumberConverterInterface $numberConverter ) { - $this->converter = $numberConverter; - $this->randomGenerator = $generator; } /** @@ -95,11 +83,11 @@ class CombGenerator implements RandomGeneratorInterface $hash = ''; if (self::TIMESTAMP_BYTES > 0 && $length > self::TIMESTAMP_BYTES) { - $hash = $this->randomGenerator->generate($length - self::TIMESTAMP_BYTES); + $hash = $this->generator->generate($length - self::TIMESTAMP_BYTES); } $lsbTime = str_pad( - $this->converter->toHex($this->timestamp()), + $this->numberConverter->toHex($this->timestamp()), self::TIMESTAMP_BYTES * 2, '0', STR_PAD_LEFT diff --git a/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php b/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php index aca8c5db..37ba7813 100644 --- a/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php @@ -52,29 +52,11 @@ class DceSecurityGenerator implements DceSecurityGeneratorInterface */ private const CLOCK_SEQ_LOW = 0; - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeGeneratorInterface - */ - private $timeGenerator; - - /** - * @var DceSecurityProviderInterface - */ - private $dceSecurityProvider; - public function __construct( - NumberConverterInterface $numberConverter, - TimeGeneratorInterface $timeGenerator, - DceSecurityProviderInterface $dceSecurityProvider + private NumberConverterInterface $numberConverter, + private TimeGeneratorInterface $timeGenerator, + private DceSecurityProviderInterface $dceSecurityProvider ) { - $this->numberConverter = $numberConverter; - $this->timeGenerator = $timeGenerator; - $this->dceSecurityProvider = $dceSecurityProvider; } public function generate( @@ -153,8 +135,7 @@ class DceSecurityGenerator implements DceSecurityGeneratorInterface // Replace bytes in the time-based UUID with DCE Security values. $bytes = substr_replace($bytes, $identifierBytes, 0, 4); - $bytes = substr_replace($bytes, $domainByte, 9, 1); - return $bytes; + return substr_replace($bytes, $domainByte, 9, 1); } } diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php index d245c7bc..ea1e2a6f 100644 --- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -23,11 +23,11 @@ use Ramsey\Uuid\Provider\TimeProviderInterface; use Ramsey\Uuid\Type\Hexadecimal; use Throwable; -use function ctype_xdigit; use function dechex; use function hex2bin; use function is_int; use function pack; +use function preg_match; use function sprintf; use function str_pad; use function strlen; @@ -40,29 +40,11 @@ use const STR_PAD_LEFT; */ class DefaultTimeGenerator implements TimeGeneratorInterface { - /** - * @var NodeProviderInterface - */ - private $nodeProvider; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - - /** - * @var TimeProviderInterface - */ - private $timeProvider; - public function __construct( - NodeProviderInterface $nodeProvider, - TimeConverterInterface $timeConverter, - TimeProviderInterface $timeProvider + private NodeProviderInterface $nodeProvider, + private TimeConverterInterface $timeConverter, + private TimeProviderInterface $timeProvider ) { - $this->nodeProvider = $nodeProvider; - $this->timeConverter = $timeConverter; - $this->timeProvider = $timeProvider; } /** @@ -121,13 +103,13 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * Uses the node provider given when constructing this instance to get * the node ID (usually a MAC address) * - * @param string|int|null $node A node value that may be used to override the node provider + * @param int|string|null $node A node value that may be used to override the node provider * * @return string 6-byte binary string representation of the node * * @throws InvalidArgumentException */ - private function getValidNode($node): string + private function getValidNode(int | string | null $node): string { if ($node === null) { $node = $this->nodeProvider->getNode(); @@ -138,7 +120,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface $node = dechex($node); } - if (!ctype_xdigit((string) $node) || strlen((string) $node) > 12) { + if (!preg_match('/^[A-Fa-f0-9]+$/', (string) $node) || strlen((string) $node) > 12) { throw new InvalidArgumentException('Invalid node value'); } diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php index 3780c5c6..6a6d1aec 100644 --- a/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/PeclUuidNameGenerator.php @@ -33,21 +33,16 @@ class PeclUuidNameGenerator implements NameGeneratorInterface /** @psalm-pure */ public function generate(UuidInterface $ns, string $name, string $hashAlgorithm): string { - switch ($hashAlgorithm) { - case 'md5': - $uuid = uuid_generate_md5($ns->toString(), $name); - - break; - case 'sha1': - $uuid = uuid_generate_sha1($ns->toString(), $name); - - break; - default: - throw new NameException(sprintf( + $uuid = match ($hashAlgorithm) { + 'md5' => uuid_generate_md5($ns->toString(), $name), + 'sha1' => uuid_generate_sha1($ns->toString(), $name), + default => throw new NameException( + sprintf( 'Unable to hash namespace and name with algorithm \'%s\'', $hashAlgorithm - )); - } + ) + ), + }; return uuid_parse($uuid); } diff --git a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php index 5c83cb4d..1180b976 100644 --- a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php +++ b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php @@ -22,7 +22,7 @@ interface RandomGeneratorInterface /** * Generates a string of randomized binary data * - * @param int $length The number of bytes of random binary data to generate + * @param int<1, max> $length The number of bytes of random binary data to generate * * @return string A binary string */ diff --git a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php index 793ccd5a..fd0ccc8a 100644 --- a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php +++ b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php @@ -29,10 +29,7 @@ use RandomLib\Generator; */ class RandomLibAdapter implements RandomGeneratorInterface { - /** - * @var Generator - */ - private $generator; + private Generator $generator; /** * Constructs a RandomLibAdapter diff --git a/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php b/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php index 3d55fc4d..8d06fc3a 100644 --- a/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php +++ b/vendor/ramsey/uuid/src/Generator/TimeGeneratorFactory.php @@ -24,29 +24,11 @@ use Ramsey\Uuid\Provider\TimeProviderInterface; */ class TimeGeneratorFactory { - /** - * @var NodeProviderInterface - */ - private $nodeProvider; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - - /** - * @var TimeProviderInterface - */ - private $timeProvider; - public function __construct( - NodeProviderInterface $nodeProvider, - TimeConverterInterface $timeConverter, - TimeProviderInterface $timeProvider + private NodeProviderInterface $nodeProvider, + private TimeConverterInterface $timeConverter, + private TimeProviderInterface $timeProvider ) { - $this->nodeProvider = $nodeProvider; - $this->timeConverter = $timeConverter; - $this->timeProvider = $timeProvider; } /** diff --git a/vendor/ramsey/uuid/src/Guid/Fields.php b/vendor/ramsey/uuid/src/Guid/Fields.php index d8a1a2b1..0fc5d1c9 100644 --- a/vendor/ramsey/uuid/src/Guid/Fields.php +++ b/vendor/ramsey/uuid/src/Guid/Fields.php @@ -17,6 +17,7 @@ namespace Ramsey\Uuid\Guid; use Ramsey\Uuid\Exception\InvalidArgumentException; use Ramsey\Uuid\Fields\SerializableFieldsTrait; use Ramsey\Uuid\Rfc4122\FieldsInterface; +use Ramsey\Uuid\Rfc4122\MaxTrait; use Ramsey\Uuid\Rfc4122\NilTrait; use Ramsey\Uuid\Rfc4122\VariantTrait; use Ramsey\Uuid\Rfc4122\VersionTrait; @@ -44,16 +45,12 @@ use const STR_PAD_LEFT; */ final class Fields implements FieldsInterface { + use MaxTrait; use NilTrait; use SerializableFieldsTrait; use VariantTrait; use VersionTrait; - /** - * @var string - */ - private $bytes; - /** * @param string $bytes A 16-byte binary string representation of a UUID * @@ -61,17 +58,15 @@ final class Fields implements FieldsInterface * @throws InvalidArgumentException if the byte string does not represent a GUID * @throws InvalidArgumentException if the byte string does not contain a valid version */ - public function __construct(string $bytes) + public function __construct(private string $bytes) { - if (strlen($bytes) !== 16) { + if (strlen($this->bytes) !== 16) { throw new InvalidArgumentException( 'The byte string must be 16 bytes long; ' - . 'received ' . strlen($bytes) . ' bytes' + . 'received ' . strlen($this->bytes) . ' bytes' ); } - $this->bytes = $bytes; - if (!$this->isCorrectVariant()) { throw new InvalidArgumentException( 'The byte string received does not conform to the RFC ' @@ -149,7 +144,13 @@ final class Fields implements FieldsInterface public function getClockSeq(): Hexadecimal { - $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + if ($this->isMax()) { + $clockSeq = 0xffff; + } elseif ($this->isNil()) { + $clockSeq = 0x0000; + } else { + $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + } return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); } @@ -171,7 +172,7 @@ final class Fields implements FieldsInterface public function getVersion(): ?int { - if ($this->isNil()) { + if ($this->isNil() || $this->isMax()) { return null; } @@ -183,7 +184,7 @@ final class Fields implements FieldsInterface private function isCorrectVariant(): bool { - if ($this->isNil()) { + if ($this->isNil() || $this->isMax()) { return true; } diff --git a/vendor/ramsey/uuid/src/Guid/GuidBuilder.php b/vendor/ramsey/uuid/src/Guid/GuidBuilder.php index 758dd6b7..c036bb20 100644 --- a/vendor/ramsey/uuid/src/Guid/GuidBuilder.php +++ b/vendor/ramsey/uuid/src/Guid/GuidBuilder.php @@ -31,16 +31,6 @@ use Throwable; */ class GuidBuilder implements UuidBuilderInterface { - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - /** * @param NumberConverterInterface $numberConverter The number converter to * use when constructing the Guid @@ -48,11 +38,9 @@ class GuidBuilder implements UuidBuilderInterface * for converting timestamps extracted from a UUID to Unix timestamps */ public function __construct( - NumberConverterInterface $numberConverter, - TimeConverterInterface $timeConverter + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter ) { - $this->numberConverter = $numberConverter; - $this->timeConverter = $timeConverter; } /** diff --git a/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php b/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php index 8ba75796..c0b47bbf 100644 --- a/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php +++ b/vendor/ramsey/uuid/src/Lazy/LazyUuidFromString.php @@ -18,8 +18,8 @@ use DateTimeInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Exception\UnsupportedOperationException; use Ramsey\Uuid\Fields\FieldsInterface; -use Ramsey\Uuid\Nonstandard\UuidV6; use Ramsey\Uuid\Rfc4122\UuidV1; +use Ramsey\Uuid\Rfc4122\UuidV6; use Ramsey\Uuid\Type\Hexadecimal; use Ramsey\Uuid\Type\Integer as IntegerObject; use Ramsey\Uuid\UuidFactory; @@ -55,18 +55,14 @@ use function substr; final class LazyUuidFromString implements UuidInterface { public const VALID_REGEX = '/\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/ms'; - /** - * @var string - * @psalm-var non-empty-string - */ - private $uuid; - /** @var UuidInterface|null */ - private $unwrapped; - /** @psalm-param non-empty-string $uuid */ - public function __construct(string $uuid) + private ?UuidInterface $unwrapped = null; + + /** + * @psalm-param non-empty-string $uuid + */ + public function __construct(private string $uuid) { - $this->uuid = $uuid; } /** @psalm-pure */ @@ -105,19 +101,20 @@ final class LazyUuidFromString implements UuidInterface /** * {@inheritDoc} * - * @param string $serialized + * @param string $data * - * @psalm-param non-empty-string $serialized + * @psalm-param non-empty-string $data */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - $this->uuid = $serialized; + $this->uuid = $data; } /** - * @param array{string: string} $data + * @param array{string?: string} $data * - * @psalm-param array{string: non-empty-string} $data + * @psalm-param array{string?: non-empty-string} $data + * @psalm-suppress UnusedMethodCall */ public function __unserialize(array $data): void { diff --git a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php index f2d86788..f065acd4 100644 --- a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php +++ b/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php @@ -136,9 +136,11 @@ final class BrickMathCalculator implements CalculatorInterface /** * Maps ramsey/uuid rounding modes to those used by brick/math + * + * @return BrickMathRounding::* */ - private function getBrickRoundingMode(int $roundingMode): int + private function getBrickRoundingMode(int $roundingMode) { - return self::ROUNDING_MODE_MAP[$roundingMode] ?? 0; + return self::ROUNDING_MODE_MAP[$roundingMode] ?? BrickMathRounding::UNNECESSARY; } } diff --git a/vendor/ramsey/uuid/src/Nonstandard/Fields.php b/vendor/ramsey/uuid/src/Nonstandard/Fields.php index 927bc6a2..5dfe6107 100644 --- a/vendor/ramsey/uuid/src/Nonstandard/Fields.php +++ b/vendor/ramsey/uuid/src/Nonstandard/Fields.php @@ -47,26 +47,19 @@ final class Fields implements FieldsInterface use SerializableFieldsTrait; use VariantTrait; - /** - * @var string - */ - private $bytes; - /** * @param string $bytes A 16-byte binary string representation of a UUID * * @throws InvalidArgumentException if the byte string is not exactly 16 bytes */ - public function __construct(string $bytes) + public function __construct(private string $bytes) { - if (strlen($bytes) !== 16) { + if (strlen($this->bytes) !== 16) { throw new InvalidArgumentException( 'The byte string must be 16 bytes long; ' - . 'received ' . strlen($bytes) . ' bytes' + . 'received ' . strlen($this->bytes) . ' bytes' ); } - - $this->bytes = $bytes; } public function getBytes(): string @@ -130,4 +123,9 @@ final class Fields implements FieldsInterface { return false; } + + public function isMax(): bool + { + return false; + } } diff --git a/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php b/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php index 0c892773..82efd402 100644 --- a/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php +++ b/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php @@ -29,16 +29,6 @@ use Throwable; */ class UuidBuilder implements UuidBuilderInterface { - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - /** * @param NumberConverterInterface $numberConverter The number converter to * use when constructing the Nonstandard\Uuid @@ -46,11 +36,9 @@ class UuidBuilder implements UuidBuilderInterface * for converting timestamps extracted from a UUID to Unix timestamps */ public function __construct( - NumberConverterInterface $numberConverter, - TimeConverterInterface $timeConverter + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter ) { - $this->numberConverter = $numberConverter; - $this->timeConverter = $timeConverter; } /** diff --git a/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php b/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php index 05586b3e..7497dd10 100644 --- a/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php +++ b/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php @@ -14,39 +14,34 @@ declare(strict_types=1); namespace Ramsey\Uuid\Nonstandard; -use DateTimeImmutable; -use DateTimeInterface; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\DateTimeException; use Ramsey\Uuid\Exception\InvalidArgumentException; use Ramsey\Uuid\Lazy\LazyUuidFromString; use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; +use Ramsey\Uuid\Rfc4122\TimeTrait; use Ramsey\Uuid\Rfc4122\UuidInterface; use Ramsey\Uuid\Rfc4122\UuidV1; -use Ramsey\Uuid\Uuid; -use Throwable; - -use function hex2bin; -use function str_pad; -use function substr; - -use const STR_PAD_LEFT; +use Ramsey\Uuid\Uuid as BaseUuid; /** - * Ordered-time, or version 6, UUIDs include timestamp, clock sequence, and node - * values that are combined into a 128-bit unsigned integer + * Reordered time, or version 6, UUIDs include timestamp, clock sequence, and + * node values that are combined into a 128-bit unsigned integer + * + * @deprecated Use {@see \Ramsey\Uuid\Rfc4122\UuidV6} instead. * * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs * * @psalm-immutable */ -final class UuidV6 extends Uuid implements UuidInterface +class UuidV6 extends BaseUuid implements UuidInterface { + use TimeTrait; + /** - * Creates a version 6 (time-based) UUID + * Creates a version 6 (reordered time) UUID * * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID * @param NumberConverterInterface $numberConverter The number converter to use @@ -62,39 +57,16 @@ final class UuidV6 extends Uuid implements UuidInterface CodecInterface $codec, TimeConverterInterface $timeConverter ) { - if ($fields->getVersion() !== Uuid::UUID_TYPE_PEABODY) { + if ($fields->getVersion() !== Uuid::UUID_TYPE_REORDERED_TIME) { throw new InvalidArgumentException( 'Fields used to create a UuidV6 must represent a ' - . 'version 6 (ordered-time) UUID' + . 'version 6 (reordered time) UUID' ); } parent::__construct($fields, $numberConverter, $codec, $timeConverter); } - /** - * Returns a DateTimeInterface object representing the timestamp associated - * with the UUID - * - * @return DateTimeImmutable A PHP DateTimeImmutable instance representing - * the timestamp of a version 6 UUID - */ - public function getDateTime(): DateTimeInterface - { - $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); - - try { - return new DateTimeImmutable( - '@' - . $time->getSeconds()->toString() - . '.' - . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) - ); - } catch (Throwable $e) { - throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); - } - } - /** * Converts this UUID into an instance of a version 1 UUID */ @@ -116,7 +88,7 @@ final class UuidV6 extends Uuid implements UuidInterface /** * Converts a version 1 UUID into an instance of a version 6 UUID */ - public static function fromUuidV1(UuidV1 $uuidV1): UuidV6 + public static function fromUuidV1(UuidV1 $uuidV1): \Ramsey\Uuid\Rfc4122\UuidV6 { $hex = $uuidV1->getHex()->toString(); $hex = substr($hex, 13, 3) diff --git a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php b/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php index 7ff40764..d5b6cf0c 100644 --- a/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Dce/SystemDceSecurityProvider.php @@ -21,7 +21,6 @@ use Ramsey\Uuid\Type\Integer as IntegerObject; use function escapeshellarg; use function preg_split; use function str_getcsv; -use function strpos; use function strrpos; use function strtolower; use function strtoupper; @@ -42,6 +41,7 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface */ public function getUid(): IntegerObject { + /** @var int|float|string|IntegerObject|null $uid */ static $uid = null; if ($uid instanceof IntegerObject) { @@ -72,6 +72,7 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface */ public function getGid(): IntegerObject { + /** @var int|float|string|IntegerObject|null $gid */ static $gid = null; if ($gid instanceof IntegerObject) { @@ -104,15 +105,10 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface return ''; } - switch ($this->getOs()) { - case 'WIN': - return $this->getWindowsUid(); - case 'DAR': - case 'FRE': - case 'LIN': - default: - return trim((string) shell_exec('id -u')); - } + return match ($this->getOs()) { + 'WIN' => $this->getWindowsUid(), + default => trim((string) shell_exec('id -u')), + }; } /** @@ -124,15 +120,10 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface return ''; } - switch ($this->getOs()) { - case 'WIN': - return $this->getWindowsGid(); - case 'DAR': - case 'FRE': - case 'LIN': - default: - return trim((string) shell_exec('id -g')); - } + return match ($this->getOs()) { + 'WIN' => $this->getWindowsGid(), + default => trim((string) shell_exec('id -g')), + }; } /** @@ -142,7 +133,7 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface { $disabledFunctions = strtolower((string) ini_get('disable_functions')); - return strpos($disabledFunctions, 'shell_exec') === false; + return !str_contains($disabledFunctions, 'shell_exec'); } /** @@ -150,7 +141,13 @@ class SystemDceSecurityProvider implements DceSecurityProviderInterface */ private function getOs(): string { - return strtoupper(substr(constant('PHP_OS'), 0, 3)); + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + + return strtoupper(substr($phpOs, 0, 3)); } /** diff --git a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php index fe890cc4..d2eb20b7 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php @@ -24,24 +24,18 @@ use Ramsey\Uuid\Type\Hexadecimal; */ class FallbackNodeProvider implements NodeProviderInterface { - /** - * @var iterable - */ - private $nodeProviders; - /** * @param iterable $providers Array of node providers */ - public function __construct(iterable $providers) + public function __construct(private iterable $providers) { - $this->nodeProviders = $providers; } public function getNode(): Hexadecimal { $lastProviderException = null; - foreach ($this->nodeProviders as $provider) { + foreach ($this->providers as $provider) { try { return $provider->getNode(); } catch (NodeException $exception) { diff --git a/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php index 51f1b02e..0f7536a8 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/StaticNodeProvider.php @@ -32,10 +32,7 @@ use const STR_PAD_LEFT; */ class StaticNodeProvider implements NodeProviderInterface { - /** - * @var Hexadecimal - */ - private $node; + private Hexadecimal $node; /** * @param Hexadecimal $node The static node value to use diff --git a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php index d512f22a..a03c93b4 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php @@ -27,8 +27,8 @@ use function ob_start; use function preg_match; use function preg_match_all; use function reset; +use function str_contains; use function str_replace; -use function strpos; use function strtolower; use function strtoupper; use function substr; @@ -100,12 +100,18 @@ class SystemNodeProvider implements NodeProviderInterface { $disabledFunctions = strtolower((string) ini_get('disable_functions')); - if (strpos($disabledFunctions, 'passthru') !== false) { + if (str_contains($disabledFunctions, 'passthru')) { return ''; } + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + ob_start(); - switch (strtoupper(substr(constant('PHP_OS'), 0, 3))) { + switch (strtoupper(substr($phpOs, 0, 3))) { case 'WIN': passthru('ipconfig /all 2>&1'); @@ -127,12 +133,15 @@ class SystemNodeProvider implements NodeProviderInterface $ifconfig = (string) ob_get_clean(); - $node = ''; if (preg_match_all(self::IFCONFIG_PATTERN, $ifconfig, $matches, PREG_PATTERN_ORDER)) { - $node = $matches[1][0] ?? ''; + foreach ($matches[1] as $iface) { + if ($iface !== '00:00:00:00:00:00' && $iface !== '00-00-00-00-00-00') { + return $iface; + } + } } - return $node; + return ''; } /** @@ -142,13 +151,20 @@ class SystemNodeProvider implements NodeProviderInterface { $mac = ''; - if (strtoupper(constant('PHP_OS')) === 'LINUX') { + /** + * @psalm-suppress UnnecessaryVarAnnotation + * @var string $phpOs + */ + $phpOs = constant('PHP_OS'); + + if (strtoupper($phpOs) === 'LINUX') { $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT); if ($addressPaths === false || count($addressPaths) === 0) { return ''; } + /** @var array $macs */ $macs = []; array_walk($addressPaths, function (string $addressPath) use (&$macs): void { @@ -157,7 +173,10 @@ class SystemNodeProvider implements NodeProviderInterface } }); - $macs = array_map('trim', $macs); + /** @var callable $trim */ + $trim = 'trim'; + + $macs = array_map($trim, $macs); // Remove invalid entries. $macs = array_filter($macs, function (string $address) { @@ -165,6 +184,7 @@ class SystemNodeProvider implements NodeProviderInterface && preg_match(self::SYSFS_PATTERN, $address); }); + /** @var string|bool $mac */ $mac = reset($macs); } diff --git a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php index b8bfd721..526c8ff4 100644 --- a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php @@ -19,21 +19,15 @@ use Ramsey\Uuid\Type\Integer as IntegerObject; use Ramsey\Uuid\Type\Time; /** - * FixedTimeProvider uses an known time to provide the time + * FixedTimeProvider uses a known time to provide the time * * This provider allows the use of a previously-generated, or known, time * when generating time-based UUIDs. */ class FixedTimeProvider implements TimeProviderInterface { - /** - * @var Time - */ - private $fixedTime; - - public function __construct(Time $time) + public function __construct(private Time $time) { - $this->fixedTime = $time; } /** @@ -43,7 +37,7 @@ class FixedTimeProvider implements TimeProviderInterface */ public function setUsec($value): void { - $this->fixedTime = new Time($this->fixedTime->getSeconds(), $value); + $this->time = new Time($this->time->getSeconds(), $value); } /** @@ -53,11 +47,11 @@ class FixedTimeProvider implements TimeProviderInterface */ public function setSec($value): void { - $this->fixedTime = new Time($value, $this->fixedTime->getMicroseconds()); + $this->time = new Time($value, $this->time->getMicroseconds()); } public function getTime(): Time { - return $this->fixedTime; + return $this->time; } } diff --git a/vendor/ramsey/uuid/src/Rfc4122/Fields.php b/vendor/ramsey/uuid/src/Rfc4122/Fields.php index 2ccc20bb..9acf810c 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/Fields.php +++ b/vendor/ramsey/uuid/src/Rfc4122/Fields.php @@ -40,16 +40,12 @@ use const STR_PAD_LEFT; */ final class Fields implements FieldsInterface { + use MaxTrait; use NilTrait; use SerializableFieldsTrait; use VariantTrait; use VersionTrait; - /** - * @var string - */ - private $bytes; - /** * @param string $bytes A 16-byte binary string representation of a UUID * @@ -57,17 +53,15 @@ final class Fields implements FieldsInterface * @throws InvalidArgumentException if the byte string does not represent an RFC 4122 UUID * @throws InvalidArgumentException if the byte string does not contain a valid version */ - public function __construct(string $bytes) + public function __construct(private string $bytes) { - if (strlen($bytes) !== 16) { + if (strlen($this->bytes) !== 16) { throw new InvalidArgumentException( 'The byte string must be 16 bytes long; ' - . 'received ' . strlen($bytes) . ' bytes' + . 'received ' . strlen($this->bytes) . ' bytes' ); } - $this->bytes = $bytes; - if (!$this->isCorrectVariant()) { throw new InvalidArgumentException( 'The byte string received does not conform to the RFC 4122 variant' @@ -88,7 +82,13 @@ final class Fields implements FieldsInterface public function getClockSeq(): Hexadecimal { - $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + if ($this->isMax()) { + $clockSeq = 0xffff; + } elseif ($this->isNil()) { + $clockSeq = 0x0000; + } else { + $clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff; + } return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT)); } @@ -140,52 +140,53 @@ final class Fields implements FieldsInterface */ public function getTimestamp(): Hexadecimal { - switch ($this->getVersion()) { - case Uuid::UUID_TYPE_DCE_SECURITY: - $timestamp = sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - '' - ); - - break; - case Uuid::UUID_TYPE_PEABODY: - $timestamp = sprintf( - '%08s%04s%03x', - $this->getTimeLow()->toString(), - $this->getTimeMid()->toString(), - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff - ); - - break; - default: - $timestamp = sprintf( - '%03x%04s%08s', - hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, - $this->getTimeMid()->toString(), - $this->getTimeLow()->toString() - ); - } + $timestamp = match ($this->getVersion()) { + Uuid::UUID_TYPE_DCE_SECURITY => sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + '' + ), + Uuid::UUID_TYPE_REORDERED_TIME => sprintf( + '%08s%04s%03x', + $this->getTimeLow()->toString(), + $this->getTimeMid()->toString(), + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff + ), + // The Unix timestamp in version 7 UUIDs is a 48-bit number, + // but for consistency, we will return a 60-bit number, padded + // to the left with zeros. + Uuid::UUID_TYPE_UNIX_TIME => sprintf( + '%011s%04s', + $this->getTimeLow()->toString(), + $this->getTimeMid()->toString(), + ), + default => sprintf( + '%03x%04s%08s', + hexdec($this->getTimeHiAndVersion()->toString()) & 0x0fff, + $this->getTimeMid()->toString(), + $this->getTimeLow()->toString() + ), + }; return new Hexadecimal($timestamp); } public function getVersion(): ?int { - if ($this->isNil()) { + if ($this->isNil() || $this->isMax()) { return null; } - /** @var array $parts */ + /** @var int[] $parts */ $parts = unpack('n*', $this->bytes); - return (int) $parts[4] >> 12; + return $parts[4] >> 12; } private function isCorrectVariant(): bool { - if ($this->isNil()) { + if ($this->isNil() || $this->isMax()) { return true; } diff --git a/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php b/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php index a303525d..2241cf57 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php +++ b/vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php @@ -103,11 +103,13 @@ interface FieldsInterface extends BaseFieldsInterface * The version number describes how the UUID was generated and has the * following meaning: * - * 1. Time-based UUID + * 1. Gregorian time UUID * 2. DCE security UUID * 3. Name-based UUID hashed with MD5 * 4. Randomly generated UUID * 5. Name-based UUID hashed with SHA-1 + * 6. Reordered time UUID + * 7. Unix Epoch time UUID * * This returns `null` if the UUID is not an RFC 4122 variant, since version * is only meaningful for this variant. diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php b/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php index 736931af..2c2677db 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php +++ b/vendor/ramsey/uuid/src/Rfc4122/UuidBuilder.php @@ -17,11 +17,13 @@ namespace Ramsey\Uuid\Rfc4122; use Ramsey\Uuid\Builder\UuidBuilderInterface; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; +use Ramsey\Uuid\Converter\Time\UnixTimeConverter; use Ramsey\Uuid\Converter\TimeConverterInterface; use Ramsey\Uuid\Exception\UnableToBuildUuidException; use Ramsey\Uuid\Exception\UnsupportedOperationException; -use Ramsey\Uuid\Nonstandard\UuidV6; +use Ramsey\Uuid\Math\BrickMathCalculator; use Ramsey\Uuid\Rfc4122\UuidInterface as Rfc4122UuidInterface; +use Ramsey\Uuid\Uuid; use Ramsey\Uuid\UuidInterface; use Throwable; @@ -32,15 +34,7 @@ use Throwable; */ class UuidBuilder implements UuidBuilderInterface { - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; + private TimeConverterInterface $unixTimeConverter; /** * Constructs the DefaultUuidBuilder @@ -48,14 +42,18 @@ class UuidBuilder implements UuidBuilderInterface * @param NumberConverterInterface $numberConverter The number converter to * use when constructing the Uuid * @param TimeConverterInterface $timeConverter The time converter to use - * for converting timestamps extracted from a UUID to Unix timestamps + * for converting Gregorian time extracted from version 1, 2, and 6 + * UUIDs to Unix timestamps + * @param TimeConverterInterface|null $unixTimeConverter The time converter + * to use for converter Unix Epoch time extracted from version 7 UUIDs + * to Unix timestamps */ public function __construct( - NumberConverterInterface $numberConverter, - TimeConverterInterface $timeConverter + private NumberConverterInterface $numberConverter, + private TimeConverterInterface $timeConverter, + ?TimeConverterInterface $unixTimeConverter = null ) { - $this->numberConverter = $numberConverter; - $this->timeConverter = $timeConverter; + $this->unixTimeConverter = $unixTimeConverter ?? new UnixTimeConverter(new BrickMathCalculator()); } /** @@ -71,25 +69,34 @@ class UuidBuilder implements UuidBuilderInterface public function build(CodecInterface $codec, string $bytes): UuidInterface { try { + /** @var Fields $fields */ $fields = $this->buildFields($bytes); if ($fields->isNil()) { return new NilUuid($fields, $this->numberConverter, $codec, $this->timeConverter); } + if ($fields->isMax()) { + return new MaxUuid($fields, $this->numberConverter, $codec, $this->timeConverter); + } + switch ($fields->getVersion()) { - case 1: + case Uuid::UUID_TYPE_TIME: return new UuidV1($fields, $this->numberConverter, $codec, $this->timeConverter); - case 2: + case Uuid::UUID_TYPE_DCE_SECURITY: return new UuidV2($fields, $this->numberConverter, $codec, $this->timeConverter); - case 3: + case Uuid::UUID_TYPE_HASH_MD5: return new UuidV3($fields, $this->numberConverter, $codec, $this->timeConverter); - case 4: + case Uuid::UUID_TYPE_RANDOM: return new UuidV4($fields, $this->numberConverter, $codec, $this->timeConverter); - case 5: + case Uuid::UUID_TYPE_HASH_SHA1: return new UuidV5($fields, $this->numberConverter, $codec, $this->timeConverter); - case 6: + case Uuid::UUID_TYPE_REORDERED_TIME: return new UuidV6($fields, $this->numberConverter, $codec, $this->timeConverter); + case Uuid::UUID_TYPE_UNIX_TIME: + return new UuidV7($fields, $this->numberConverter, $codec, $this->unixTimeConverter); + case Uuid::UUID_TYPE_CUSTOM: + return new UuidV8($fields, $this->numberConverter, $codec, $this->timeConverter); } throw new UnsupportedOperationException( diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php b/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php index 3e4d9fae..e80f33be 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php +++ b/vendor/ramsey/uuid/src/Rfc4122/UuidInterface.php @@ -26,11 +26,4 @@ use Ramsey\Uuid\UuidInterface as BaseUuidInterface; */ interface UuidInterface extends BaseUuidInterface { - /** - * Returns the string standard representation of the UUID as a URN - * - * @link http://en.wikipedia.org/wiki/Uniform_Resource_Name Uniform Resource Name - * @link https://tools.ietf.org/html/rfc4122#section-3 RFC 4122, § 3: Namespace Registration Template - */ - public function getUrn(): string; } diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php index 764e42f8..515c038d 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php +++ b/vendor/ramsey/uuid/src/Rfc4122/UuidV1.php @@ -14,31 +14,25 @@ declare(strict_types=1); namespace Ramsey\Uuid\Rfc4122; -use DateTimeImmutable; -use DateTimeInterface; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\DateTimeException; use Ramsey\Uuid\Exception\InvalidArgumentException; use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; use Ramsey\Uuid\Uuid; -use Throwable; - -use function str_pad; - -use const STR_PAD_LEFT; /** - * Time-based, or version 1, UUIDs include timestamp, clock sequence, and node + * Gregorian time, or version 1, UUIDs include timestamp, clock sequence, and node * values that are combined into a 128-bit unsigned integer * * @psalm-immutable */ final class UuidV1 extends Uuid implements UuidInterface { + use TimeTrait; + /** - * Creates a version 1 (time-based) UUID + * Creates a version 1 (Gregorian time) UUID * * @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID * @param NumberConverterInterface $numberConverter The number converter to use @@ -63,30 +57,4 @@ final class UuidV1 extends Uuid implements UuidInterface parent::__construct($fields, $numberConverter, $codec, $timeConverter); } - - /** - * Returns a DateTimeInterface object representing the timestamp associated - * with the UUID - * - * The timestamp value is only meaningful in a time-based UUID, which - * has version type 1. - * - * @return DateTimeImmutable A PHP DateTimeImmutable instance representing - * the timestamp of a version 1 UUID - */ - public function getDateTime(): DateTimeInterface - { - $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); - - try { - return new DateTimeImmutable( - '@' - . $time->getSeconds()->toString() - . '.' - . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) - ); - } catch (Throwable $e) { - throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); - } - } } diff --git a/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php b/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php index 74906f05..c8ccbe42 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php +++ b/vendor/ramsey/uuid/src/Rfc4122/UuidV2.php @@ -14,28 +14,33 @@ declare(strict_types=1); namespace Ramsey\Uuid\Rfc4122; -use DateTimeImmutable; -use DateTimeInterface; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Converter\TimeConverterInterface; -use Ramsey\Uuid\Exception\DateTimeException; use Ramsey\Uuid\Exception\InvalidArgumentException; use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; use Ramsey\Uuid\Type\Integer as IntegerObject; use Ramsey\Uuid\Uuid; -use Throwable; use function hexdec; -use function str_pad; - -use const STR_PAD_LEFT; /** * DCE Security version, or version 2, UUIDs include local domain identifier, * local ID for the specified domain, and node values that are combined into a * 128-bit unsigned integer * + * It is important to note that a version 2 UUID suffers from some loss of + * fidelity of the timestamp, due to replacing the time_low field with the + * local identifier. When constructing the timestamp value for date + * purposes, we replace the local identifier bits with zeros. As a result, + * the timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 + * minutes, 9 seconds, and 496730 microseconds). + * + * Astute observers might note this value directly corresponds to 2^32 - 1, + * or 0xffffffff. The local identifier is 32-bits, and we have set each of + * these bits to 0, so the maximum range of timestamp drift is 0x00000000 + * to 0xffffffff (counted in 100-nanosecond intervals). + * * @link https://publications.opengroup.org/c311 DCE 1.1: Authentication and Security Services * @link https://publications.opengroup.org/c706 DCE 1.1: Remote Procedure Call * @link https://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01 DCE 1.1: Auth & Sec, §5.2.1.1 @@ -47,6 +52,8 @@ use const STR_PAD_LEFT; */ final class UuidV2 extends Uuid implements UuidInterface { + use TimeTrait; + /** * Creates a version 2 (DCE Security) UUID * @@ -74,41 +81,6 @@ final class UuidV2 extends Uuid implements UuidInterface parent::__construct($fields, $numberConverter, $codec, $timeConverter); } - /** - * Returns a DateTimeInterface object representing the timestamp associated - * with the UUID - * - * It is important to note that a version 2 UUID suffers from some loss of - * fidelity of the timestamp, due to replacing the time_low field with the - * local identifier. When constructing the timestamp value for date - * purposes, we replace the local identifier bits with zeros. As a result, - * the timestamp can be off by a range of 0 to 429.4967295 seconds (or 7 - * minutes, 9 seconds, and 496730 microseconds). - * - * Astute observers might note this value directly corresponds to 2^32 - 1, - * or 0xffffffff. The local identifier is 32-bits, and we have set each of - * these bits to 0, so the maximum range of timestamp drift is 0x00000000 - * to 0xffffffff (counted in 100-nanosecond intervals). - * - * @return DateTimeImmutable A PHP DateTimeImmutable instance representing - * the timestamp of a version 2 UUID - */ - public function getDateTime(): DateTimeInterface - { - $time = $this->timeConverter->convertTime($this->fields->getTimestamp()); - - try { - return new DateTimeImmutable( - '@' - . $time->getSeconds()->toString() - . '.' - . str_pad($time->getMicroseconds()->toString(), 6, '0', STR_PAD_LEFT) - ); - } catch (Throwable $e) { - throw new DateTimeException($e->getMessage(), (int) $e->getCode(), $e); - } - } - /** * Returns the local domain used to create this version 2 UUID */ diff --git a/vendor/ramsey/uuid/src/Rfc4122/Validator.php b/vendor/ramsey/uuid/src/Rfc4122/Validator.php index ed43c982..e82a11e6 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/Validator.php +++ b/vendor/ramsey/uuid/src/Rfc4122/Validator.php @@ -28,7 +28,7 @@ use function str_replace; final class Validator implements ValidatorInterface { private const VALID_PATTERN = '\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-' - . '[1-5]{1}[0-9A-Fa-f]{3}-[ABab89]{1}[0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\z'; + . '[1-8][0-9A-Fa-f]{3}-[ABab89][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}\z'; /** * @psalm-return non-empty-string @@ -43,7 +43,8 @@ final class Validator implements ValidatorInterface public function validate(string $uuid): bool { $uuid = str_replace(['urn:', 'uuid:', 'URN:', 'UUID:', '{', '}'], '', $uuid); + $uuid = strtolower($uuid); - return $uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); + return $uuid === Uuid::NIL || $uuid === Uuid::MAX || preg_match('/' . self::VALID_PATTERN . '/Dms', $uuid); } } diff --git a/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php b/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php index 4c981658..1041de51 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php +++ b/vendor/ramsey/uuid/src/Rfc4122/VariantTrait.php @@ -19,8 +19,8 @@ use Ramsey\Uuid\Uuid; use function decbin; use function str_pad; +use function str_starts_with; use function strlen; -use function strpos; use function substr; use function unpack; @@ -58,7 +58,13 @@ trait VariantTrait throw new InvalidBytesException('Invalid number of bytes'); } - /** @var array $parts */ + if ($this->isMax() || $this->isNil()) { + // RFC 4122 defines these special types of UUID, so we will consider + // them as belonging to the RFC 4122 variant. + return Uuid::RFC_4122; + } + + /** @var int[] $parts */ $parts = unpack('n*', $this->getBytes()); // $parts[5] is a 16-bit, unsigned integer containing the variant bits @@ -67,7 +73,7 @@ trait VariantTrait // three characters (three most-significant bits) to determine the // variant. $binary = str_pad( - decbin((int) $parts[5]), + decbin($parts[5]), 16, '0', STR_PAD_LEFT @@ -76,15 +82,13 @@ trait VariantTrait $msb = substr($binary, 0, 3); if ($msb === '111') { - $variant = Uuid::RESERVED_FUTURE; + return Uuid::RESERVED_FUTURE; } elseif ($msb === '110') { - $variant = Uuid::RESERVED_MICROSOFT; - } elseif (strpos($msb, '10') === 0) { - $variant = Uuid::RFC_4122; - } else { - $variant = Uuid::RESERVED_NCS; + return Uuid::RESERVED_MICROSOFT; + } elseif (str_starts_with($msb, '10')) { + return Uuid::RFC_4122; } - return $variant; + return Uuid::RESERVED_NCS; } } diff --git a/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php b/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php index cee55fbe..0195e46c 100644 --- a/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php +++ b/vendor/ramsey/uuid/src/Rfc4122/VersionTrait.php @@ -14,6 +14,8 @@ declare(strict_types=1); namespace Ramsey\Uuid\Rfc4122; +use Ramsey\Uuid\Uuid; + /** * Provides common functionality for handling the version, as defined by RFC 4122 * @@ -26,6 +28,11 @@ trait VersionTrait */ abstract public function getVersion(): ?int; + /** + * Returns true if these fields represent a max UUID + */ + abstract public function isMax(): bool; + /** * Returns true if these fields represent a nil UUID */ @@ -38,20 +45,16 @@ trait VersionTrait */ private function isCorrectVersion(): bool { - if ($this->isNil()) { + if ($this->isNil() || $this->isMax()) { return true; } - switch ($this->getVersion()) { - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - return true; - } - - return false; + return match ($this->getVersion()) { + Uuid::UUID_TYPE_TIME, Uuid::UUID_TYPE_DCE_SECURITY, + Uuid::UUID_TYPE_HASH_MD5, Uuid::UUID_TYPE_RANDOM, + Uuid::UUID_TYPE_HASH_SHA1, Uuid::UUID_TYPE_REORDERED_TIME, + Uuid::UUID_TYPE_UNIX_TIME, Uuid::UUID_TYPE_CUSTOM => true, + default => false, + }; } } diff --git a/vendor/ramsey/uuid/src/Type/Decimal.php b/vendor/ramsey/uuid/src/Type/Decimal.php index 10f93845..acc5e754 100644 --- a/vendor/ramsey/uuid/src/Type/Decimal.php +++ b/vendor/ramsey/uuid/src/Type/Decimal.php @@ -19,6 +19,7 @@ use ValueError; use function is_numeric; use function sprintf; +use function str_starts_with; /** * A value object representing a decimal @@ -34,20 +35,10 @@ use function sprintf; */ final class Decimal implements NumberInterface { - /** - * @var string - */ - private $value; + private string $value; + private bool $isNegative = false; - /** - * @var bool - */ - private $isNegative = false; - - /** - * @param mixed $value The decimal value to store - */ - public function __construct($value) + public function __construct(float | int | string | self $value) { $value = (string) $value; @@ -59,7 +50,7 @@ final class Decimal implements NumberInterface } // Remove the leading +-symbol. - if (strpos($value, '+') === 0) { + if (str_starts_with($value, '+')) { $value = substr($value, 1); } @@ -68,7 +59,7 @@ final class Decimal implements NumberInterface $value = '0'; } - if (strpos($value, '-') === 0) { + if (str_starts_with($value, '-')) { $this->isNegative = true; } @@ -111,18 +102,19 @@ final class Decimal implements NumberInterface /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - $this->__construct($serialized); + $this->__construct($data); } /** - * @param array{string: string} $data + * @param array{string?: string} $data + * + * @psalm-suppress UnusedMethodCall */ public function __unserialize(array $data): void { diff --git a/vendor/ramsey/uuid/src/Type/Hexadecimal.php b/vendor/ramsey/uuid/src/Type/Hexadecimal.php index 88adc2e7..bf71ec4b 100644 --- a/vendor/ramsey/uuid/src/Type/Hexadecimal.php +++ b/vendor/ramsey/uuid/src/Type/Hexadecimal.php @@ -17,10 +17,8 @@ namespace Ramsey\Uuid\Type; use Ramsey\Uuid\Exception\InvalidArgumentException; use ValueError; -use function ctype_xdigit; +use function preg_match; use function sprintf; -use function strpos; -use function strtolower; use function substr; /** @@ -34,29 +32,14 @@ use function substr; */ final class Hexadecimal implements TypeInterface { - /** - * @var string - */ - private $value; + private string $value; /** - * @param string $value The hexadecimal value to store + * @param self|string $value The hexadecimal value to store */ - public function __construct(string $value) + public function __construct(self | string $value) { - $value = strtolower($value); - - if (strpos($value, '0x') === 0) { - $value = substr($value, 2); - } - - if (!ctype_xdigit($value)) { - throw new InvalidArgumentException( - 'Value must be a hexadecimal number' - ); - } - - $this->value = $value; + $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); } public function toString(): string @@ -90,18 +73,17 @@ final class Hexadecimal implements TypeInterface /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - $this->__construct($serialized); + $this->__construct($data); } /** - * @param array{string: string} $data + * @param array{string?: string} $data */ public function __unserialize(array $data): void { @@ -113,4 +95,21 @@ final class Hexadecimal implements TypeInterface $this->unserialize($data['string']); } + + private function prepareValue(string $value): string + { + $value = strtolower($value); + + if (str_starts_with($value, '0x')) { + $value = substr($value, 2); + } + + if (!preg_match('/^[A-Fa-f0-9]+$/', $value)) { + throw new InvalidArgumentException( + 'Value must be a hexadecimal number' + ); + } + + return $value; + } } diff --git a/vendor/ramsey/uuid/src/Type/Integer.php b/vendor/ramsey/uuid/src/Type/Integer.php index 7690f6cd..50dac993 100644 --- a/vendor/ramsey/uuid/src/Type/Integer.php +++ b/vendor/ramsey/uuid/src/Type/Integer.php @@ -17,10 +17,10 @@ namespace Ramsey\Uuid\Type; use Ramsey\Uuid\Exception\InvalidArgumentException; use ValueError; -use function ctype_digit; -use function ltrim; +use function assert; +use function is_numeric; +use function preg_match; use function sprintf; -use function strpos; use function substr; /** @@ -40,52 +40,13 @@ final class Integer implements NumberInterface /** * @psalm-var numeric-string */ - private $value; + private string $value; - /** - * @var bool - */ - private $isNegative = false; + private bool $isNegative = false; - /** - * @param mixed $value The integer value to store - */ - public function __construct($value) + public function __construct(float | int | string | self $value) { - $value = (string) $value; - $sign = '+'; - - // If the value contains a sign, remove it for ctype_digit() check. - if (strpos($value, '-') === 0 || strpos($value, '+') === 0) { - $sign = substr($value, 0, 1); - $value = substr($value, 1); - } - - if (!ctype_digit($value)) { - throw new InvalidArgumentException( - 'Value must be a signed integer or a string containing only ' - . 'digits 0-9 and, optionally, a sign (+ or -)' - ); - } - - // Trim any leading zeros. - $value = ltrim($value, '0'); - - // Set to zero if the string is empty after trimming zeros. - if ($value === '') { - $value = '0'; - } - - // Add the negative sign back to the value. - if ($sign === '-' && $value !== '0') { - $value = $sign . $value; - $this->isNegative = true; - } - - /** @psalm-var numeric-string $numericValue */ - $numericValue = $value; - - $this->value = $numericValue; + $this->value = $value instanceof self ? (string) $value : $this->prepareValue($value); } public function isNegative(): bool @@ -101,6 +62,9 @@ final class Integer implements NumberInterface return $this->value; } + /** + * @psalm-return numeric-string + */ public function __toString(): string { return $this->toString(); @@ -127,18 +91,17 @@ final class Integer implements NumberInterface /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - $this->__construct($serialized); + $this->__construct($data); } /** - * @param array{string: string} $data + * @param array{string?: string} $data */ public function __unserialize(array $data): void { @@ -150,4 +113,46 @@ final class Integer implements NumberInterface $this->unserialize($data['string']); } + + /** + * @return numeric-string + */ + private function prepareValue(float | int | string $value): string + { + $value = (string) $value; + $sign = '+'; + + // If the value contains a sign, remove it for digit pattern check. + if (str_starts_with($value, '-') || str_starts_with($value, '+')) { + $sign = substr($value, 0, 1); + $value = substr($value, 1); + } + + if (!preg_match('/^\d+$/', $value)) { + throw new InvalidArgumentException( + 'Value must be a signed integer or a string containing only ' + . 'digits 0-9 and, optionally, a sign (+ or -)' + ); + } + + // Trim any leading zeros. + $value = ltrim($value, '0'); + + // Set to zero if the string is empty after trimming zeros. + if ($value === '') { + $value = '0'; + } + + // Add the negative sign back to the value. + if ($sign === '-' && $value !== '0') { + $value = $sign . $value; + + /** @psalm-suppress InaccessibleProperty */ + $this->isNegative = true; + } + + assert(is_numeric($value)); + + return $value; + } } diff --git a/vendor/ramsey/uuid/src/Type/Time.php b/vendor/ramsey/uuid/src/Type/Time.php index dd1b8bc2..0cedb447 100644 --- a/vendor/ramsey/uuid/src/Type/Time.php +++ b/vendor/ramsey/uuid/src/Type/Time.php @@ -17,7 +17,6 @@ namespace Ramsey\Uuid\Type; use Ramsey\Uuid\Exception\UnsupportedOperationException; use Ramsey\Uuid\Type\Integer as IntegerObject; use ValueError; -use stdClass; use function json_decode; use function json_encode; @@ -34,22 +33,13 @@ use function sprintf; */ final class Time implements TypeInterface { - /** - * @var IntegerObject - */ - private $seconds; + private IntegerObject $seconds; + private IntegerObject $microseconds; - /** - * @var IntegerObject - */ - private $microseconds; - - /** - * @param mixed $seconds - * @param mixed $microseconds - */ - public function __construct($seconds, $microseconds = 0) - { + public function __construct( + float | int | string | IntegerObject $seconds, + float | int | string | IntegerObject $microseconds = 0, + ) { $this->seconds = new IntegerObject($seconds); $this->microseconds = new IntegerObject($microseconds); } @@ -66,7 +56,7 @@ final class Time implements TypeInterface public function toString(): string { - return $this->seconds->toString() . '.' . $this->microseconds->toString(); + return $this->seconds->toString() . '.' . sprintf('%06s', $this->microseconds->toString()); } public function __toString(): string @@ -104,27 +94,26 @@ final class Time implements TypeInterface /** * Constructs the object from a serialized string representation * - * @param string $serialized The serialized string representation of the object + * @param string $data The serialized string representation of the object * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint * @psalm-suppress UnusedMethodCall */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - /** @var stdClass $time */ - $time = json_decode($serialized); + /** @var array{seconds?: int|float|string, microseconds?: int|float|string} $time */ + $time = json_decode($data, true); - if (!isset($time->seconds) || !isset($time->microseconds)) { + if (!isset($time['seconds']) || !isset($time['microseconds'])) { throw new UnsupportedOperationException( 'Attempted to unserialize an invalid value' ); } - $this->__construct($time->seconds, $time->microseconds); + $this->__construct($time['seconds'], $time['microseconds']); } /** - * @param array{seconds: string, microseconds: string} $data + * @param array{seconds?: string, microseconds?: string} $data */ public function __unserialize(array $data): void { diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php index 5f0922b9..e0384a50 100644 --- a/vendor/ramsey/uuid/src/Uuid.php +++ b/vendor/ramsey/uuid/src/Uuid.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Ramsey\Uuid; +use BadMethodCallException; use DateTimeInterface; use Ramsey\Uuid\Codec\CodecInterface; use Ramsey\Uuid\Converter\NumberConverterInterface; use Ramsey\Uuid\Converter\TimeConverterInterface; +use Ramsey\Uuid\Exception\UnsupportedOperationException; use Ramsey\Uuid\Fields\FieldsInterface; use Ramsey\Uuid\Lazy\LazyUuidFromString; use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface; @@ -27,6 +29,7 @@ use ValueError; use function assert; use function bin2hex; +use function method_exists; use function preg_match; use function sprintf; use function str_replace; @@ -82,6 +85,14 @@ class Uuid implements UuidInterface */ public const NIL = '00000000-0000-0000-0000-000000000000'; + /** + * The max UUID is a special form of UUID that is specified to have all 128 + * bits set to one + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.10 Max UUID + */ + public const MAX = 'ffffffff-ffff-ffff-ffff-ffffffffffff'; + /** * Variant: reserved, NCS backward compatibility * @@ -116,7 +127,7 @@ class Uuid implements UuidInterface public const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'; /** - * Version 1 (time-based) UUID + * Version 1 (Gregorian time) UUID * * @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version */ @@ -156,16 +167,29 @@ class Uuid implements UuidInterface public const UUID_TYPE_HASH_SHA1 = 5; /** - * Version 6 (ordered-time) UUID - * - * This is named `UUID_TYPE_PEABODY`, since the specification is still in - * draft form, and the primary author/editor's name is Brad Peabody. - * - * @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft - * @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs + * @deprecated Use {@see Uuid::UUID_TYPE_REORDERED_TIME} instead. */ public const UUID_TYPE_PEABODY = 6; + /** + * Version 6 (reordered time) UUID + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.6 UUID Version 6 + */ + public const UUID_TYPE_REORDERED_TIME = 6; + + /** + * Version 7 (Unix Epoch time) UUID + * + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.7 UUID Version 7 + */ + public const UUID_TYPE_UNIX_TIME = 7; + + /** + * @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.8 UUID Version 8 + */ + public const UUID_TYPE_CUSTOM = 8; + /** * DCE Security principal domain * @@ -198,38 +222,19 @@ class Uuid implements UuidInterface self::DCE_DOMAIN_ORG => 'org', ]; - /** - * @var UuidFactoryInterface|null - */ - private static $factory = null; + private static ?UuidFactoryInterface $factory = null; /** - * @var bool flag to detect if the UUID factory was replaced internally, which disables all optimizations - * for the default/happy path internal scenarios + * @var bool flag to detect if the UUID factory was replaced internally, + * which disables all optimizations for the default/happy path internal + * scenarios */ - private static $factoryReplaced = false; + private static bool $factoryReplaced = false; - /** - * @var CodecInterface - */ - protected $codec; - - /** - * The fields that make up this UUID - * - * @var Rfc4122FieldsInterface - */ - protected $fields; - - /** - * @var NumberConverterInterface - */ - protected $numberConverter; - - /** - * @var TimeConverterInterface - */ - protected $timeConverter; + protected CodecInterface $codec; + protected NumberConverterInterface $numberConverter; + protected Rfc4122FieldsInterface $fields; + protected TimeConverterInterface $timeConverter; /** * Creates a universally unique identifier (UUID) from an array of fields @@ -288,7 +293,7 @@ class Uuid implements UuidInterface */ public function serialize(): string { - return $this->getFields()->getBytes(); + return $this->codec->encode($this); } /** @@ -302,19 +307,17 @@ class Uuid implements UuidInterface /** * Re-constructs the object from its serialized form * - * @param string $serialized The serialized PHP string to unserialize into + * @param string $data The serialized PHP string to unserialize into * a UuidInterface instance - * - * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint */ - public function unserialize($serialized): void + public function unserialize(string $data): void { - if (strlen($serialized) === 16) { + if (strlen($data) === 16) { /** @var Uuid $uuid */ - $uuid = self::getFactory()->fromBytes($serialized); + $uuid = self::getFactory()->fromBytes($data); } else { /** @var Uuid $uuid */ - $uuid = self::getFactory()->fromString($serialized); + $uuid = self::getFactory()->fromString($data); } $this->codec = $uuid->codec; @@ -324,7 +327,7 @@ class Uuid implements UuidInterface } /** - * @param array{bytes: string} $data + * @param array{bytes?: string} $data */ public function __unserialize(array $data): void { @@ -384,6 +387,11 @@ class Uuid implements UuidInterface return new IntegerObject($this->numberConverter->fromHex($this->getHex()->toString())); } + public function getUrn(): string + { + return 'urn:uuid:' . $this->toString(); + } + /** * @psalm-return non-empty-string */ @@ -438,20 +446,20 @@ class Uuid implements UuidInterface */ public static function fromBytes(string $bytes): UuidInterface { - if (! self::$factoryReplaced && strlen($bytes) === 16) { + if (!self::$factoryReplaced && strlen($bytes) === 16) { $base16Uuid = bin2hex($bytes); // Note: we are calling `fromString` internally because we don't know if the given `$bytes` is a valid UUID return self::fromString( substr($base16Uuid, 0, 8) - . '-' - . substr($base16Uuid, 8, 4) - . '-' - . substr($base16Uuid, 12, 4) - . '-' - . substr($base16Uuid, 16, 4) - . '-' - . substr($base16Uuid, 20, 12) + . '-' + . substr($base16Uuid, 8, 4) + . '-' + . substr($base16Uuid, 12, 4) + . '-' + . substr($base16Uuid, 16, 4) + . '-' + . substr($base16Uuid, 20, 12) ); } @@ -477,7 +485,7 @@ class Uuid implements UuidInterface public static function fromString(string $uuid): UuidInterface { $uuid = strtolower($uuid); - if (! self::$factoryReplaced && preg_match(LazyUuidFromString::VALID_REGEX, $uuid) === 1) { + if (!self::$factoryReplaced && preg_match(LazyUuidFromString::VALID_REGEX, $uuid) === 1) { assert($uuid !== ''); return new LazyUuidFromString($uuid); @@ -507,6 +515,33 @@ class Uuid implements UuidInterface return self::getFactory()->fromDateTime($dateTime, $node, $clockSeq); } + /** + * Creates a UUID from the Hexadecimal object + * + * @param Hexadecimal $hex Hexadecimal object representing a hexadecimal number + * + * @return UuidInterface A UuidInterface instance created from the Hexadecimal + * object representing a hexadecimal number + * + * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, + * but under constant factory setups, this method operates in functionally pure manners + * @psalm-suppress MixedInferredReturnType,MixedReturnStatement + */ + public static function fromHexadecimal(Hexadecimal $hex): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'fromHexadecimal')) { + /** + * @phpstan-ignore-next-line + * @psalm-suppress UndefinedInterfaceMethod + */ + return self::getFactory()->fromHexadecimal($hex); + } + + throw new BadMethodCallException('The method fromHexadecimal() does not exist on the provided factory'); + } + /** * Creates a UUID from a 128-bit integer string * @@ -520,6 +555,7 @@ class Uuid implements UuidInterface */ public static function fromInteger(string $integer): UuidInterface { + /** @psalm-suppress ImpureMethodCall */ return self::getFactory()->fromInteger($integer); } @@ -532,20 +568,23 @@ class Uuid implements UuidInterface * * @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants, * but under constant factory setups, this method operates in functionally pure manners + * + * @psalm-assert-if-true =non-empty-string $uuid */ public static function isValid(string $uuid): bool { + /** @psalm-suppress ImpureMethodCall */ return self::getFactory()->getValidator()->validate($uuid); } /** - * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|int|string|null $node A 48-bit number representing the * hardware address; this number may be represented as an integer or a * hexadecimal string - * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes * @@ -644,12 +683,12 @@ class Uuid implements UuidInterface } /** - * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|null $node A 48-bit number representing the hardware * address - * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes * @@ -662,4 +701,58 @@ class Uuid implements UuidInterface ): UuidInterface { return self::getFactory()->uuid6($node, $clockSeq); } + + /** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 7 UUID + */ + public static function uuid7(?DateTimeInterface $dateTime = null): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'uuid7')) { + /** @var UuidInterface */ + return $factory->uuid7($dateTime); + } + + throw new UnsupportedOperationException( + 'The provided factory does not support the uuid7() method', + ); + } + + /** + * Returns a version 8 (custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 8 UUID + */ + public static function uuid8(string $bytes): UuidInterface + { + $factory = self::getFactory(); + + if (method_exists($factory, 'uuid8')) { + /** @var UuidInterface */ + return $factory->uuid8($bytes); + } + + throw new UnsupportedOperationException( + 'The provided factory does not support the uuid8() method', + ); + } } diff --git a/vendor/ramsey/uuid/src/UuidFactory.php b/vendor/ramsey/uuid/src/UuidFactory.php index 6f2cea06..1b06ea6e 100644 --- a/vendor/ramsey/uuid/src/UuidFactory.php +++ b/vendor/ramsey/uuid/src/UuidFactory.php @@ -24,6 +24,7 @@ use Ramsey\Uuid\Generator\DefaultTimeGenerator; use Ramsey\Uuid\Generator\NameGeneratorInterface; use Ramsey\Uuid\Generator\RandomGeneratorInterface; use Ramsey\Uuid\Generator\TimeGeneratorInterface; +use Ramsey\Uuid\Generator\UnixTimeGenerator; use Ramsey\Uuid\Lazy\LazyUuidFromString; use Ramsey\Uuid\Provider\NodeProviderInterface; use Ramsey\Uuid\Provider\Time\FixedTimeProvider; @@ -45,61 +46,26 @@ use const STR_PAD_LEFT; class UuidFactory implements UuidFactoryInterface { + private CodecInterface $codec; + private DceSecurityGeneratorInterface $dceSecurityGenerator; + private NameGeneratorInterface $nameGenerator; + private NodeProviderInterface $nodeProvider; + private NumberConverterInterface $numberConverter; + private RandomGeneratorInterface $randomGenerator; + private TimeConverterInterface $timeConverter; + private TimeGeneratorInterface $timeGenerator; + private TimeGeneratorInterface $unixTimeGenerator; + private UuidBuilderInterface $uuidBuilder; + private ValidatorInterface $validator; + /** - * @var CodecInterface + * @var bool whether the feature set was provided from outside, or we can + * operate under "default" assumptions */ - private $codec; + private bool $isDefaultFeatureSet; /** - * @var DceSecurityGeneratorInterface - */ - private $dceSecurityGenerator; - - /** - * @var NameGeneratorInterface - */ - private $nameGenerator; - - /** - * @var NodeProviderInterface - */ - private $nodeProvider; - - /** - * @var NumberConverterInterface - */ - private $numberConverter; - - /** - * @var RandomGeneratorInterface - */ - private $randomGenerator; - - /** - * @var TimeConverterInterface - */ - private $timeConverter; - - /** - * @var TimeGeneratorInterface - */ - private $timeGenerator; - - /** - * @var UuidBuilderInterface - */ - private $uuidBuilder; - - /** - * @var ValidatorInterface - */ - private $validator; - - /** @var bool whether the feature set was provided from outside, or we can operate under "default" assumptions */ - private $isDefaultFeatureSet; - - /** - * @param FeatureSet $features A set of available features in the current environment + * @param FeatureSet|null $features A set of available features in the current environment */ public function __construct(?FeatureSet $features = null) { @@ -117,6 +83,7 @@ class UuidFactory implements UuidFactoryInterface $this->timeGenerator = $features->getTimeGenerator(); $this->uuidBuilder = $features->getBuilder(); $this->validator = $features->getValidator(); + $this->unixTimeGenerator = $features->getUnixTimeGenerator(); } /** @@ -342,7 +309,15 @@ class UuidFactory implements UuidFactoryInterface $bytes = $timeGenerator->generate($nodeHex, $clockSeq); - return $this->uuidFromBytesAndVersion($bytes, 1); + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); + } + + /** + * @psalm-pure + */ + public function fromHexadecimal(Hexadecimal $hex): UuidInterface + { + return $this->codec->decode($hex->__toString()); } /** @@ -352,7 +327,7 @@ class UuidFactory implements UuidFactoryInterface { $bytes = $this->timeGenerator->generate($node, $clockSeq); - return $this->uuidFromBytesAndVersion($bytes, 1); + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_TIME); } public function uuid2( @@ -368,7 +343,7 @@ class UuidFactory implements UuidFactoryInterface $clockSeq ); - return $this->uuidFromBytesAndVersion($bytes, 2); + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_DCE_SECURITY); } /** @@ -377,14 +352,14 @@ class UuidFactory implements UuidFactoryInterface */ public function uuid3($ns, string $name): UuidInterface { - return $this->uuidFromNsAndName($ns, $name, 3, 'md5'); + return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_MD5, 'md5'); } public function uuid4(): UuidInterface { $bytes = $this->randomGenerator->generate(16); - return $this->uuidFromBytesAndVersion($bytes, 4); + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_RANDOM); } /** @@ -393,7 +368,7 @@ class UuidFactory implements UuidFactoryInterface */ public function uuid5($ns, string $name): UuidInterface { - return $this->uuidFromNsAndName($ns, $name, 5, 'sha1'); + return $this->uuidFromNsAndName($ns, $name, Uuid::UUID_TYPE_HASH_SHA1, 'sha1'); } public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface @@ -412,7 +387,46 @@ class UuidFactory implements UuidFactoryInterface $v6Bytes = hex2bin(substr($v6, 1, 12) . '0' . substr($v6, -3)); $v6Bytes .= substr($bytes, 8); - return $this->uuidFromBytesAndVersion($v6Bytes, 6); + return $this->uuidFromBytesAndVersion($v6Bytes, Uuid::UUID_TYPE_REORDERED_TIME); + } + + /** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 7 UUID + */ + public function uuid7(?DateTimeInterface $dateTime = null): UuidInterface + { + assert($this->unixTimeGenerator instanceof UnixTimeGenerator); + $bytes = $this->unixTimeGenerator->generate(null, null, $dateTime); + + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_UNIX_TIME); + } + + /** + * Returns a version 8 (Custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return UuidInterface A UuidInterface instance that represents a + * version 8 UUID + */ + public function uuid8(string $bytes): UuidInterface + { + return $this->uuidFromBytesAndVersion($bytes, Uuid::UUID_TYPE_CUSTOM); } /** @@ -430,6 +444,7 @@ class UuidFactory implements UuidFactoryInterface */ public function uuid(string $bytes): UuidInterface { + /** @psalm-suppress ImpurePropertyFetch */ return $this->uuidBuilder->build($this->codec, $bytes); } @@ -447,8 +462,12 @@ class UuidFactory implements UuidFactoryInterface * * @psalm-pure */ - private function uuidFromNsAndName($ns, string $name, int $version, string $hashAlgorithm): UuidInterface - { + private function uuidFromNsAndName( + UuidInterface | string $ns, + string $name, + int $version, + string $hashAlgorithm + ): UuidInterface { if (!($ns instanceof UuidInterface)) { $ns = $this->fromString($ns); } @@ -488,6 +507,7 @@ class UuidFactory implements UuidFactoryInterface return LazyUuidFromString::fromBytes($bytes); } + /** @psalm-suppress ImpureVariable */ return $this->uuid($bytes); } } diff --git a/vendor/ramsey/uuid/src/UuidFactoryInterface.php b/vendor/ramsey/uuid/src/UuidFactoryInterface.php index 468cc637..d99fc9d5 100644 --- a/vendor/ramsey/uuid/src/UuidFactoryInterface.php +++ b/vendor/ramsey/uuid/src/UuidFactoryInterface.php @@ -25,6 +25,61 @@ use Ramsey\Uuid\Validator\ValidatorInterface; */ interface UuidFactoryInterface { + /** + * Creates a UUID from a byte string + * + * @param string $bytes A binary string + * + * @return UuidInterface A UuidInterface instance created from a binary + * string representation + * + * @psalm-pure + */ + public function fromBytes(string $bytes): UuidInterface; + + /** + * Creates a UUID from a DateTimeInterface instance + * + * @param DateTimeInterface $dateTime The date and time + * @param Hexadecimal|null $node A 48-bit number representing the hardware + * address + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates + * that could arise when the clock is set backwards in time or if the + * node ID changes + * + * @return UuidInterface A UuidInterface instance that represents a + * version 1 UUID created from a DateTimeInterface instance + */ + public function fromDateTime( + DateTimeInterface $dateTime, + ?Hexadecimal $node = null, + ?int $clockSeq = null + ): UuidInterface; + + /** + * Creates a UUID from a 128-bit integer string + * + * @param string $integer String representation of 128-bit integer + * + * @return UuidInterface A UuidInterface instance created from the string + * representation of a 128-bit integer + * + * @psalm-pure + */ + public function fromInteger(string $integer): UuidInterface; + + /** + * Creates a UUID from the string standard representation + * + * @param string $uuid A hexadecimal string + * + * @return UuidInterface A UuidInterface instance created from a hexadecimal + * string representation + * + * @psalm-pure + */ + public function fromString(string $uuid): UuidInterface; + /** * Returns the validator to use for the factory * @@ -33,7 +88,7 @@ interface UuidFactoryInterface public function getValidator(): ValidatorInterface; /** - * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|int|string|null $node A 48-bit number representing the @@ -111,7 +166,7 @@ interface UuidFactoryInterface public function uuid5($ns, string $name): UuidInterface; /** - * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|null $node A 48-bit number representing the hardware @@ -124,59 +179,4 @@ interface UuidFactoryInterface * version 6 UUID */ public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface; - - /** - * Creates a UUID from a byte string - * - * @param string $bytes A binary string - * - * @return UuidInterface A UuidInterface instance created from a binary - * string representation - * - * @psalm-pure - */ - public function fromBytes(string $bytes): UuidInterface; - - /** - * Creates a UUID from the string standard representation - * - * @param string $uuid A hexadecimal string - * - * @return UuidInterface A UuidInterface instance created from a hexadecimal - * string representation - * - * @psalm-pure - */ - public function fromString(string $uuid): UuidInterface; - - /** - * Creates a UUID from a 128-bit integer string - * - * @param string $integer String representation of 128-bit integer - * - * @return UuidInterface A UuidInterface instance created from the string - * representation of a 128-bit integer - * - * @psalm-pure - */ - public function fromInteger(string $integer): UuidInterface; - - /** - * Creates a UUID from a DateTimeInterface instance - * - * @param DateTimeInterface $dateTime The date and time - * @param Hexadecimal|null $node A 48-bit number representing the hardware - * address - * @param int|null $clockSeq A 14-bit number used to help avoid duplicates - * that could arise when the clock is set backwards in time or if the - * node ID changes - * - * @return UuidInterface A UuidInterface instance that represents a - * version 1 UUID created from a DateTimeInterface instance - */ - public function fromDateTime( - DateTimeInterface $dateTime, - ?Hexadecimal $node = null, - ?int $clockSeq = null - ): UuidInterface; } diff --git a/vendor/ramsey/uuid/src/UuidInterface.php b/vendor/ramsey/uuid/src/UuidInterface.php index f22eb0f9..cac9457d 100644 --- a/vendor/ramsey/uuid/src/UuidInterface.php +++ b/vendor/ramsey/uuid/src/UuidInterface.php @@ -19,6 +19,7 @@ use Ramsey\Uuid\Fields\FieldsInterface; use Ramsey\Uuid\Type\Hexadecimal; use Ramsey\Uuid\Type\Integer as IntegerObject; use Serializable; +use Stringable; /** * A UUID is a universally unique identifier adhering to an agreed-upon @@ -29,7 +30,8 @@ use Serializable; interface UuidInterface extends DeprecatedUuidInterface, JsonSerializable, - Serializable + Serializable, + Stringable { /** * Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than @@ -44,7 +46,7 @@ interface UuidInterface extends * * @param UuidInterface $other The UUID to compare * - * @return int -1, 0, or 1 if the UUID is less than, equal to, or greater than $other + * @return int<-1,1> -1, 0, or 1 if the UUID is less than, equal to, or greater than $other */ public function compareTo(UuidInterface $other): int; @@ -83,6 +85,14 @@ interface UuidInterface extends */ public function getInteger(): IntegerObject; + /** + * Returns the string standard representation of the UUID as a URN + * + * @link http://en.wikipedia.org/wiki/Uniform_Resource_Name Uniform Resource Name + * @link https://tools.ietf.org/html/rfc4122#section-3 RFC 4122, § 3: Namespace Registration Template + */ + public function getUrn(): string; + /** * Returns the string standard representation of the UUID * diff --git a/vendor/ramsey/uuid/src/functions.php b/vendor/ramsey/uuid/src/functions.php index f5df1488..1b3ce00f 100644 --- a/vendor/ramsey/uuid/src/functions.php +++ b/vendor/ramsey/uuid/src/functions.php @@ -15,17 +15,18 @@ declare(strict_types=1); namespace Ramsey\Uuid; +use DateTimeInterface; use Ramsey\Uuid\Type\Hexadecimal; use Ramsey\Uuid\Type\Integer as IntegerObject; /** - * Returns a version 1 (time-based) UUID from a host ID, sequence number, + * Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|int|string|null $node A 48-bit number representing the * hardware address; this number may be represented as an integer or a * hexadecimal string - * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes * @@ -106,12 +107,12 @@ function v5($ns, string $name): string } /** - * Returns a version 6 (ordered-time) UUID from a host ID, sequence number, + * Returns a version 6 (reordered time) UUID from a host ID, sequence number, * and the current time * * @param Hexadecimal|null $node A 48-bit number representing the hardware * address - * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes * @@ -121,3 +122,37 @@ function v6(?Hexadecimal $node = null, ?int $clockSeq = null): string { return Uuid::uuid6($node, $clockSeq)->toString(); } + +/** + * Returns a version 7 (Unix Epoch time) UUID + * + * @param DateTimeInterface|null $dateTime An optional date/time from which + * to create the version 7 UUID. If not provided, the UUID is generated + * using the current date/time. + * + * @return non-empty-string Version 7 UUID as a string + */ +function v7(?DateTimeInterface $dateTime = null): string +{ + return Uuid::uuid7($dateTime)->toString(); +} + +/** + * Returns a version 8 (custom) UUID + * + * The bytes provided may contain any value according to your application's + * needs. Be aware, however, that other applications may not understand the + * semantics of the value. + * + * @param string $bytes A 16-byte octet string. This is an open blob + * of data that you may fill with 128 bits of information. Be aware, + * however, bits 48 through 51 will be replaced with the UUID version + * field, and bits 64 and 65 will be replaced with the UUID variant. You + * MUST NOT rely on these bits for your application needs. + * + * @return non-empty-string Version 8 UUID as a string + */ +function v8(string $bytes): string +{ + return Uuid::uuid8($bytes)->toString(); +} diff --git a/vendor/sebastian/cli-parser/ChangeLog.md b/vendor/sebastian/cli-parser/ChangeLog.md index 9431ec59..9ecd241d 100644 --- a/vendor/sebastian/cli-parser/ChangeLog.md +++ b/vendor/sebastian/cli-parser/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [1.0.2] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + ## [1.0.1] - 2020-09-28 ### Changed @@ -12,4 +18,6 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release +[1.0.2]: https://github.com/sebastianbergmann/cli-parser/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/sebastianbergmann/cli-parser/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/sebastianbergmann/cli-parser/compare/bb7bb3297957927962b0a3335befe7b66f7462e9...1.0.0 diff --git a/vendor/sebastian/cli-parser/src/Parser.php b/vendor/sebastian/cli-parser/src/Parser.php index a4f728bc..67d8909f 100644 --- a/vendor/sebastian/cli-parser/src/Parser.php +++ b/vendor/sebastian/cli-parser/src/Parser.php @@ -41,7 +41,7 @@ final class Parser * @throws OptionDoesNotAllowArgumentException * @throws UnknownOptionException */ - public function parse(array $argv, string $shortOptions, array $longOptions = null): array + public function parse(array $argv, string $shortOptions, ?array $longOptions = null): array { if (empty($argv)) { return [[], []]; diff --git a/vendor/sebastian/comparator/ChangeLog.md b/vendor/sebastian/comparator/ChangeLog.md index 64c0251c..17557536 100644 --- a/vendor/sebastian/comparator/ChangeLog.md +++ b/vendor/sebastian/comparator/ChangeLog.md @@ -2,6 +2,18 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [4.0.8] - 2022-09-14 + +### Fixed + +* [#102](https://github.com/sebastianbergmann/comparator/pull/102): Fix `float` comparison precision + +## [4.0.7] - 2022-09-14 + +### Fixed + +* [#99](https://github.com/sebastianbergmann/comparator/pull/99): Fix weak comparison between `'0'` and `false` + ## [4.0.6] - 2020-10-26 ### Fixed @@ -44,6 +56,24 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Removed support for PHP 7.1 and PHP 7.2 +## [3.0.5] - 2022-09-14 + +### Fixed + +* [#102](https://github.com/sebastianbergmann/comparator/pull/102): Fix `float` comparison precision + +## [3.0.4] - 2022-09-14 + +### Fixed + +* [#99](https://github.com/sebastianbergmann/comparator/pull/99): Fix weak comparison between `'0'` and `false` + +## [3.0.3] - 2020-11-30 + +### Changed + +* Changed PHP version constraint in `composer.json` from `^7.1` to `>=7.1` + ## [3.0.2] - 2018-07-12 ### Changed @@ -61,7 +91,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ### Fixed -* Fixed [#48](https://github.com/sebastianbergmann/comparator/issues/48): `DateTimeComparator` does not support fractional second deltas +* [#48](https://github.com/sebastianbergmann/comparator/issues/48): `DateTimeComparator` does not support fractional second deltas ### Removed @@ -83,7 +113,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ### Fixed -* Fixed [phpunit/#2923](https://github.com/sebastianbergmann/phpunit/issues/2923): Unexpected failed date matching +* [phpunit/#2923](https://github.com/sebastianbergmann/phpunit/issues/2923): Unexpected failed date matching ## [2.1.0] - 2017-11-03 @@ -92,13 +122,18 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators * Added support for `phpunit/phpunit-mock-objects` version `^5.0` +[4.0.8]: https://github.com/sebastianbergmann/comparator/compare/4.0.7...4.0.8 +[4.0.7]: https://github.com/sebastianbergmann/comparator/compare/4.0.6...4.0.7 [4.0.6]: https://github.com/sebastianbergmann/comparator/compare/4.0.5...4.0.6 [4.0.5]: https://github.com/sebastianbergmann/comparator/compare/4.0.4...4.0.5 [4.0.4]: https://github.com/sebastianbergmann/comparator/compare/4.0.3...4.0.4 [4.0.3]: https://github.com/sebastianbergmann/comparator/compare/4.0.2...4.0.3 [4.0.2]: https://github.com/sebastianbergmann/comparator/compare/4.0.1...4.0.2 [4.0.1]: https://github.com/sebastianbergmann/comparator/compare/4.0.0...4.0.1 -[4.0.0]: https://github.com/sebastianbergmann/comparator/compare/3.0.2...4.0.0 +[4.0.0]: https://github.com/sebastianbergmann/comparator/compare/3.0.5...4.0.0 +[3.0.5]: https://github.com/sebastianbergmann/comparator/compare/3.0.4...3.0.5 +[3.0.4]: https://github.com/sebastianbergmann/comparator/compare/3.0.3...3.0.4 +[3.0.3]: https://github.com/sebastianbergmann/comparator/compare/3.0.2...3.0.3 [3.0.2]: https://github.com/sebastianbergmann/comparator/compare/3.0.1...3.0.2 [3.0.1]: https://github.com/sebastianbergmann/comparator/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/sebastianbergmann/comparator/compare/2.1.3...3.0.0 diff --git a/vendor/sebastian/comparator/src/DoubleComparator.php b/vendor/sebastian/comparator/src/DoubleComparator.php index d90b9e06..42352219 100644 --- a/vendor/sebastian/comparator/src/DoubleComparator.php +++ b/vendor/sebastian/comparator/src/DoubleComparator.php @@ -14,6 +14,8 @@ use function is_numeric; /** * Compares doubles for equality. + * + * @deprecated since v3.0.5 and v4.0.8 */ class DoubleComparator extends NumericComparator { diff --git a/vendor/sebastian/comparator/src/Factory.php b/vendor/sebastian/comparator/src/Factory.php index 5b16366f..6a8b5b44 100644 --- a/vendor/sebastian/comparator/src/Factory.php +++ b/vendor/sebastian/comparator/src/Factory.php @@ -127,7 +127,6 @@ class Factory $this->registerDefaultComparator(new ObjectComparator); $this->registerDefaultComparator(new ResourceComparator); $this->registerDefaultComparator(new ArrayComparator); - $this->registerDefaultComparator(new DoubleComparator); $this->registerDefaultComparator(new NumericComparator); $this->registerDefaultComparator(new ScalarComparator); $this->registerDefaultComparator(new TypeComparator); diff --git a/vendor/sebastian/comparator/src/NumericComparator.php b/vendor/sebastian/comparator/src/NumericComparator.php index 12e6721d..841881c9 100644 --- a/vendor/sebastian/comparator/src/NumericComparator.php +++ b/vendor/sebastian/comparator/src/NumericComparator.php @@ -32,10 +32,8 @@ class NumericComparator extends ScalarComparator */ public function accepts($expected, $actual) { - // all numerical values, but not if one of them is a double - // or both of them are strings + // all numerical values, but not if both of them are strings return is_numeric($expected) && is_numeric($actual) && - !(is_float($expected) || is_float($actual)) && !(is_string($expected) && is_string($actual)); } diff --git a/vendor/sebastian/comparator/src/ScalarComparator.php b/vendor/sebastian/comparator/src/ScalarComparator.php index 08ded922..7f131229 100644 --- a/vendor/sebastian/comparator/src/ScalarComparator.php +++ b/vendor/sebastian/comparator/src/ScalarComparator.php @@ -9,6 +9,7 @@ */ namespace SebastianBergmann\Comparator; +use function is_bool; use function is_object; use function is_scalar; use function is_string; @@ -58,7 +59,7 @@ class ScalarComparator extends Comparator // always compare as strings to avoid strange behaviour // otherwise 0 == 'Foobar' - if (is_string($expected) || is_string($actual)) { + if ((is_string($expected) && !is_bool($actual)) || (is_string($actual) && !is_bool($expected))) { $expectedToCompare = (string) $expectedToCompare; $actualToCompare = (string) $actualToCompare; diff --git a/vendor/sebastian/complexity/ChangeLog.md b/vendor/sebastian/complexity/ChangeLog.md index cb93ff62..51deba71 100644 --- a/vendor/sebastian/complexity/ChangeLog.md +++ b/vendor/sebastian/complexity/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [2.0.3] - 2023-12-22 + +### Changed + +* This component is now compatible with `nikic/php-parser` 5.0 + ## [2.0.2] - 2020-10-26 ### Fixed @@ -24,6 +30,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release +[2.0.3]: https://github.com/sebastianbergmann/complexity/compare/2.0.2...2.0.3 [2.0.2]: https://github.com/sebastianbergmann/complexity/compare/2.0.1...2.0.2 [2.0.1]: https://github.com/sebastianbergmann/complexity/compare/2.0.0...2.0.1 [2.0.0]: https://github.com/sebastianbergmann/complexity/compare/1.0.0...2.0.0 diff --git a/vendor/sebastian/complexity/composer.json b/vendor/sebastian/complexity/composer.json index 7aa38314..592e4185 100644 --- a/vendor/sebastian/complexity/composer.json +++ b/vendor/sebastian/complexity/composer.json @@ -14,9 +14,10 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues" }, + "prefer-stable": true, "require": { "php": ">=7.3", - "nikic/php-parser": "^4.7" + "nikic/php-parser": "^4.18 || ^5.0" }, "require-dev": { "phpunit/phpunit": "^9.3" diff --git a/vendor/sebastian/complexity/src/Calculator.php b/vendor/sebastian/complexity/src/Calculator.php index 9abdcd16..f5381903 100644 --- a/vendor/sebastian/complexity/src/Calculator.php +++ b/vendor/sebastian/complexity/src/Calculator.php @@ -10,12 +10,10 @@ namespace SebastianBergmann\Complexity; use PhpParser\Error; -use PhpParser\Lexer; use PhpParser\Node; use PhpParser\NodeTraverser; use PhpParser\NodeVisitor\NameResolver; use PhpParser\NodeVisitor\ParentConnectingVisitor; -use PhpParser\Parser; use PhpParser\ParserFactory; final class Calculator @@ -34,7 +32,7 @@ final class Calculator public function calculateForSourceString(string $source): ComplexityCollection { try { - $nodes = $this->parser()->parse($source); + $nodes = (new ParserFactory)->createForHostVersion()->parse($source); assert($nodes !== null); @@ -80,9 +78,4 @@ final class Calculator return $complexityCalculatingVisitor->result(); } - - private function parser(): Parser - { - return (new ParserFactory)->create(ParserFactory::PREFER_PHP7, new Lexer); - } } diff --git a/vendor/sebastian/diff/ChangeLog.md b/vendor/sebastian/diff/ChangeLog.md index 9bdcc5b6..e62d8f95 100644 --- a/vendor/sebastian/diff/ChangeLog.md +++ b/vendor/sebastian/diff/ChangeLog.md @@ -2,6 +2,19 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [4.0.6] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + +## [4.0.5] - 2023-05-07 + +### Changed + +* [#118](https://github.com/sebastianbergmann/diff/pull/118): Improve performance of `MemoryEfficientLongestCommonSubsequenceCalculator` +* [#119](https://github.com/sebastianbergmann/diff/pull/119): Improve performance of `TimeEfficientLongestCommonSubsequenceCalculator` + ## [4.0.4] - 2020-10-26 ### Fixed @@ -76,6 +89,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 5.6 +[4.0.6]: https://github.com/sebastianbergmann/diff/compare/4.0.5...4.0.6 +[4.0.5]: https://github.com/sebastianbergmann/diff/compare/4.0.4...4.0.5 [4.0.4]: https://github.com/sebastianbergmann/diff/compare/4.0.3...4.0.4 [4.0.3]: https://github.com/sebastianbergmann/diff/compare/4.0.2...4.0.3 [4.0.2]: https://github.com/sebastianbergmann/diff/compare/4.0.1...4.0.2 diff --git a/vendor/sebastian/diff/src/Differ.php b/vendor/sebastian/diff/src/Differ.php index 5a4d9d10..98c7a9b2 100644 --- a/vendor/sebastian/diff/src/Differ.php +++ b/vendor/sebastian/diff/src/Differ.php @@ -82,7 +82,7 @@ final class Differ * @param array|string $from * @param array|string $to */ - public function diff($from, $to, LongestCommonSubsequenceCalculator $lcs = null): string + public function diff($from, $to, ?LongestCommonSubsequenceCalculator $lcs = null): string { $diff = $this->diffToArray( $this->normalizeDiffInput($from), @@ -108,7 +108,7 @@ final class Differ * @param array|string $to * @param LongestCommonSubsequenceCalculator $lcs */ - public function diffToArray($from, $to, LongestCommonSubsequenceCalculator $lcs = null): array + public function diffToArray($from, $to, ?LongestCommonSubsequenceCalculator $lcs = null): array { if (is_string($from)) { $from = $this->splitStringByLines($from); diff --git a/vendor/sebastian/diff/src/Exception/ConfigurationException.php b/vendor/sebastian/diff/src/Exception/ConfigurationException.php index b767b219..8847a2e5 100644 --- a/vendor/sebastian/diff/src/Exception/ConfigurationException.php +++ b/vendor/sebastian/diff/src/Exception/ConfigurationException.php @@ -22,7 +22,7 @@ final class ConfigurationException extends InvalidArgumentException string $expected, $value, int $code = 0, - Exception $previous = null + ?Exception $previous = null ) { parent::__construct( sprintf( diff --git a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php index 0b626eaf..489113b6 100644 --- a/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php +++ b/vendor/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php @@ -78,7 +78,12 @@ final class MemoryEfficientLongestCommonSubsequenceCalculator implements Longest if ($from[$i] === $to[$j]) { $current[$j + 1] = $prev[$j] + 1; } else { - $current[$j + 1] = max($current[$j], $prev[$j + 1]); + // don't use max() to avoid function call overhead + if ($current[$j] > $prev[$j + 1]) { + $current[$j + 1] = $current[$j]; + } else { + $current[$j + 1] = $prev[$j + 1]; + } } } } diff --git a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php b/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php index fd19cac7..4e8d951d 100644 --- a/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php +++ b/vendor/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php @@ -37,12 +37,24 @@ final class TimeEfficientLongestCommonSubsequenceCalculator implements LongestCo for ($i = 1; $i <= $fromLength; ++$i) { for ($j = 1; $j <= $toLength; ++$j) { - $o = ($j * $width) + $i; - $matrix[$o] = max( - $matrix[$o - 1], - $matrix[$o - $width], - $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0 - ); + $o = ($j * $width) + $i; + + // don't use max() to avoid function call overhead + $firstOrLast = $from[$i - 1] === $to[$j - 1] ? $matrix[$o - $width - 1] + 1 : 0; + + if ($matrix[$o - 1] > $matrix[$o - $width]) { + if ($firstOrLast > $matrix[$o - 1]) { + $matrix[$o] = $firstOrLast; + } else { + $matrix[$o] = $matrix[$o - 1]; + } + } else { + if ($firstOrLast > $matrix[$o - $width]) { + $matrix[$o] = $firstOrLast; + } else { + $matrix[$o] = $matrix[$o - $width]; + } + } } } diff --git a/vendor/sebastian/environment/ChangeLog.md b/vendor/sebastian/environment/ChangeLog.md index 8943aee4..07365951 100644 --- a/vendor/sebastian/environment/ChangeLog.md +++ b/vendor/sebastian/environment/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [5.1.5] - 2023-02-03 + +### Fixed + +* [#59](https://github.com/sebastianbergmann/environment/issues/59): Wrong usage of `stream_isatty()`, `fstat()` used without checking whether the function is available + ## [5.1.4] - 2022-04-03 ### Fixed @@ -151,6 +157,7 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi * This component is no longer supported on PHP 5.6 +[5.1.5]: https://github.com/sebastianbergmann/environment/compare/5.1.4...5.1.5 [5.1.4]: https://github.com/sebastianbergmann/environment/compare/5.1.3...5.1.4 [5.1.3]: https://github.com/sebastianbergmann/environment/compare/5.1.2...5.1.3 [5.1.2]: https://github.com/sebastianbergmann/environment/compare/5.1.1...5.1.2 diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php index e7fd1643..180eb60b 100644 --- a/vendor/sebastian/environment/src/Console.php +++ b/vendor/sebastian/environment/src/Console.php @@ -105,16 +105,14 @@ final class Console public function isInteractive($fileDescriptor = self::STDOUT): bool { if (is_resource($fileDescriptor)) { - // These functions require a descriptor that is a real resource, not a numeric ID of it if (function_exists('stream_isatty') && @stream_isatty($fileDescriptor)) { return true; } - // Check if formatted mode is S_IFCHR - if (function_exists('fstat') && @stream_isatty($fileDescriptor)) { + if (function_exists('fstat')) { $stat = @fstat(STDOUT); - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + return $stat && 0020000 === ($stat['mode'] & 0170000); } return false; diff --git a/vendor/sebastian/exporter/ChangeLog.md b/vendor/sebastian/exporter/ChangeLog.md index c691e81a..32ab7051 100644 --- a/vendor/sebastian/exporter/ChangeLog.md +++ b/vendor/sebastian/exporter/ChangeLog.md @@ -2,6 +2,18 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [4.0.6] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + +## [4.0.5] - 2022-09-14 + +### Fixed + +* [#47](https://github.com/sebastianbergmann/exporter/pull/47): Fix `float` export precision + ## [4.0.4] - 2021-11-11 ### Changed @@ -32,6 +44,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * This component is no longer supported on PHP 7.0, PHP 7.1, and PHP 7.2 +## [3.1.5] - 2022-09-14 + +### Fixed + +* [#47](https://github.com/sebastianbergmann/exporter/pull/47): Fix `float` export precision + ## [3.1.4] - 2021-11-11 ### Changed @@ -54,11 +72,14 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Remove HHVM-specific code that is no longer needed +[4.0.6]: https://github.com/sebastianbergmann/exporter/compare/4.0.5...4.0.6 +[4.0.5]: https://github.com/sebastianbergmann/exporter/compare/4.0.4...4.0.5 [4.0.4]: https://github.com/sebastianbergmann/exporter/compare/4.0.3...4.0.4 [4.0.3]: https://github.com/sebastianbergmann/exporter/compare/4.0.2...4.0.3 [4.0.2]: https://github.com/sebastianbergmann/exporter/compare/4.0.1...4.0.2 [4.0.1]: https://github.com/sebastianbergmann/exporter/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/sebastianbergmann/exporter/compare/3.1.2...4.0.0 +[3.1.5]: https://github.com/sebastianbergmann/exporter/compare/3.1.4...3.1.5 [3.1.4]: https://github.com/sebastianbergmann/exporter/compare/3.1.3...3.1.4 [3.1.3]: https://github.com/sebastianbergmann/exporter/compare/3.1.2...3.1.3 [3.1.2]: https://github.com/sebastianbergmann/exporter/compare/3.1.1...3.1.2 diff --git a/vendor/sebastian/exporter/src/Exporter.php b/vendor/sebastian/exporter/src/Exporter.php index 692a0b21..5d85b13a 100644 --- a/vendor/sebastian/exporter/src/Exporter.php +++ b/vendor/sebastian/exporter/src/Exporter.php @@ -16,6 +16,8 @@ use function get_class; use function get_resource_type; use function gettype; use function implode; +use function ini_get; +use function ini_set; use function is_array; use function is_float; use function is_object; @@ -75,7 +77,7 @@ class Exporter * * @return string */ - public function shortenedRecursiveExport(&$data, Context $context = null) + public function shortenedRecursiveExport(&$data, ?Context $context = null) { $result = []; $exporter = new self(); @@ -232,8 +234,22 @@ class Exporter return 'false'; } - if (is_float($value) && (float) ((int) $value) === $value) { - return "{$value}.0"; + if (is_float($value)) { + $precisionBackup = ini_get('precision'); + + ini_set('precision', '-1'); + + try { + $valueStr = (string) $value; + + if ((string) (int) $value === $valueStr) { + return $valueStr . '.0'; + } + + return $valueStr; + } finally { + ini_set('precision', $precisionBackup); + } } if (gettype($value) === 'resource (closed)') { diff --git a/vendor/sebastian/global-state/ChangeLog.md b/vendor/sebastian/global-state/ChangeLog.md index a27a5cf1..e76f84b8 100644 --- a/vendor/sebastian/global-state/ChangeLog.md +++ b/vendor/sebastian/global-state/ChangeLog.md @@ -2,6 +2,18 @@ All notable changes in `sebastian/global-state` are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [5.0.7] - 2024-03-02 + +### Changed + +* Do not use implicitly nullable parameters + +## [5.0.6] - 2023-08-02 + +### Changed + +* Changed usage of `ReflectionProperty::setValue()` to be compatible with PHP 8.3 + ## [5.0.5] - 2022-02-14 ### Fixed @@ -66,6 +78,8 @@ All notable changes in `sebastian/global-state` are documented in this file usin * This component is no longer supported on PHP 7.0 and PHP 7.1 +[5.0.7]: https://github.com/sebastianbergmann/global-state/compare/5.0.6...5.0.7 +[5.0.6]: https://github.com/sebastianbergmann/global-state/compare/5.0.5...5.0.6 [5.0.5]: https://github.com/sebastianbergmann/global-state/compare/5.0.4...5.0.5 [5.0.4]: https://github.com/sebastianbergmann/global-state/compare/5.0.3...5.0.4 [5.0.3]: https://github.com/sebastianbergmann/global-state/compare/5.0.2...5.0.3 diff --git a/vendor/sebastian/global-state/src/Restorer.php b/vendor/sebastian/global-state/src/Restorer.php index 1633fcc1..ab145ce2 100644 --- a/vendor/sebastian/global-state/src/Restorer.php +++ b/vendor/sebastian/global-state/src/Restorer.php @@ -85,7 +85,7 @@ class Restorer foreach ($staticAttributes as $name => $value) { $reflector = new ReflectionProperty($className, $name); $reflector->setAccessible(true); - $reflector->setValue($value); + $reflector->setValue(null, $value); } } @@ -109,7 +109,7 @@ class Restorer } $attribute->setAccessible(true); - $attribute->setValue($defaults[$name]); + $attribute->setValue(null, $defaults[$name]); } } } diff --git a/vendor/sebastian/global-state/src/Snapshot.php b/vendor/sebastian/global-state/src/Snapshot.php index e33264eb..61219cac 100644 --- a/vendor/sebastian/global-state/src/Snapshot.php +++ b/vendor/sebastian/global-state/src/Snapshot.php @@ -101,7 +101,7 @@ class Snapshot /** * Creates a snapshot of the current global state. */ - public function __construct(ExcludeList $excludeList = null, bool $includeGlobalVariables = true, bool $includeStaticAttributes = true, bool $includeConstants = true, bool $includeFunctions = true, bool $includeClasses = true, bool $includeInterfaces = true, bool $includeTraits = true, bool $includeIniSettings = true, bool $includeIncludedFiles = true) + public function __construct(?ExcludeList $excludeList = null, bool $includeGlobalVariables = true, bool $includeStaticAttributes = true, bool $includeConstants = true, bool $includeFunctions = true, bool $includeClasses = true, bool $includeInterfaces = true, bool $includeTraits = true, bool $includeIniSettings = true, bool $includeIncludedFiles = true) { $this->excludeList = $excludeList ?: new ExcludeList; diff --git a/vendor/sebastian/lines-of-code/ChangeLog.md b/vendor/sebastian/lines-of-code/ChangeLog.md index 39bcaad4..2c960705 100644 --- a/vendor/sebastian/lines-of-code/ChangeLog.md +++ b/vendor/sebastian/lines-of-code/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [1.0.4] - 2023-12-22 + +### Changed + +* This component is now compatible with `nikic/php-parser` 5.0 + ## [1.0.3] - 2020-11-28 ### Fixed @@ -28,6 +34,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release +[1.0.4]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.3...1.0.4 [1.0.3]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.2...1.0.3 [1.0.2]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.1...1.0.2 [1.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.0...1.0.1 diff --git a/vendor/sebastian/lines-of-code/composer.json b/vendor/sebastian/lines-of-code/composer.json index 95bb9e36..3f287865 100644 --- a/vendor/sebastian/lines-of-code/composer.json +++ b/vendor/sebastian/lines-of-code/composer.json @@ -17,7 +17,7 @@ "prefer-stable": true, "require": { "php": ">=7.3", - "nikic/php-parser": "^4.6" + "nikic/php-parser": "^4.18 || ^5.0" }, "require-dev": { "phpunit/phpunit": "^9.3" diff --git a/vendor/sebastian/lines-of-code/src/Counter.php b/vendor/sebastian/lines-of-code/src/Counter.php index cfe5e20a..8153a7b2 100644 --- a/vendor/sebastian/lines-of-code/src/Counter.php +++ b/vendor/sebastian/lines-of-code/src/Counter.php @@ -11,10 +11,8 @@ namespace SebastianBergmann\LinesOfCode; use function substr_count; use PhpParser\Error; -use PhpParser\Lexer; use PhpParser\Node; use PhpParser\NodeTraverser; -use PhpParser\Parser; use PhpParser\ParserFactory; final class Counter @@ -39,7 +37,7 @@ final class Counter } try { - $nodes = $this->parser()->parse($source); + $nodes = (new ParserFactory)->createForHostVersion()->parse($source); assert($nodes !== null); @@ -83,9 +81,4 @@ final class Counter return $visitor->result(); } - - private function parser(): Parser - { - return (new ParserFactory)->create(ParserFactory::PREFER_PHP7, new Lexer); - } } diff --git a/vendor/sebastian/recursion-context/.psalm/baseline.xml b/vendor/sebastian/recursion-context/.psalm/baseline.xml deleted file mode 100644 index b946db1a..00000000 --- a/vendor/sebastian/recursion-context/.psalm/baseline.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - is_array($array) - - - diff --git a/vendor/sebastian/recursion-context/.psalm/config.xml b/vendor/sebastian/recursion-context/.psalm/config.xml deleted file mode 100644 index 2a4b16f2..00000000 --- a/vendor/sebastian/recursion-context/.psalm/config.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/vendor/sebastian/recursion-context/ChangeLog.md b/vendor/sebastian/recursion-context/ChangeLog.md index 2fbacc2c..c1a76516 100644 --- a/vendor/sebastian/recursion-context/ChangeLog.md +++ b/vendor/sebastian/recursion-context/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [4.0.5] - 2023-02-03 + +### Fixed + +* [#26](https://github.com/sebastianbergmann/recursion-context/pull/26): Don't clobber `null` values if `array_key_exists(PHP_INT_MAX, $array)` + ## [4.0.4] - 2020-10-26 ### Fixed @@ -27,6 +33,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Tests etc. are now ignored for archive exports +[4.0.5]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.4...4.0.5 [4.0.4]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.3...4.0.4 [4.0.3]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.2...4.0.3 [4.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.1...4.0.2 diff --git a/vendor/sebastian/recursion-context/LICENSE b/vendor/sebastian/recursion-context/LICENSE index 0faffbbb..4e9b6371 100644 --- a/vendor/sebastian/recursion-context/LICENSE +++ b/vendor/sebastian/recursion-context/LICENSE @@ -1,6 +1,6 @@ Recursion Context -Copyright (c) 2002-2020, Sebastian Bergmann . +Copyright (c) 2002-2022, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/sebastian/recursion-context/composer.json b/vendor/sebastian/recursion-context/composer.json index 8a540823..cbd39f76 100644 --- a/vendor/sebastian/recursion-context/composer.json +++ b/vendor/sebastian/recursion-context/composer.json @@ -1,7 +1,7 @@ { "name": "sebastian/recursion-context", "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "license": "BSD-3-Clause", "authors": [ { diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php index 87fe7b04..a647938c 100644 --- a/vendor/sebastian/recursion-context/src/Context.php +++ b/vendor/sebastian/recursion-context/src/Context.php @@ -1,6 +1,6 @@ * @@ -11,6 +11,7 @@ namespace SebastianBergmann\RecursionContext; use const PHP_INT_MAX; use const PHP_INT_MIN; +use function array_key_exists; use function array_pop; use function array_slice; use function count; @@ -128,19 +129,23 @@ final class Context $key = count($this->arrays); $this->arrays[] = &$array; - if (!isset($array[PHP_INT_MAX]) && !isset($array[PHP_INT_MAX - 1])) { + if (!array_key_exists(PHP_INT_MAX, $array) && !array_key_exists(PHP_INT_MAX - 1, $array)) { $array[] = $key; $array[] = $this->objects; } else { /* cover the improbable case too */ + /* Note that array_slice (used in containsArray) will return the + * last two values added *not necessarily* the highest integer + * keys in the array, so the order of these writes to $array + * is important, but the actual keys used is not. */ do { $key = random_int(PHP_INT_MIN, PHP_INT_MAX); - } while (isset($array[$key])); + } while (array_key_exists($key, $array)); $array[$key] = $key; do { $key = random_int(PHP_INT_MIN, PHP_INT_MAX); - } while (isset($array[$key])); + } while (array_key_exists($key, $array)); $array[$key] = $this->objects; } diff --git a/vendor/sebastian/recursion-context/src/Exception.php b/vendor/sebastian/recursion-context/src/Exception.php index e3a9c017..9389a271 100644 --- a/vendor/sebastian/recursion-context/src/Exception.php +++ b/vendor/sebastian/recursion-context/src/Exception.php @@ -1,6 +1,6 @@ * diff --git a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php b/vendor/sebastian/recursion-context/src/InvalidArgumentException.php index 627c8bdf..93d150bc 100644 --- a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php +++ b/vendor/sebastian/recursion-context/src/InvalidArgumentException.php @@ -1,6 +1,6 @@ * diff --git a/vendor/sebastian/resource-operations/.gitattributes b/vendor/sebastian/resource-operations/.gitattributes deleted file mode 100644 index 85e55ebc..00000000 --- a/vendor/sebastian/resource-operations/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -/.github export-ignore -/.php_cs.dist export-ignore -/build.xml export-ignore -/phpunit.xml export-ignore -/tests export-ignore - -*.php diff=php diff --git a/vendor/sebastian/resource-operations/.gitignore b/vendor/sebastian/resource-operations/.gitignore deleted file mode 100644 index a086c781..00000000 --- a/vendor/sebastian/resource-operations/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/.idea -/.php_cs.cache -/build/FunctionSignatureMap.php -/composer.lock -/vendor -/.phpunit.result.cache diff --git a/vendor/sebastian/resource-operations/ChangeLog.md b/vendor/sebastian/resource-operations/ChangeLog.md index e6dc7392..eae06290 100644 --- a/vendor/sebastian/resource-operations/ChangeLog.md +++ b/vendor/sebastian/resource-operations/ChangeLog.md @@ -2,6 +2,10 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [3.0.4] - 2024-03-14 + +No functional changes. + ## [3.0.3] - 2020-09-28 ### Changed @@ -46,6 +50,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release +[3.0.4]: https://github.com/sebastianbergmann/comparator/resource-operations/3.0.3...3.0.4 [3.0.3]: https://github.com/sebastianbergmann/comparator/resource-operations/3.0.2...3.0.3 [3.0.2]: https://github.com/sebastianbergmann/comparator/resource-operations/3.0.1...3.0.2 [3.0.1]: https://github.com/sebastianbergmann/comparator/resource-operations/3.0.0...3.0.1 diff --git a/vendor/sebastian/resource-operations/build/generate.php b/vendor/sebastian/resource-operations/build/generate.php old mode 100755 new mode 100644 diff --git a/vendor/sebastian/resource-operations/composer.json b/vendor/sebastian/resource-operations/composer.json index 870be3c1..77e4baee 100644 --- a/vendor/sebastian/resource-operations/composer.json +++ b/vendor/sebastian/resource-operations/composer.json @@ -30,8 +30,9 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } - } + }, + "abandoned": false } diff --git a/vendor/sebastian/type/ChangeLog.md b/vendor/sebastian/type/ChangeLog.md index 258f6b70..0691a9b1 100644 --- a/vendor/sebastian/type/ChangeLog.md +++ b/vendor/sebastian/type/ChangeLog.md @@ -2,11 +2,26 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## [4.0.0] - 2022-MM-DD +## [3.2.1] - 2023-02-03 -### Removed +### Fixed -* This component is no longer supported on PHP 7.3 and PHP 7.4 +* [#28](https://github.com/sebastianbergmann/type/pull/28): Potential undefined offset warning/notice + +## [3.2.0] - 2022-09-12 + +### Added + +* [#25](https://github.com/sebastianbergmann/type/issues/25): Support Disjunctive Normal Form types +* Added `ReflectionMapper::fromParameterTypes()` +* Added `IntersectionType::types()` and `UnionType::types()` +* Added `UnionType::containsIntersectionTypes()` + +## [3.1.0] - 2022-08-29 + +### Added + +* [#21](https://github.com/sebastianbergmann/type/issues/21): Support `true` as stand-alone type ## [3.0.0] - 2022-03-15 @@ -29,6 +44,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt ## [2.3.4] - 2021-06-15 +### Fixed + * Fixed regression introduced in 2.3.3 ## [2.3.3] - 2021-06-15 [YANKED] @@ -130,7 +147,9 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Initial release based on [code contributed by Michel Hartmann to PHPUnit](https://github.com/sebastianbergmann/phpunit/pull/3673) -[4.0.0]: https://github.com/sebastianbergmann/type/compare/3.0...master +[3.2.1]: https://github.com/sebastianbergmann/type/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/sebastianbergmann/type/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/sebastianbergmann/type/compare/3.0.0...3.1.0 [3.0.0]: https://github.com/sebastianbergmann/type/compare/2.3.4...3.0.0 [2.3.4]: https://github.com/sebastianbergmann/type/compare/ca39369c41313ed12c071ed38ecda8fcdb248859...2.3.4 [2.3.3]: https://github.com/sebastianbergmann/type/compare/2.3.2...ca39369c41313ed12c071ed38ecda8fcdb248859 diff --git a/vendor/sebastian/type/composer.json b/vendor/sebastian/type/composer.json index 10b32cd8..a0865c93 100644 --- a/vendor/sebastian/type/composer.json +++ b/vendor/sebastian/type/composer.json @@ -44,7 +44,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } } } diff --git a/vendor/sebastian/type/src/ReflectionMapper.php b/vendor/sebastian/type/src/ReflectionMapper.php index d9b6cb1e..32099b4b 100644 --- a/vendor/sebastian/type/src/ReflectionMapper.php +++ b/vendor/sebastian/type/src/ReflectionMapper.php @@ -19,6 +19,55 @@ use ReflectionUnionType; final class ReflectionMapper { + /** + * @psalm-return list + */ + public function fromParameterTypes(ReflectionFunctionAbstract $functionOrMethod): array + { + $parameters = []; + + foreach ($functionOrMethod->getParameters() as $parameter) { + $name = $parameter->getName(); + + assert($name !== ''); + + if (!$parameter->hasType()) { + $parameters[] = new Parameter($name, new UnknownType); + + continue; + } + + $type = $parameter->getType(); + + if ($type instanceof ReflectionNamedType) { + $parameters[] = new Parameter( + $name, + $this->mapNamedType($type, $functionOrMethod) + ); + + continue; + } + + if ($type instanceof ReflectionUnionType) { + $parameters[] = new Parameter( + $name, + $this->mapUnionType($type, $functionOrMethod) + ); + + continue; + } + + if ($type instanceof ReflectionIntersectionType) { + $parameters[] = new Parameter( + $name, + $this->mapIntersectionType($type, $functionOrMethod) + ); + } + } + + return $parameters; + } + public function fromReturnType(ReflectionFunctionAbstract $functionOrMethod): Type { if (!$this->hasReturnType($functionOrMethod)) { @@ -30,54 +79,78 @@ final class ReflectionMapper assert($returnType instanceof ReflectionNamedType || $returnType instanceof ReflectionUnionType || $returnType instanceof ReflectionIntersectionType); if ($returnType instanceof ReflectionNamedType) { - if ($functionOrMethod instanceof ReflectionMethod && $returnType->getName() === 'self') { - return ObjectType::fromName( - $functionOrMethod->getDeclaringClass()->getName(), - $returnType->allowsNull() - ); - } - - if ($functionOrMethod instanceof ReflectionMethod && $returnType->getName() === 'static') { - return new StaticType( - TypeName::fromReflection($functionOrMethod->getDeclaringClass()), - $returnType->allowsNull() - ); - } - - if ($returnType->getName() === 'mixed') { - return new MixedType; - } - - if ($functionOrMethod instanceof ReflectionMethod && $returnType->getName() === 'parent') { - return ObjectType::fromName( - $functionOrMethod->getDeclaringClass()->getParentClass()->getName(), - $returnType->allowsNull() - ); - } - - return Type::fromName( - $returnType->getName(), - $returnType->allowsNull() - ); - } - - assert($returnType instanceof ReflectionUnionType || $returnType instanceof ReflectionIntersectionType); - - $types = []; - - foreach ($returnType->getTypes() as $type) { - if ($functionOrMethod instanceof ReflectionMethod && $type->getName() === 'self') { - $types[] = ObjectType::fromName( - $functionOrMethod->getDeclaringClass()->getName(), - false - ); - } else { - $types[] = Type::fromName($type->getName(), false); - } + return $this->mapNamedType($returnType, $functionOrMethod); } if ($returnType instanceof ReflectionUnionType) { - return new UnionType(...$types); + return $this->mapUnionType($returnType, $functionOrMethod); + } + + if ($returnType instanceof ReflectionIntersectionType) { + return $this->mapIntersectionType($returnType, $functionOrMethod); + } + } + + private function mapNamedType(ReflectionNamedType $type, ReflectionFunctionAbstract $functionOrMethod): Type + { + if ($functionOrMethod instanceof ReflectionMethod && $type->getName() === 'self') { + return ObjectType::fromName( + $functionOrMethod->getDeclaringClass()->getName(), + $type->allowsNull() + ); + } + + if ($functionOrMethod instanceof ReflectionMethod && $type->getName() === 'static') { + return new StaticType( + TypeName::fromReflection($functionOrMethod->getDeclaringClass()), + $type->allowsNull() + ); + } + + if ($type->getName() === 'mixed') { + return new MixedType; + } + + if ($functionOrMethod instanceof ReflectionMethod && $type->getName() === 'parent') { + return ObjectType::fromName( + $functionOrMethod->getDeclaringClass()->getParentClass()->getName(), + $type->allowsNull() + ); + } + + return Type::fromName( + $type->getName(), + $type->allowsNull() + ); + } + + private function mapUnionType(ReflectionUnionType $type, ReflectionFunctionAbstract $functionOrMethod): Type + { + $types = []; + + foreach ($type->getTypes() as $_type) { + assert($_type instanceof ReflectionNamedType || $_type instanceof ReflectionIntersectionType); + + if ($_type instanceof ReflectionNamedType) { + $types[] = $this->mapNamedType($_type, $functionOrMethod); + + continue; + } + + $types[] = $this->mapIntersectionType($_type, $functionOrMethod); + } + + return new UnionType(...$types); + } + + private function mapIntersectionType(ReflectionIntersectionType $type, ReflectionFunctionAbstract $functionOrMethod): Type + { + $types = []; + + foreach ($type->getTypes() as $_type) { + assert($_type instanceof ReflectionNamedType); + + $types[] = $this->mapNamedType($_type, $functionOrMethod); } return new IntersectionType(...$types); diff --git a/vendor/sebastian/type/src/type/CallableType.php b/vendor/sebastian/type/src/type/CallableType.php index 90f5073b..d44fb0ca 100644 --- a/vendor/sebastian/type/src/type/CallableType.php +++ b/vendor/sebastian/type/src/type/CallableType.php @@ -84,6 +84,9 @@ final class CallableType extends Type return $this->allowsNull; } + /** + * @psalm-assert-if-true CallableType $this + */ public function isCallable(): bool { return true; @@ -140,6 +143,10 @@ final class CallableType extends Type return false; } + if (!isset($type->value()[0], $type->value()[1])) { + return false; + } + if (!is_object($type->value()[0]) || !is_string($type->value()[1])) { return false; } @@ -168,6 +175,10 @@ final class CallableType extends Type return false; } + if (!isset($type->value()[0], $type->value()[1])) { + return false; + } + if (!is_string($type->value()[0]) || !is_string($type->value()[1])) { return false; } diff --git a/vendor/sebastian/type/src/type/FalseType.php b/vendor/sebastian/type/src/type/FalseType.php index 652b828e..f417fb69 100644 --- a/vendor/sebastian/type/src/type/FalseType.php +++ b/vendor/sebastian/type/src/type/FalseType.php @@ -32,6 +32,9 @@ final class FalseType extends Type return false; } + /** + * @psalm-assert-if-true FalseType $this + */ public function isFalse(): bool { return true; diff --git a/vendor/sebastian/type/src/type/GenericObjectType.php b/vendor/sebastian/type/src/type/GenericObjectType.php index 1609b326..d06963f0 100644 --- a/vendor/sebastian/type/src/type/GenericObjectType.php +++ b/vendor/sebastian/type/src/type/GenericObjectType.php @@ -44,6 +44,9 @@ final class GenericObjectType extends Type return $this->allowsNull; } + /** + * @psalm-assert-if-true GenericObjectType $this + */ public function isGenericObject(): bool { return true; diff --git a/vendor/sebastian/type/src/type/IntersectionType.php b/vendor/sebastian/type/src/type/IntersectionType.php index c4f83f45..2e133940 100644 --- a/vendor/sebastian/type/src/type/IntersectionType.php +++ b/vendor/sebastian/type/src/type/IntersectionType.php @@ -9,16 +9,16 @@ */ namespace SebastianBergmann\Type; -use function array_unique; use function assert; use function count; use function implode; +use function in_array; use function sort; final class IntersectionType extends Type { /** - * @psalm-var list + * @psalm-var non-empty-list */ private $types; @@ -62,11 +62,22 @@ final class IntersectionType extends Type return false; } + /** + * @psalm-assert-if-true IntersectionType $this + */ public function isIntersection(): bool { return true; } + /** + * @psalm-return non-empty-list + */ + public function types(): array + { + return $this->types; + } + /** * @throws RuntimeException */ @@ -103,13 +114,13 @@ final class IntersectionType extends Type foreach ($types as $type) { assert($type instanceof ObjectType); - $names[] = $type->className()->qualifiedName(); - } + $classQualifiedName = $type->className()->qualifiedName(); - if (count(array_unique($names)) < count($names)) { - throw new RuntimeException( - 'An intersection type must not contain duplicate types' - ); + if (in_array($classQualifiedName, $names, true)) { + throw new RuntimeException('An intersection type must not contain duplicate types'); + } + + $names[] = $classQualifiedName; } } } diff --git a/vendor/sebastian/type/src/type/IterableType.php b/vendor/sebastian/type/src/type/IterableType.php index eb64895a..7b2a58fa 100644 --- a/vendor/sebastian/type/src/type/IterableType.php +++ b/vendor/sebastian/type/src/type/IterableType.php @@ -74,6 +74,9 @@ final class IterableType extends Type return $this->allowsNull; } + /** + * @psalm-assert-if-true IterableType $this + */ public function isIterable(): bool { return true; diff --git a/vendor/sebastian/type/src/type/MixedType.php b/vendor/sebastian/type/src/type/MixedType.php index 23e8a7ba..a1412e45 100644 --- a/vendor/sebastian/type/src/type/MixedType.php +++ b/vendor/sebastian/type/src/type/MixedType.php @@ -31,6 +31,9 @@ final class MixedType extends Type return true; } + /** + * @psalm-assert-if-true MixedType $this + */ public function isMixed(): bool { return true; diff --git a/vendor/sebastian/type/src/type/NeverType.php b/vendor/sebastian/type/src/type/NeverType.php index e2892a59..6c144743 100644 --- a/vendor/sebastian/type/src/type/NeverType.php +++ b/vendor/sebastian/type/src/type/NeverType.php @@ -26,6 +26,9 @@ final class NeverType extends Type return false; } + /** + * @psalm-assert-if-true NeverType $this + */ public function isNever(): bool { return true; diff --git a/vendor/sebastian/type/src/type/NullType.php b/vendor/sebastian/type/src/type/NullType.php index 1cfa8fcb..93834eab 100644 --- a/vendor/sebastian/type/src/type/NullType.php +++ b/vendor/sebastian/type/src/type/NullType.php @@ -31,6 +31,9 @@ final class NullType extends Type return true; } + /** + * @psalm-assert-if-true NullType $this + */ public function isNull(): bool { return true; diff --git a/vendor/sebastian/type/src/type/ObjectType.php b/vendor/sebastian/type/src/type/ObjectType.php index 8d5fdb90..44febb27 100644 --- a/vendor/sebastian/type/src/type/ObjectType.php +++ b/vendor/sebastian/type/src/type/ObjectType.php @@ -64,6 +64,9 @@ final class ObjectType extends Type return $this->className; } + /** + * @psalm-assert-if-true ObjectType $this + */ public function isObject(): bool { return true; diff --git a/vendor/sebastian/type/src/type/SimpleType.php b/vendor/sebastian/type/src/type/SimpleType.php index b31ec124..4dce75da 100644 --- a/vendor/sebastian/type/src/type/SimpleType.php +++ b/vendor/sebastian/type/src/type/SimpleType.php @@ -41,6 +41,10 @@ final class SimpleType extends Type return true; } + if ($this->name === 'bool' && $other->name() === 'true') { + return true; + } + if ($this->name === 'bool' && $other->name() === 'false') { return true; } @@ -67,6 +71,9 @@ final class SimpleType extends Type return $this->value; } + /** + * @psalm-assert-if-true SimpleType $this + */ public function isSimple(): bool { return true; diff --git a/vendor/sebastian/type/src/type/StaticType.php b/vendor/sebastian/type/src/type/StaticType.php index 0fb043b1..cbc13f5f 100644 --- a/vendor/sebastian/type/src/type/StaticType.php +++ b/vendor/sebastian/type/src/type/StaticType.php @@ -58,6 +58,9 @@ final class StaticType extends Type return $this->allowsNull; } + /** + * @psalm-assert-if-true StaticType $this + */ public function isStatic(): bool { return true; diff --git a/vendor/sebastian/type/src/type/Type.php b/vendor/sebastian/type/src/type/Type.php index bd923702..e7536683 100644 --- a/vendor/sebastian/type/src/type/Type.php +++ b/vendor/sebastian/type/src/type/Type.php @@ -19,8 +19,14 @@ abstract class Type { public static function fromValue($value, bool $allowsNull): self { - if ($value === false) { - return new FalseType; + if ($allowsNull === false) { + if ($value === true) { + return new TrueType; + } + + if ($value === false) { + return new FalseType; + } } $typeName = gettype($value); @@ -48,6 +54,9 @@ abstract class Type case 'callable': return new CallableType($allowsNull); + case 'true': + return new TrueType; + case 'false': return new FalseType; @@ -89,71 +98,121 @@ abstract class Type return ($this->allowsNull() ? '?' : '') . $this->name(); } + /** + * @psalm-assert-if-true CallableType $this + */ public function isCallable(): bool { return false; } + /** + * @psalm-assert-if-true TrueType $this + */ + public function isTrue(): bool + { + return false; + } + + /** + * @psalm-assert-if-true FalseType $this + */ public function isFalse(): bool { return false; } + /** + * @psalm-assert-if-true GenericObjectType $this + */ public function isGenericObject(): bool { return false; } + /** + * @psalm-assert-if-true IntersectionType $this + */ public function isIntersection(): bool { return false; } + /** + * @psalm-assert-if-true IterableType $this + */ public function isIterable(): bool { return false; } + /** + * @psalm-assert-if-true MixedType $this + */ public function isMixed(): bool { return false; } + /** + * @psalm-assert-if-true NeverType $this + */ public function isNever(): bool { return false; } + /** + * @psalm-assert-if-true NullType $this + */ public function isNull(): bool { return false; } + /** + * @psalm-assert-if-true ObjectType $this + */ public function isObject(): bool { return false; } + /** + * @psalm-assert-if-true SimpleType $this + */ public function isSimple(): bool { return false; } + /** + * @psalm-assert-if-true StaticType $this + */ public function isStatic(): bool { return false; } + /** + * @psalm-assert-if-true UnionType $this + */ public function isUnion(): bool { return false; } + /** + * @psalm-assert-if-true UnknownType $this + */ public function isUnknown(): bool { return false; } + /** + * @psalm-assert-if-true VoidType $this + */ public function isVoid(): bool { return false; diff --git a/vendor/sebastian/type/src/type/UnionType.php b/vendor/sebastian/type/src/type/UnionType.php index bdb9f1da..427729c5 100644 --- a/vendor/sebastian/type/src/type/UnionType.php +++ b/vendor/sebastian/type/src/type/UnionType.php @@ -16,7 +16,7 @@ use function sort; final class UnionType extends Type { /** - * @psalm-var list + * @psalm-var non-empty-list */ private $types; @@ -52,6 +52,12 @@ final class UnionType extends Type $types = []; foreach ($this->types as $type) { + if ($type->isIntersection()) { + $types[] = '(' . $type->name() . ')'; + + continue; + } + $types[] = $type->name(); } @@ -71,11 +77,33 @@ final class UnionType extends Type return false; } + /** + * @psalm-assert-if-true UnionType $this + */ public function isUnion(): bool { return true; } + public function containsIntersectionTypes(): bool + { + foreach ($this->types as $type) { + if ($type->isIntersection()) { + return true; + } + } + + return false; + } + + /** + * @psalm-return non-empty-list + */ + public function types(): array + { + return $this->types; + } + /** * @throws RuntimeException */ diff --git a/vendor/sebastian/type/src/type/UnknownType.php b/vendor/sebastian/type/src/type/UnknownType.php index 6df0379b..dc274407 100644 --- a/vendor/sebastian/type/src/type/UnknownType.php +++ b/vendor/sebastian/type/src/type/UnknownType.php @@ -31,6 +31,9 @@ final class UnknownType extends Type return true; } + /** + * @psalm-assert-if-true UnknownType $this + */ public function isUnknown(): bool { return true; diff --git a/vendor/sebastian/type/src/type/VoidType.php b/vendor/sebastian/type/src/type/VoidType.php index 5f674cfd..f740fe29 100644 --- a/vendor/sebastian/type/src/type/VoidType.php +++ b/vendor/sebastian/type/src/type/VoidType.php @@ -26,6 +26,9 @@ final class VoidType extends Type return false; } + /** + * @psalm-assert-if-true VoidType $this + */ public function isVoid(): bool { return true; diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index 3decfc04..bb534188 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -134,7 +134,7 @@ class Application implements ResetInterface * * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. */ - public function run(InputInterface $input = null, OutputInterface $output = null) + public function run(?InputInterface $input = null, ?OutputInterface $output = null) { if (\function_exists('putenv')) { @putenv('LINES='.$this->terminal->getHeight()); @@ -276,7 +276,9 @@ class Application implements ResetInterface $alternative = $alternatives[0]; $style = new SymfonyStyle($input, $output); - $style->block(sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error'); + $output->writeln(''); + $formattedBlock = (new FormatterHelper())->formatBlock(sprintf('Command "%s" is not defined.', $name), 'error', true); + $output->writeln($formattedBlock); if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e); @@ -363,9 +365,18 @@ class Application implements ResetInterface CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() && 'command' === $input->getCompletionName() ) { - $suggestions->suggestValues(array_filter(array_map(function (Command $command) { - return $command->isHidden() ? null : $command->getName(); - }, $this->all()))); + $commandNames = []; + foreach ($this->all() as $name => $command) { + // skip hidden commands and aliased commands as they already get added below + if ($command->isHidden() || $command->getName() !== $name) { + continue; + } + $commandNames[] = $command->getName(); + foreach ($command->getAliases() as $name) { + $commandNames[] = $name; + } + } + $suggestions->suggestValues(array_filter($commandNames)); return; } @@ -767,7 +778,7 @@ class Application implements ResetInterface * * @return Command[] */ - public function all(string $namespace = null) + public function all(?string $namespace = null) { $this->init(); @@ -924,11 +935,21 @@ class Application implements ResetInterface } switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { - case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; - case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; - case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; - case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; - default: $shellVerbosity = 0; break; + case -1: + $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); + break; + case 1: + $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + break; + case 2: + $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + break; + case 3: + $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); + break; + default: + $shellVerbosity = 0; + break; } if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { @@ -974,22 +995,26 @@ class Application implements ResetInterface } } - if ($command instanceof SignalableCommandInterface && ($this->signalsToDispatchEvent || $command->getSubscribedSignals())) { - if (!$this->signalRegistry) { - throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); - } + if ($this->signalsToDispatchEvent) { + $commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : []; - if (Terminal::hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); + if ($commandSignals || null !== $this->dispatcher) { + if (!$this->signalRegistry) { + throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'); + } - foreach ([\SIGINT, \SIGTERM] as $signal) { - $this->signalRegistry->register($signal, static function () use ($sttyMode) { - shell_exec('stty '.$sttyMode); - }); + if (Terminal::hasSttyAvailable()) { + $sttyMode = shell_exec('stty -g'); + + foreach ([\SIGINT, \SIGTERM] as $signal) { + $this->signalRegistry->register($signal, static function () use ($sttyMode) { + shell_exec('stty '.$sttyMode); + }); + } } } - if ($this->dispatcher) { + if (null !== $this->dispatcher) { foreach ($this->signalsToDispatchEvent as $signal) { $event = new ConsoleSignalEvent($command, $input, $output, $signal); @@ -1006,7 +1031,7 @@ class Application implements ResetInterface } } - foreach ($command->getSubscribedSignals() as $signal) { + foreach ($commandSignals as $signal) { $this->signalRegistry->register($signal, [$command, 'handleSignal']); } } @@ -1122,7 +1147,7 @@ class Application implements ResetInterface * * @return string */ - public function extractNamespace(string $name, int $limit = null) + public function extractNamespace(string $name, ?int $limit = null) { $parts = explode(':', $name, -1); diff --git a/vendor/symfony/console/CI/GithubActionReporter.php b/vendor/symfony/console/CI/GithubActionReporter.php index a15c1ff1..06571785 100644 --- a/vendor/symfony/console/CI/GithubActionReporter.php +++ b/vendor/symfony/console/CI/GithubActionReporter.php @@ -57,7 +57,7 @@ class GithubActionReporter * * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message */ - public function error(string $message, string $file = null, int $line = null, int $col = null): void + public function error(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void { $this->log('error', $message, $file, $line, $col); } @@ -67,7 +67,7 @@ class GithubActionReporter * * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message */ - public function warning(string $message, string $file = null, int $line = null, int $col = null): void + public function warning(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void { $this->log('warning', $message, $file, $line, $col); } @@ -77,12 +77,12 @@ class GithubActionReporter * * @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message */ - public function debug(string $message, string $file = null, int $line = null, int $col = null): void + public function debug(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void { $this->log('debug', $message, $file, $line, $col); } - private function log(string $type, string $message, string $file = null, int $line = null, int $col = null): void + private function log(string $type, string $message, ?string $file = null, ?int $line = null, ?int $col = null): void { // Some values must be encoded. $message = strtr($message, self::ESCAPED_DATA); diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index 146f6017..d1810367 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -96,7 +96,7 @@ class Command * * @throws LogicException When the command name is empty */ - public function __construct(string $name = null) + public function __construct(?string $name = null) { $this->definition = new InputDefinition(); @@ -132,7 +132,7 @@ class Command $this->ignoreValidationErrors = true; } - public function setApplication(Application $application = null) + public function setApplication(?Application $application = null) { $this->application = $application; if ($application) { @@ -242,7 +242,7 @@ class Command * * @return int The command exit code * - * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. + * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}. * * @see setCode() * @see execute() @@ -429,11 +429,11 @@ class Command * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) * - * @throws InvalidArgumentException When argument mode is not valid - * * @return $this + * + * @throws InvalidArgumentException When argument mode is not valid */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null) + public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null) { $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); if (null !== $this->fullDefinition) { @@ -450,11 +450,11 @@ class Command * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) * - * @throws InvalidArgumentException If option mode is invalid or incompatible - * * @return $this + * + * @throws InvalidArgumentException If option mode is invalid or incompatible */ - public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) + public function addOption(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null) { $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); if (null !== $this->fullDefinition) { @@ -518,7 +518,7 @@ class Command * * @final since Symfony 5.1 */ - public function setHidden(bool $hidden /*= true*/) + public function setHidden(bool $hidden /* = true */) { $this->hidden = $hidden; diff --git a/vendor/symfony/console/Command/CompleteCommand.php b/vendor/symfony/console/Command/CompleteCommand.php index 97357d67..0e35143c 100644 --- a/vendor/symfony/console/Command/CompleteCommand.php +++ b/vendor/symfony/console/Command/CompleteCommand.php @@ -65,15 +65,15 @@ final class CompleteCommand extends Command { try { // uncomment when a bugfix or BC break has been introduced in the shell completion scripts - //$version = $input->getOption('symfony'); - //if ($version && version_compare($version, 'x.y', '>=')) { + // $version = $input->getOption('symfony'); + // if ($version && version_compare($version, 'x.y', '>=')) { // $message = sprintf('Completion script version is not supported ("%s" given, ">=x.y" required).', $version); // $this->log($message); // $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.'); // return 126; - //} + // } $shell = $input->getOption('shell'); if (!$shell) { @@ -105,11 +105,12 @@ final class CompleteCommand extends Command } elseif ( $completionInput->mustSuggestArgumentValuesFor('command') && $command->getName() !== $completionInput->getCompletionValue() + && !\in_array($completionInput->getCompletionValue(), $command->getAliases(), true) ) { $this->log(' No command found, completing using the Application class.'); // expand shortcut names ("cache:cl") into their full name ("cache:clear") - $suggestions->suggestValue($command->getName()); + $suggestions->suggestValues(array_filter(array_merge([$command->getName()], $command->getAliases()))); } else { $command->mergeApplicationDefinition(); $completionInput->bind($command->getDefinition()); @@ -154,10 +155,10 @@ final class CompleteCommand extends Command throw $e; } - return self::FAILURE; + return 2; } - return self::SUCCESS; + return 0; } private function createCompletionInput(InputInterface $input): CompletionInput diff --git a/vendor/symfony/console/Command/DumpCompletionCommand.php b/vendor/symfony/console/Command/DumpCompletionCommand.php index 64a80053..eaf22be1 100644 --- a/vendor/symfony/console/Command/DumpCompletionCommand.php +++ b/vendor/symfony/console/Command/DumpCompletionCommand.php @@ -41,7 +41,7 @@ final class DumpCompletionCommand extends Command { $fullCommand = $_SERVER['PHP_SELF']; $commandName = basename($fullCommand); - $fullCommand = realpath($fullCommand) ?: $fullCommand; + $fullCommand = @realpath($fullCommand) ?: $fullCommand; $this ->setHelp(<<%command.full_name% bash | sudo tee /etc/bash_completion.d/${commandName} + %command.full_name% bash | sudo tee /etc/bash_completion.d/{$commandName} Or dump the script to a local file and source it: @@ -70,7 +70,7 @@ Or dump the script to a local file and source it: Add this to the end of your shell configuration file (e.g. "~/.bashrc"): - eval "$(${fullCommand} completion bash)" + eval "$({$fullCommand} completion bash)" EOH ) ->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given') @@ -85,7 +85,7 @@ EOH if ($input->getOption('debug')) { $this->tailDebugLog($commandName, $output); - return self::SUCCESS; + return 0; } $shell = $input->getArgument('shell') ?? self::guessShell(); @@ -93,15 +93,21 @@ EOH if (!file_exists($completionFile)) { $supportedShells = $this->getSupportedShells(); - ($output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output) - ->writeln(sprintf('Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").', $shell, implode('", "', $supportedShells))); + if ($output instanceof ConsoleOutputInterface) { + $output = $output->getErrorOutput(); + } + if ($shell) { + $output->writeln(sprintf('Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").', $shell, implode('", "', $supportedShells))); + } else { + $output->writeln(sprintf('Shell not detected, Symfony shell completion only supports "%s").', implode('", "', $supportedShells))); + } - return self::INVALID; + return 2; } $output->write(str_replace(['{{ COMMAND_NAME }}', '{{ VERSION }}'], [$commandName, $this->getApplication()->getVersion()], file_get_contents($completionFile))); - return self::SUCCESS; + return 0; } private static function guessShell(): string @@ -126,8 +132,14 @@ EOH */ private function getSupportedShells(): array { - return array_map(function ($f) { - return pathinfo($f, \PATHINFO_EXTENSION); - }, glob(__DIR__.'/../Resources/completion.*')); + $shells = []; + + foreach (new \DirectoryIterator(__DIR__.'/../Resources/') as $file) { + if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) { + $shells[] = $file->getExtension(); + } + } + + return $shells; } } diff --git a/vendor/symfony/console/Command/LazyCommand.php b/vendor/symfony/console/Command/LazyCommand.php index e576ad03..302a0809 100644 --- a/vendor/symfony/console/Command/LazyCommand.php +++ b/vendor/symfony/console/Command/LazyCommand.php @@ -43,7 +43,7 @@ final class LazyCommand extends Command $this->getCommand()->ignoreValidationErrors(); } - public function setApplication(Application $application = null): void + public function setApplication(?Application $application = null): void { if ($this->command instanceof parent) { $this->command->setApplication($application); @@ -117,7 +117,7 @@ final class LazyCommand extends Command /** * @return $this */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null): self + public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null): self { $this->getCommand()->addArgument($name, $mode, $description, $default); @@ -127,7 +127,7 @@ final class LazyCommand extends Command /** * @return $this */ - public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null): self + public function addOption(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null): self { $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default); diff --git a/vendor/symfony/console/Command/LockableTrait.php b/vendor/symfony/console/Command/LockableTrait.php index b1856dca..d21edc2c 100644 --- a/vendor/symfony/console/Command/LockableTrait.php +++ b/vendor/symfony/console/Command/LockableTrait.php @@ -30,7 +30,7 @@ trait LockableTrait /** * Locks a command. */ - private function lock(string $name = null, bool $blocking = false): bool + private function lock(?string $name = null, bool $blocking = false): bool { if (!class_exists(SemaphoreStore::class)) { throw new LogicException('To enable the locking feature you must install the symfony/lock component.'); diff --git a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php b/vendor/symfony/console/Completion/Output/BashCompletionOutput.php index 8d5ffa6b..c6f76eb8 100644 --- a/vendor/symfony/console/Completion/Output/BashCompletionOutput.php +++ b/vendor/symfony/console/Completion/Output/BashCompletionOutput.php @@ -24,6 +24,9 @@ class BashCompletionOutput implements CompletionOutputInterface $values = $suggestions->getValueSuggestions(); foreach ($suggestions->getOptionSuggestions() as $option) { $values[] = '--'.$option->getName(); + if ($option->isNegatable()) { + $values[] = '--no-'.$option->getName(); + } } $output->writeln(implode("\n", $values)); } diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php index 743e306d..1fbb212e 100644 --- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php @@ -67,7 +67,7 @@ class AddConsoleCommandPass implements CompilerPassInterface if (!$r->isSubclassOf(Command::class)) { throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); } - $aliases = $class::getDefaultName(); + $aliases = str_replace('%', '%%', $class::getDefaultName() ?? ''); } $aliases = explode('|', $aliases ?? ''); @@ -124,7 +124,7 @@ class AddConsoleCommandPass implements CompilerPassInterface if (!$r->isSubclassOf(Command::class)) { throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); } - $description = $class::getDefaultDescription(); + $description = str_replace('%', '%%', $class::getDefaultDescription() ?? ''); } if ($description) { diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php index fac01ad3..eb11b4f9 100644 --- a/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php @@ -43,7 +43,7 @@ class ApplicationDescription */ private $aliases; - public function __construct(Application $application, string $namespace = null, bool $showHidden = false) + public function __construct(Application $application, ?string $namespace = null, bool $showHidden = false) { $this->application = $application; $this->namespace = $namespace; @@ -131,7 +131,7 @@ class ApplicationDescription } if ($namespacedCommands) { - ksort($namespacedCommands); + ksort($namespacedCommands, \SORT_STRING); foreach ($namespacedCommands as $key => $commandsSet) { ksort($commandsSet); $sortedCommands[$key] = $commandsSet; diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php index 4f7cd8b3..f17e5f1f 100644 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -79,7 +79,7 @@ class XmlDescriptor extends Descriptor return $dom; } - public function getApplicationDocument(Application $application, string $namespace = null, bool $short = false): \DOMDocument + public function getApplicationDocument(Application $application, ?string $namespace = null, bool $short = false): \DOMDocument { $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->appendChild($rootXml = $dom->createElement('symfony')); diff --git a/vendor/symfony/console/Event/ConsoleCommandEvent.php b/vendor/symfony/console/Event/ConsoleCommandEvent.php index 08bd18fd..1b4f9f9b 100644 --- a/vendor/symfony/console/Event/ConsoleCommandEvent.php +++ b/vendor/symfony/console/Event/ConsoleCommandEvent.php @@ -12,7 +12,10 @@ namespace Symfony\Component\Console\Event; /** - * Allows to do things before the command is executed, like skipping the command or changing the input. + * Allows to do things before the command is executed, like skipping the command or executing code before the command is + * going to be executed. + * + * Changing the input arguments will have no effect. * * @author Fabien Potencier */ diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php index 57d9b38b..d4c26493 100644 --- a/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ b/vendor/symfony/console/Event/ConsoleErrorEvent.php @@ -25,7 +25,7 @@ final class ConsoleErrorEvent extends ConsoleEvent private $error; private $exitCode; - public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null) + public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, ?Command $command = null) { parent::__construct($command, $input, $output); diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php index 897d9853..e9c9e3ea 100644 --- a/vendor/symfony/console/EventListener/ErrorListener.php +++ b/vendor/symfony/console/EventListener/ErrorListener.php @@ -26,7 +26,7 @@ class ErrorListener implements EventSubscriberInterface { private $logger; - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger; } diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php index 910ae192..81ec318a 100644 --- a/vendor/symfony/console/Exception/CommandNotFoundException.php +++ b/vendor/symfony/console/Exception/CommandNotFoundException.php @@ -26,7 +26,7 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce * @param int $code Exception code * @param \Throwable|null $previous Previous exception used for the exception chaining */ - public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) + public function __construct(string $message, array $alternatives = [], int $code = 0, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); diff --git a/vendor/symfony/console/Exception/InvalidOptionException.php b/vendor/symfony/console/Exception/InvalidOptionException.php index b2eec616..5cf62792 100644 --- a/vendor/symfony/console/Exception/InvalidOptionException.php +++ b/vendor/symfony/console/Exception/InvalidOptionException.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Console\Exception; /** - * Represents an incorrect option name typed in the console. + * Represents an incorrect option name or value typed in the console. * * @author Jérôme Tamarelle */ diff --git a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php index 9232510f..afd3d004 100644 --- a/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/NullOutputFormatterStyle.php @@ -27,7 +27,7 @@ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface /** * {@inheritdoc} */ - public function setBackground(string $color = null): void + public function setBackground(?string $color = null): void { // do nothing } @@ -35,7 +35,7 @@ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface /** * {@inheritdoc} */ - public function setForeground(string $color = null): void + public function setForeground(?string $color = null): void { // do nothing } diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index 603e5dca..4ec60024 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -13,6 +13,8 @@ namespace Symfony\Component\Console\Formatter; use Symfony\Component\Console\Exception\InvalidArgumentException; +use function Symfony\Component\String\b; + /** * Formatter class for console output. * @@ -258,7 +260,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface } preg_match('~(\\n)$~', $text, $matches); - $text = $prefix.preg_replace('~([^\\n]{'.$width.'})\\ *~', "\$1\n", $text); + $text = $prefix.$this->addLineBreaks($text, $width); $text = rtrim($text, "\n").($matches[1] ?? ''); if (!$currentLineLength && '' !== $current && "\n" !== substr($current, -1)) { @@ -282,4 +284,11 @@ class OutputFormatter implements WrappableOutputFormatterInterface return implode("\n", $lines); } + + private function addLineBreaks(string $text, int $width): string + { + $encoding = mb_detect_encoding($text, null, true) ?: 'UTF-8'; + + return b($text)->toCodePointString($encoding)->wordwrap($width, "\n", true)->toByteString($encoding); + } } diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php index 0fb36ac6..d7ae6649 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -33,7 +33,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * @param string|null $foreground The style foreground color name * @param string|null $background The style background color name */ - public function __construct(string $foreground = null, string $background = null, array $options = []) + public function __construct(?string $foreground = null, ?string $background = null, array $options = []) { $this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options); } @@ -41,7 +41,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface /** * {@inheritdoc} */ - public function setForeground(string $color = null) + public function setForeground(?string $color = null) { $this->color = new Color($this->foreground = $color ?: '', $this->background, $this->options); } @@ -49,7 +49,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface /** * {@inheritdoc} */ - public function setBackground(string $color = null) + public function setBackground(?string $color = null) { $this->color = new Color($this->foreground, $this->background = $color ?: '', $this->options); } @@ -96,7 +96,8 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface { if (null === $this->handlesHrefGracefully) { $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); + && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100) + && !isset($_SERVER['IDEA_INITIAL_DIRECTORY']); } if (null !== $this->href && $this->handlesHrefGracefully) { diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php index b30560d2..89e4d243 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php @@ -21,12 +21,12 @@ interface OutputFormatterStyleInterface /** * Sets style foreground color. */ - public function setForeground(string $color = null); + public function setForeground(?string $color = null); /** * Sets style background color. */ - public function setBackground(string $color = null); + public function setBackground(?string $color = null); /** * Sets some specific style option. diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index fc48dc0e..1b935630 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -26,7 +26,7 @@ class OutputFormatterStyleStack implements ResetInterface private $emptyStyle; - public function __construct(OutputFormatterStyleInterface $emptyStyle = null) + public function __construct(?OutputFormatterStyleInterface $emptyStyle = null) { $this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle(); $this->reset(); @@ -55,7 +55,7 @@ class OutputFormatterStyleStack implements ResetInterface * * @throws InvalidArgumentException When style tags incorrectly nested */ - public function pop(OutputFormatterStyleInterface $style = null) + public function pop(?OutputFormatterStyleInterface $style = null) { if (empty($this->styles)) { return $this->emptyStyle; diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php index b013b6c5..605e4d70 100644 --- a/vendor/symfony/console/Helper/Dumper.php +++ b/vendor/symfony/console/Helper/Dumper.php @@ -26,7 +26,7 @@ final class Dumper private $cloner; private $handler; - public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) + public function __construct(OutputInterface $output, ?CliDumper $dumper = null, ?ClonerInterface $cloner = null) { $this->output = $output; $this->dumper = $dumper; diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php index 50f51c79..6b3f7f43 100644 --- a/vendor/symfony/console/Helper/Helper.php +++ b/vendor/symfony/console/Helper/Helper.php @@ -26,7 +26,7 @@ abstract class Helper implements HelperInterface /** * {@inheritdoc} */ - public function setHelperSet(HelperSet $helperSet = null) + public function setHelperSet(?HelperSet $helperSet = null) { $this->helperSet = $helperSet; } @@ -96,7 +96,7 @@ abstract class Helper implements HelperInterface * * @return string */ - public static function substr(?string $string, int $from, int $length = null) + public static function substr(?string $string, int $from, ?int $length = null) { $string ?? $string = ''; @@ -171,6 +171,8 @@ abstract class Helper implements HelperInterface $string = $formatter->format($string ?? ''); // remove already formatted characters $string = preg_replace("/\033\[[^m]*m/", '', $string ?? ''); + // remove terminal hyperlinks + $string = preg_replace('/\\033]8;[^;]*;[^\\033]*\\033\\\\/', '', $string ?? ''); $formatter->setDecorated($isDecorated); return $string; diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php index fc952b48..5bf4d632 100644 --- a/vendor/symfony/console/Helper/HelperInterface.php +++ b/vendor/symfony/console/Helper/HelperInterface.php @@ -21,7 +21,7 @@ interface HelperInterface /** * Sets the helper set associated with this helper. */ - public function setHelperSet(HelperSet $helperSet = null); + public function setHelperSet(?HelperSet $helperSet = null); /** * Gets the helper set associated with this helper. diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php index 719762d2..c870ab99 100644 --- a/vendor/symfony/console/Helper/HelperSet.php +++ b/vendor/symfony/console/Helper/HelperSet.php @@ -37,7 +37,7 @@ class HelperSet implements \IteratorAggregate } } - public function set(HelperInterface $helper, string $alias = null) + public function set(HelperInterface $helper, ?string $alias = null) { $this->helpers[$helper->getName()] = $helper; if (null !== $alias) { @@ -76,7 +76,7 @@ class HelperSet implements \IteratorAggregate /** * @deprecated since Symfony 5.4 */ - public function setCommand(Command $command = null) + public function setCommand(?Command $command = null) { trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__); diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php index 4ea3d724..86a250b2 100644 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ b/vendor/symfony/console/Helper/ProcessHelper.php @@ -32,7 +32,7 @@ class ProcessHelper extends Helper * @param callable|null $callback A PHP callback to run whenever there is some * output available on STDOUT or STDERR */ - public function run(OutputInterface $output, $cmd, string $error = null, callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process + public function run(OutputInterface $output, $cmd, ?string $error = null, ?callable $callback = null, int $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE): Process { if (!class_exists(Process::class)) { throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".'); @@ -98,7 +98,7 @@ class ProcessHelper extends Helper * * @see run() */ - public function mustRun(OutputInterface $output, $cmd, string $error = null, callable $callback = null): Process + public function mustRun(OutputInterface $output, $cmd, ?string $error = null, ?callable $callback = null): Process { $process = $this->run($output, $cmd, $error, $callback); @@ -112,7 +112,7 @@ class ProcessHelper extends Helper /** * Wraps a Process callback to add debugging output. */ - public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null): callable + public function wrapCallback(OutputInterface $output, Process $process, ?callable $callback = null): callable { if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index b1fb213b..6250732e 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -53,7 +53,6 @@ final class ProgressBar private $startTime; private $stepWidth; private $percent = 0.0; - private $formatLineCount; private $messages = []; private $overwrite = true; private $terminal; @@ -170,9 +169,12 @@ final class ProgressBar $this->messages[$name] = $message; } + /** + * @return string|null + */ public function getMessage(string $name = 'message') { - return $this->messages[$name]; + return $this->messages[$name] ?? null; } public function getStartTime(): int @@ -294,7 +296,7 @@ final class ProgressBar * * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable */ - public function iterate(iterable $iterable, int $max = null): iterable + public function iterate(iterable $iterable, ?int $max = null): iterable { $this->start($max ?? (is_countable($iterable) ? \count($iterable) : 0)); @@ -312,7 +314,7 @@ final class ProgressBar * * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged */ - public function start(int $max = null) + public function start(?int $max = null) { $this->startTime = time(); $this->step = 0; @@ -446,8 +448,6 @@ final class ProgressBar } else { $this->format = $format; } - - $this->formatLineCount = substr_count($this->format, "\n"); } /** @@ -464,7 +464,7 @@ final class ProgressBar if ($this->overwrite) { if (null !== $this->previousMessage) { if ($this->output instanceof ConsoleSectionOutput) { - $messageLines = explode("\n", $message); + $messageLines = explode("\n", $this->previousMessage); $lineCount = \count($messageLines); foreach ($messageLines as $messageLine) { $messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine)); @@ -474,7 +474,8 @@ final class ProgressBar } $this->output->clear($lineCount); } else { - for ($i = 0; $i < $this->formatLineCount; ++$i) { + $lineCount = substr_count($this->previousMessage, "\n"); + for ($i = 0; $i < $lineCount; ++$i) { $this->cursor->moveToColumn(1); $this->cursor->clearLine(); $this->cursor->moveUp(); diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php index 3482343f..3cc0e145 100644 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/vendor/symfony/console/Helper/ProgressIndicator.php @@ -50,7 +50,7 @@ class ProgressIndicator * @param int $indicatorChangeInterval Change interval in milliseconds * @param array|null $indicatorValues Animated indicator characters */ - public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null) + public function __construct(OutputInterface $output, ?string $format = null, int $indicatorChangeInterval = 100, ?array $indicatorValues = null) { $this->output = $output; @@ -129,8 +129,6 @@ class ProgressIndicator /** * Finish the indicator with message. - * - * @param $message */ public function finish(string $message) { diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index 842a618e..7b9de922 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -24,6 +24,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Terminal; + use function Symfony\Component\String\s; /** @@ -127,7 +128,18 @@ class QuestionHelper extends Helper } if (false === $ret) { + $isBlocked = stream_get_meta_data($inputStream)['blocked'] ?? true; + + if (!$isBlocked) { + stream_set_blocking($inputStream, true); + } + $ret = $this->readInput($inputStream, $question); + + if (!$isBlocked) { + stream_set_blocking($inputStream, false); + } + if (false === $ret) { throw new MissingInputException('Aborted.'); } @@ -491,21 +503,7 @@ class QuestionHelper extends Helper return self::$stdinIsInteractive; } - if (\function_exists('stream_isatty')) { - return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r')); - } - - if (\function_exists('posix_isatty')) { - return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r')); - } - - if (!\function_exists('exec')) { - return self::$stdinIsInteractive = true; - } - - exec('stty 2> /dev/null', $output, $status); - - return self::$stdinIsInteractive = 1 !== $status; + return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r')); } /** diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index 067d4f15..698f9693 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -451,7 +451,7 @@ class Table * * +-----+-----------+-------+ */ - private function renderRowSeparator(int $type = self::SEPARATOR_MID, string $title = null, string $titleFormat = null) + private function renderRowSeparator(int $type = self::SEPARATOR_MID, ?string $title = null, ?string $titleFormat = null) { if (0 === $count = $this->numberOfColumns) { return; @@ -516,7 +516,7 @@ class Table * * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | */ - private function renderRow(array $row, string $cellFormat, string $firstCellFormat = null) + private function renderRow(array $row, string $cellFormat, ?string $firstCellFormat = null) { $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); $columns = $this->getRowColumns($row); @@ -621,9 +621,10 @@ class Table if (!strstr($cell ?? '', "\n")) { continue; } - $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell))); + $eol = str_contains($cell ?? '', "\r\n") ? "\r\n" : "\n"; + $escaped = implode($eol, array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode($eol, $cell))); $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; - $lines = explode("\n", str_replace("\n", "\n", $cell)); + $lines = explode($eol, str_replace($eol, ''.$eol, $cell)); foreach ($lines as $lineKey => $line) { if ($colspan > 1) { $line = new TableCell($line, ['colspan' => $colspan]); @@ -678,15 +679,16 @@ class Table { $unmergedRows = []; foreach ($rows[$line] as $column => $cell) { - if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { + if (null !== $cell && !$cell instanceof TableCell && !\is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing "__toString()", "%s" given.', get_debug_type($cell))); } if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; $lines = [$cell]; if (strstr($cell, "\n")) { - $lines = explode("\n", str_replace("\n", "\n", $cell)); - $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; + $eol = str_contains($cell, "\r\n") ? "\r\n" : "\n"; + $lines = explode($eol, str_replace($eol, ''.$eol.'', $cell)); + $nbLines = \count($lines) > $nbLines ? substr_count($cell, $eol) : $nbLines; $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan(), 'style' => $cell->getStyle()]); unset($lines[0]); @@ -800,18 +802,18 @@ class Table continue; } - foreach ($row as $i => $cell) { - if ($cell instanceof TableCell) { - $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell); - $textLength = Helper::width($textContent); - if ($textLength > 0) { - $contentColumns = str_split($textContent, ceil($textLength / $cell->getColspan())); - foreach ($contentColumns as $position => $content) { - $row[$i + $position] = $content; + foreach ($row as $i => $cell) { + if ($cell instanceof TableCell) { + $textContent = Helper::removeDecoration($this->output->getFormatter(), $cell); + $textLength = Helper::width($textContent); + if ($textLength > 0) { + $contentColumns = mb_str_split($textContent, ceil($textLength / $cell->getColspan())); + foreach ($contentColumns as $position => $content) { + $row[$i + $position] = $content; + } } } } - } $lengths[] = $this->getCellWidth($row, $column); } diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php index dfc41e6a..0643c79e 100644 --- a/vendor/symfony/console/Helper/TableStyle.php +++ b/vendor/symfony/console/Helper/TableStyle.php @@ -90,7 +90,7 @@ class TableStyle * * @return $this */ - public function setHorizontalBorderChars(string $outside, string $inside = null): self + public function setHorizontalBorderChars(string $outside, ?string $inside = null): self { $this->horizontalOutsideBorderChar = $outside; $this->horizontalInsideBorderChar = $inside ?? $outside; @@ -115,7 +115,7 @@ class TableStyle * * @return $this */ - public function setVerticalBorderChars(string $outside, string $inside = null): self + public function setVerticalBorderChars(string $outside, ?string $inside = null): self { $this->verticalOutsideBorderChar = $outside; $this->verticalInsideBorderChar = $inside ?? $outside; @@ -169,7 +169,7 @@ class TableStyle * * @return $this */ - public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, string $topLeftBottom = null, string $topMidBottom = null, string $topRightBottom = null): self + public function setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft, ?string $topLeftBottom = null, ?string $topMidBottom = null, ?string $topRightBottom = null): self { $this->crossingChar = $cross; $this->crossingTopLeftChar = $topLeft; diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php index 675b9ef5..0c4b2d25 100644 --- a/vendor/symfony/console/Input/ArgvInput.php +++ b/vendor/symfony/console/Input/ArgvInput.php @@ -43,7 +43,7 @@ class ArgvInput extends Input private $tokens; private $parsed; - public function __construct(array $argv = null, InputDefinition $definition = null) + public function __construct(?array $argv = null, ?InputDefinition $definition = null) { $argv = $argv ?? $_SERVER['argv'] ?? []; diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php index c6516148..21a517cf 100644 --- a/vendor/symfony/console/Input/ArrayInput.php +++ b/vendor/symfony/console/Input/ArrayInput.php @@ -27,7 +27,7 @@ class ArrayInput extends Input { private $parameters; - public function __construct(array $parameters, InputDefinition $definition = null) + public function __construct(array $parameters, ?InputDefinition $definition = null) { $this->parameters = $parameters; diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php index d37460ed..0faab2cf 100644 --- a/vendor/symfony/console/Input/Input.php +++ b/vendor/symfony/console/Input/Input.php @@ -33,7 +33,7 @@ abstract class Input implements InputInterface, StreamableInputInterface protected $arguments = []; protected $interactive = true; - public function __construct(InputDefinition $definition = null) + public function __construct(?InputDefinition $definition = null) { if (null === $definition) { $this->definition = new InputDefinition(); diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php index e891b944..1a8bf44b 100644 --- a/vendor/symfony/console/Input/InputArgument.php +++ b/vendor/symfony/console/Input/InputArgument.php @@ -32,13 +32,13 @@ class InputArgument /** * @param string $name The argument name - * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY * @param string $description A description text * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid */ - public function __construct(string $name, int $mode = null, string $description = '', $default = null) + public function __construct(string $name, ?int $mode = null, string $description = '', $default = null) { if (null === $mode) { $mode = self::OPTIONAL; @@ -92,7 +92,7 @@ class InputArgument */ public function setDefault($default = null) { - if (self::REQUIRED === $this->mode && null !== $default) { + if ($this->isRequired() && null !== $default) { throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); } diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php index 2bec34fe..99807f59 100644 --- a/vendor/symfony/console/Input/InputOption.php +++ b/vendor/symfony/console/Input/InputOption.php @@ -59,7 +59,7 @@ class InputOption * * @throws InvalidArgumentException If option mode is invalid or incompatible */ - public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) + public function __construct(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null) { if (str_starts_with($name, '--')) { $name = substr($name, 2); @@ -69,7 +69,7 @@ class InputOption throw new InvalidArgumentException('An option name cannot be empty.'); } - if (empty($shortcut)) { + if ('' === $shortcut || [] === $shortcut || false === $shortcut) { $shortcut = null; } @@ -78,10 +78,10 @@ class InputOption $shortcut = implode('|', $shortcut); } $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); - $shortcuts = array_filter($shortcuts); + $shortcuts = array_filter($shortcuts, 'strlen'); $shortcut = implode('|', $shortcuts); - if (empty($shortcut)) { + if ('' === $shortcut) { throw new InvalidArgumentException('An option shortcut cannot be empty.'); } } diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/console/LICENSE +++ b/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php index c9ee0356..4a10fa17 100644 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/vendor/symfony/console/Logger/ConsoleLogger.php @@ -110,7 +110,7 @@ class ConsoleLogger extends AbstractLogger $replacements = []; foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { + if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; } elseif ($val instanceof \DateTimeInterface) { $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index f19f9ebf..560aeb58 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -37,7 +37,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) */ - public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) + public function __construct(int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) { parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter); diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php index 8f164975..70d70c50 100644 --- a/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php @@ -43,7 +43,7 @@ class ConsoleSectionOutput extends StreamOutput * * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared */ - public function clear(int $lines = null) + public function clear(?int $lines = null) { if (empty($this->content) || !$this->isDecorated()) { return; diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index d7c5fb2d..28c40bb3 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -37,7 +37,7 @@ abstract class Output implements OutputInterface * @param bool $decorated Whether to decorate messages * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) */ - public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) + public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, ?OutputFormatterInterface $formatter = null) { $this->verbosity = $verbosity ?? self::VERBOSITY_NORMAL; $this->formatter = $formatter ?? new OutputFormatter(); diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index 7f555182..5f5ffce3 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -39,7 +39,7 @@ class StreamOutput extends Output * * @throws InvalidArgumentException When first argument is not a real stream */ - public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) + public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) { if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); @@ -64,9 +64,6 @@ class StreamOutput extends Output return $this->stream; } - /** - * {@inheritdoc} - */ protected function doWrite(string $message, bool $newline) { if ($newline) { @@ -98,18 +95,29 @@ class StreamOutput extends Output return false; } - if ('Hyper' === getenv('TERM_PROGRAM')) { + // Detect msysgit/mingw and assume this is a tty because detection + // does not work correctly, see https://github.com/composer/composer/issues/9690 + if (!@stream_isatty($this->stream) && !\in_array(strtoupper((string) getenv('MSYSTEM')), ['MINGW32', 'MINGW64'], true)) { + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR && @sapi_windows_vt100_support($this->stream)) { return true; } - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($this->stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); + if ('Hyper' === getenv('TERM_PROGRAM') + || false !== getenv('COLORTERM') + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + ) { + return true; } - return stream_isatty($this->stream); + if ('dumb' === $term = (string) getenv('TERM')) { + return false; + } + + // See https://github.com/chalk/supports-color/blob/d4f413efaf8da045c5ab440ed418ef02dbb28bf1/index.js#L157 + return preg_match('/^((screen|xterm|vt100|vt220|putty|rxvt|ansi|cygwin|linux).*)|(.*-256(color)?(-bce)?)$/', $term); } } diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php index 3f4d375f..b08503b3 100644 --- a/vendor/symfony/console/Output/TrimmedBufferOutput.php +++ b/vendor/symfony/console/Output/TrimmedBufferOutput.php @@ -24,7 +24,7 @@ class TrimmedBufferOutput extends Output private $maxLength; private $buffer = ''; - public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) + public function __construct(int $maxLength, ?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, ?OutputFormatterInterface $formatter = null) { if ($maxLength <= 0) { throw new InvalidArgumentException(sprintf('"%s()" expects a strictly positive maxLength. Got %d.', __METHOD__, $maxLength)); diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php index 3a73f04b..ba574428 100644 --- a/vendor/symfony/console/Question/Question.php +++ b/vendor/symfony/console/Question/Question.php @@ -186,7 +186,7 @@ class Question * * @return $this */ - public function setAutocompleterCallback(callable $callback = null): self + public function setAutocompleterCallback(?callable $callback = null): self { if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); @@ -202,7 +202,7 @@ class Question * * @return $this */ - public function setValidator(callable $validator = null) + public function setValidator(?callable $validator = null) { $this->validator = $validator; diff --git a/vendor/symfony/console/Resources/completion.bash b/vendor/symfony/console/Resources/completion.bash index c5e89c3c..64b87ccf 100644 --- a/vendor/symfony/console/Resources/completion.bash +++ b/vendor/symfony/console/Resources/completion.bash @@ -11,18 +11,21 @@ _sf_{{ COMMAND_NAME }}() { local sf_cmd="${COMP_WORDS[0]}" # for an alias, get the real script behind it - if [[ $(type -t $sf_cmd) == "alias" ]]; then + sf_cmd_type=$(type -t $sf_cmd) + if [[ $sf_cmd_type == "alias" ]]; then sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/") + elif [[ $sf_cmd_type == "file" ]]; then + sf_cmd=$(type -p $sf_cmd) fi - if [ ! -f "$sf_cmd" ]; then + if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then return 1 fi local cur prev words cword _get_comp_words_by_ref -n := cur prev words cword - local completecmd=("$sf_cmd" "_complete" "-sbash" "-c$cword" "-S{{ VERSION }}") + local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-S{{ VERSION }}") for w in ${words[@]}; do w=$(printf -- '%b' "$w") # remove quotes from typed values diff --git a/vendor/symfony/console/SignalRegistry/SignalRegistry.php b/vendor/symfony/console/SignalRegistry/SignalRegistry.php index ed93dd06..6bee24a4 100644 --- a/vendor/symfony/console/SignalRegistry/SignalRegistry.php +++ b/vendor/symfony/console/SignalRegistry/SignalRegistry.php @@ -43,7 +43,7 @@ final class SignalRegistry return false; } - if (\in_array('pcntl_signal', explode(',', ini_get('disable_functions')))) { + if (\in_array('pcntl_signal', explode(',', \ini_get('disable_functions')))) { return false; } diff --git a/vendor/symfony/console/SingleCommandApplication.php b/vendor/symfony/console/SingleCommandApplication.php index e93c1821..774e5d8c 100644 --- a/vendor/symfony/console/SingleCommandApplication.php +++ b/vendor/symfony/console/SingleCommandApplication.php @@ -46,7 +46,7 @@ class SingleCommandApplication extends Command return $this; } - public function run(InputInterface $input = null, OutputInterface $output = null): int + public function run(?InputInterface $input = null, ?OutputInterface $output = null): int { if ($this->running) { return parent::run($input, $output); diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php index 38d23b77..9f25a43f 100644 --- a/vendor/symfony/console/Style/StyleInterface.php +++ b/vendor/symfony/console/Style/StyleInterface.php @@ -85,14 +85,14 @@ interface StyleInterface * * @return mixed */ - public function ask(string $question, string $default = null, callable $validator = null); + public function ask(string $question, ?string $default = null, ?callable $validator = null); /** * Asks a question with the user input hidden. * * @return mixed */ - public function askHidden(string $question, callable $validator = null); + public function askHidden(string $question, ?callable $validator = null); /** * Asks for confirmation. diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index bcf30d80..00edf388 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -61,7 +61,7 @@ class SymfonyStyle extends OutputStyle * * @param string|array $messages The message to write in the block */ - public function block($messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) + public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true) { $messages = \is_array($messages) ? array_values($messages) : [$messages]; @@ -250,7 +250,7 @@ class SymfonyStyle extends OutputStyle /** * {@inheritdoc} */ - public function ask(string $question, string $default = null, callable $validator = null) + public function ask(string $question, ?string $default = null, ?callable $validator = null) { $question = new Question($question, $default); $question->setValidator($validator); @@ -261,7 +261,7 @@ class SymfonyStyle extends OutputStyle /** * {@inheritdoc} */ - public function askHidden(string $question, callable $validator = null) + public function askHidden(string $question, ?callable $validator = null) { $question = new Question($question); @@ -338,7 +338,7 @@ class SymfonyStyle extends OutputStyle /** * @see ProgressBar::iterate() */ - public function progressIterate(iterable $iterable, int $max = null): iterable + public function progressIterate(iterable $iterable, ?int $max = null): iterable { yield from $this->createProgressBar()->iterate($iterable, $max); @@ -440,18 +440,18 @@ class SymfonyStyle extends OutputStyle $chars = substr(str_replace(\PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); if (!isset($chars[0])) { - $this->newLine(); //empty history, so we should start with a new line. + $this->newLine(); // empty history, so we should start with a new line. return; } - //Prepend new line for each non LF chars (This means no blank line was output before) + // Prepend new line for each non LF chars (This means no blank line was output before) $this->newLine(2 - substr_count($chars, "\n")); } private function autoPrependText(): void { $fetched = $this->bufferedOutput->fetch(); - //Prepend new line if last char isn't EOL: + // Prepend new line if last char isn't EOL: if (!str_ends_with($fetched, "\n")) { $this->newLine(); } @@ -463,7 +463,7 @@ class SymfonyStyle extends OutputStyle $this->bufferedOutput->write($message, $newLine, $type); } - private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array + private function createBlock(iterable $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array { $indentLength = 0; $prefixLength = Helper::width(Helper::removeDecoration($this->getFormatter(), $prefix)); diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php index 08c53535..b91e8afc 100644 --- a/vendor/symfony/console/Terminal.php +++ b/vendor/symfony/console/Terminal.php @@ -64,20 +64,19 @@ class Terminal return self::$stty; } - // skip check if exec function is disabled - if (!\function_exists('exec')) { + // skip check if shell_exec function is disabled + if (!\function_exists('shell_exec')) { return false; } - exec('stty 2>&1', $output, $exitcode); - - return self::$stty = 0 === $exitcode; + return self::$stty = (bool) shell_exec('stty 2> '.('\\' === \DIRECTORY_SEPARATOR ? 'NUL' : '/dev/null')); } private static function initDimensions() { if ('\\' === \DIRECTORY_SEPARATOR) { - if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { + $ansicon = getenv('ANSICON'); + if (false !== $ansicon && preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim($ansicon), $matches)) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" self::$width = (int) $matches[1]; @@ -157,6 +156,8 @@ class Terminal 2 => ['pipe', 'w'], ]; + $cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0; + $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (!\is_resource($process)) { return null; @@ -167,6 +168,10 @@ class Terminal fclose($pipes[2]); proc_close($process); + if ($cp) { + sapi_windows_cp_set($cp); + } + return $info; } } diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php index 19a95c8e..3a262e81 100644 --- a/vendor/symfony/console/Tester/ApplicationTester.php +++ b/vendor/symfony/console/Tester/ApplicationTester.php @@ -49,17 +49,37 @@ class ApplicationTester */ public function run(array $input, array $options = []) { - $this->input = new ArrayInput($input); - if (isset($options['interactive'])) { - $this->input->setInteractive($options['interactive']); + $prevShellVerbosity = getenv('SHELL_VERBOSITY'); + + try { + $this->input = new ArrayInput($input); + if (isset($options['interactive'])) { + $this->input->setInteractive($options['interactive']); + } + + if ($this->inputs) { + $this->input->setStream(self::createStream($this->inputs)); + } + + $this->initOutput($options); + + return $this->statusCode = $this->application->run($this->input, $this->output); + } finally { + // SHELL_VERBOSITY is set by Application::configureIO so we need to unset/reset it + // to its previous value to avoid one test's verbosity to spread to the following tests + if (false === $prevShellVerbosity) { + if (\function_exists('putenv')) { + @putenv('SHELL_VERBOSITY'); + } + unset($_ENV['SHELL_VERBOSITY']); + unset($_SERVER['SHELL_VERBOSITY']); + } else { + if (\function_exists('putenv')) { + @putenv('SHELL_VERBOSITY='.$prevShellVerbosity); + } + $_ENV['SHELL_VERBOSITY'] = $prevShellVerbosity; + $_SERVER['SHELL_VERBOSITY'] = $prevShellVerbosity; + } } - - if ($this->inputs) { - $this->input->setStream(self::createStream($this->inputs)); - } - - $this->initOutput($options); - - return $this->statusCode = $this->application->run($this->input, $this->output); } } diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php index 40bc5817..f454bbf9 100644 --- a/vendor/symfony/console/Tester/TesterTrait.php +++ b/vendor/symfony/console/Tester/TesterTrait.php @@ -35,9 +35,9 @@ trait TesterTrait /** * Gets the display returned by the last execution of the command or application. * - * @throws \RuntimeException If it's called before the execute method - * * @return string + * + * @throws \RuntimeException If it's called before the execute method */ public function getDisplay(bool $normalize = false) { @@ -103,9 +103,9 @@ trait TesterTrait /** * Gets the status code returned by the last execution of the command or application. * - * @throws \RuntimeException If it's called before the execute method - * * @return int + * + * @throws \RuntimeException If it's called before the execute method */ public function getStatusCode() { diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json index 9a565068..4fa4964a 100644 --- a/vendor/symfony/console/composer.json +++ b/vendor/symfony/console/composer.json @@ -2,7 +2,7 @@ "name": "symfony/console", "type": "library", "description": "Eases the creation of beautiful and testable command line interfaces", - "keywords": ["console", "cli", "command line", "terminal"], + "keywords": ["console", "cli", "command-line", "terminal"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ diff --git a/vendor/symfony/css-selector/LICENSE b/vendor/symfony/css-selector/LICENSE index 88bf75bb..00837045 100644 --- a/vendor/symfony/css-selector/LICENSE +++ b/vendor/symfony/css-selector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php b/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php index 0b2767a8..3c77cf09 100644 --- a/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php +++ b/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerPatterns.php @@ -49,22 +49,22 @@ class TokenizerPatterns $this->identifierPattern = '-?(?:'.$this->nmStartPattern.')(?:'.$this->nmCharPattern.')*'; $this->hashPattern = '#((?:'.$this->nmCharPattern.')+)'; $this->numberPattern = '[+-]?(?:[0-9]*\.[0-9]+|[0-9]+)'; - $this->quotedStringPattern = '([^\n\r\f%s]|'.$this->stringEscapePattern.')*'; + $this->quotedStringPattern = '([^\n\r\f\\\\%s]|'.$this->stringEscapePattern.')*'; } public function getNewLineEscapePattern(): string { - return '~^'.$this->newLineEscapePattern.'~'; + return '~'.$this->newLineEscapePattern.'~'; } public function getSimpleEscapePattern(): string { - return '~^'.$this->simpleEscapePattern.'~'; + return '~'.$this->simpleEscapePattern.'~'; } public function getUnicodeEscapePattern(): string { - return '~^'.$this->unicodeEscapePattern.'~i'; + return '~'.$this->unicodeEscapePattern.'~i'; } public function getIdentifierPattern(): string diff --git a/vendor/symfony/error-handler/BufferingLogger.php b/vendor/symfony/error-handler/BufferingLogger.php index fdfc7249..cfd55c61 100644 --- a/vendor/symfony/error-handler/BufferingLogger.php +++ b/vendor/symfony/error-handler/BufferingLogger.php @@ -53,7 +53,7 @@ class BufferingLogger extends AbstractLogger foreach ($this->logs as [$level, $message, $context]) { if (false !== strpos($message, '{')) { foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && \is_callable([$val, '__toString']))) { + if (null === $val || \is_scalar($val) || (\is_object($val) && \is_callable([$val, '__toString']))) { $message = str_replace("{{$key}}", $val, $message); } elseif ($val instanceof \DateTimeInterface) { $message = str_replace("{{$key}}", $val->format(\DateTime::RFC3339), $message); diff --git a/vendor/symfony/error-handler/Debug.php b/vendor/symfony/error-handler/Debug.php index 4a828121..60ddb452 100644 --- a/vendor/symfony/error-handler/Debug.php +++ b/vendor/symfony/error-handler/Debug.php @@ -24,14 +24,13 @@ class Debug if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { ini_set('display_errors', 0); - } elseif (!filter_var(ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || ini_get('error_log')) { + } elseif (!filter_var(\ini_get('log_errors'), \FILTER_VALIDATE_BOOLEAN) || \ini_get('error_log')) { // CLI - display errors only if they're not already logged to STDERR ini_set('display_errors', 1); } @ini_set('zend.assertions', 1); ini_set('assert.active', 1); - ini_set('assert.warning', 0); ini_set('assert.exception', 1); DebugClassLoader::enable(); diff --git a/vendor/symfony/error-handler/DebugClassLoader.php b/vendor/symfony/error-handler/DebugClassLoader.php index e4388fed..5db2f30a 100644 --- a/vendor/symfony/error-handler/DebugClassLoader.php +++ b/vendor/symfony/error-handler/DebugClassLoader.php @@ -21,6 +21,7 @@ use PHPUnit\Framework\MockObject\MockObject; use Prophecy\Prophecy\ProphecySubjectInterface; use ProxyManager\Proxy\ProxyInterface; use Symfony\Component\ErrorHandler\Internal\TentativeTypes; +use Symfony\Component\HttpClient\HttplugClient; /** * Autoloader checking if the class is really defined in the file found. @@ -56,7 +57,7 @@ class DebugClassLoader 'null' => 'null', 'resource' => 'resource', 'boolean' => 'bool', - 'true' => 'bool', + 'true' => 'true', 'false' => 'false', 'integer' => 'int', 'array' => 'array', @@ -73,6 +74,8 @@ class DebugClassLoader 'static' => 'static', '$this' => 'static', 'list' => 'array', + 'class-string' => 'string', + 'never' => 'never', ]; private const BUILTIN_RETURN_TYPES = [ @@ -90,6 +93,9 @@ class DebugClassLoader 'parent' => true, 'mixed' => true, 'static' => true, + 'null' => true, + 'true' => true, + 'never' => true, ]; private const MAGIC_METHODS = [ @@ -295,7 +301,7 @@ class DebugClassLoader $this->checkClass($class, $file); } - private function checkClass(string $class, string $file = null): void + private function checkClass(string $class, ?string $file = null): void { $exists = null === $file || class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); @@ -409,7 +415,9 @@ class DebugClassLoader if (!isset(self::$checkedClasses[$use])) { $this->checkClass($use); } - if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class])) { + if (isset(self::$deprecated[$use]) && strncmp($vendor, str_replace('_', '\\', $use), $vendorLen) && !isset(self::$deprecated[$class]) + && !(HttplugClient::class === $class && \in_array($use, [\Http\Client\HttpClient::class, \Http\Message\RequestFactory::class, \Http\Message\StreamFactory::class, \Http\Message\UriFactory::class], true)) + ) { $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); @@ -755,12 +763,18 @@ class DebugClassLoader return $ownInterfaces; } - private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, \ReflectionType $returnType = null): void + private function setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, ?\ReflectionType $returnType = null): void { if ('__construct' === $method) { return; } + if ('null' === $types) { + self::$returnTypes[$class][$method] = ['null', 'null', $class, $filename]; + + return; + } + if ($nullable = 0 === strpos($types, 'null|')) { $types = substr($types, 5); } elseif ($nullable = '|null' === substr($types, -5)) { @@ -1079,7 +1093,20 @@ EOTXT; } $end = $method->isGenerator() ? $i : $method->getEndLine(); + $inClosure = false; + $braces = 0; for (; $i < $end; ++$i) { + if (!$inClosure) { + $inClosure = false !== strpos($code[$i], 'function ('); + } + + if ($inClosure) { + $braces += substr_count($code[$i], '{') - substr_count($code[$i], '}'); + $inClosure = $braces > 0; + + continue; + } + if ('void' === $returnType) { $fixedCode[$i] = str_replace(' return null;', ' return;', $code[$i]); } elseif ('mixed' === $returnType || '?' === $returnType[0]) { diff --git a/vendor/symfony/error-handler/Error/FatalError.php b/vendor/symfony/error-handler/Error/FatalError.php index 57fc690e..73fa3aaa 100644 --- a/vendor/symfony/error-handler/Error/FatalError.php +++ b/vendor/symfony/error-handler/Error/FatalError.php @@ -20,7 +20,7 @@ class FatalError extends \Error * * @param array $error An array as returned by error_get_last() */ - public function __construct(string $message, int $code, array $error, int $traceOffset = null, bool $traceArgs = true, array $trace = null) + public function __construct(string $message, int $code, array $error, ?int $traceOffset = null, bool $traceArgs = true, ?array $trace = null) { parent::__construct($message, $code); diff --git a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php b/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php index f85d2751..4e1ae8e8 100644 --- a/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php +++ b/vendor/symfony/error-handler/ErrorEnhancer/ClassNotFoundErrorEnhancer.php @@ -21,9 +21,6 @@ use Symfony\Component\ErrorHandler\Error\FatalError; */ class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface { - /** - * {@inheritdoc} - */ public function enhance(\Throwable $error): ?\Throwable { // Some specific versions of PHP produce a fatal error when extending a not found class. @@ -110,7 +107,8 @@ class ClassNotFoundErrorEnhancer implements ErrorEnhancerInterface private function findClassInPath(string $path, string $class, string $prefix): array { - if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { + $path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path); + if (!$path || !is_dir($path)) { return []; } diff --git a/vendor/symfony/error-handler/ErrorHandler.php b/vendor/symfony/error-handler/ErrorHandler.php index ffb823ee..b5109f45 100644 --- a/vendor/symfony/error-handler/ErrorHandler.php +++ b/vendor/symfony/error-handler/ErrorHandler.php @@ -108,7 +108,7 @@ class ErrorHandler /** * Registers the error handler. */ - public static function register(self $handler = null, bool $replace = true): self + public static function register(?self $handler = null, bool $replace = true): self { if (null === self::$reservedMemory) { self::$reservedMemory = str_repeat('x', 32768); @@ -181,7 +181,7 @@ class ErrorHandler } } - public function __construct(BufferingLogger $bootstrappingLogger = null, bool $debug = false) + public function __construct(?BufferingLogger $bootstrappingLogger = null, bool $debug = false) { if ($bootstrappingLogger) { $this->bootstrappingLogger = $bootstrappingLogger; @@ -380,8 +380,8 @@ class ErrorHandler */ private function reRegister(int $prev): void { - if ($prev !== $this->thrownErrors | $this->loggedErrors) { - $handler = set_error_handler('var_dump'); + if ($prev !== ($this->thrownErrors | $this->loggedErrors)) { + $handler = set_error_handler('is_int'); $handler = \is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { @@ -457,7 +457,7 @@ class ErrorHandler return true; } } else { - if (false !== strpos($message, '@anonymous')) { + if (PHP_VERSION_ID < 80303 && false !== strpos($message, '@anonymous')) { $backtrace = debug_backtrace(false, 5); for ($i = 1; isset($backtrace[$i]); ++$i) { @@ -465,8 +465,7 @@ class ErrorHandler && ('trigger_error' === $backtrace[$i]['function'] || 'user_error' === $backtrace[$i]['function']) ) { if ($backtrace[$i]['args'][0] !== $message) { - $message = $this->parseAnonymousClass($backtrace[$i]['args'][0]); - $logMessage = $this->levels[$type].': '.$message; + $message = $backtrace[$i]['args'][0]; } break; @@ -474,6 +473,11 @@ class ErrorHandler } } + if (false !== strpos($message, "@anonymous\0")) { + $message = $this->parseAnonymousClass($message); + $logMessage = $this->levels[$type].': '.$message; + } + $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); if ($throw || $this->tracedErrors & $type) { @@ -513,7 +517,12 @@ class ErrorHandler } // Display the original error message instead of the default one. - $this->handleException($errorAsException); + $exitCode = self::$exitCode; + try { + $this->handleException($errorAsException); + } finally { + self::$exitCode = $exitCode; + } // Stop the process by giving back the error to the native handler. return false; @@ -528,7 +537,7 @@ class ErrorHandler $log = 0; } else { if (\PHP_VERSION_ID < (\PHP_VERSION_ID < 70400 ? 70316 : 70404)) { - $currentErrorHandler = set_error_handler('var_dump'); + $currentErrorHandler = set_error_handler('is_int'); restore_error_handler(); } @@ -633,7 +642,7 @@ class ErrorHandler * * @internal */ - public static function handleFatalError(array $error = null): void + public static function handleFatalError(?array $error = null): void { if (null === self::$reservedMemory) { return; @@ -645,7 +654,7 @@ class ErrorHandler $sameHandlerLimit = 10; while (!\is_array($handler) || !$handler[0] instanceof self) { - $handler = set_exception_handler('var_dump'); + $handler = set_exception_handler('is_int'); restore_exception_handler(); if (!$handler) { @@ -665,6 +674,10 @@ class ErrorHandler set_exception_handler($h); } if (!$handler) { + if (null === $error && $exitCode = self::$exitCode) { + register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); }); + } + return; } if ($handler !== $h) { @@ -700,8 +713,7 @@ class ErrorHandler // Ignore this re-throw } - if ($exit && self::$exitCode) { - $exitCode = self::$exitCode; + if ($exit && $exitCode = self::$exitCode) { register_shutdown_function('register_shutdown_function', function () use ($exitCode) { exit($exitCode); }); } } diff --git a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php index dbd29356..5b264fa5 100644 --- a/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php +++ b/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php @@ -47,7 +47,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface * @param string|FileLinkFormatter|null $fileLinkFormat * @param bool|callable $outputBuffer The output buffer as a string or a callable that should return it */ - public function __construct($debug = false, string $charset = null, $fileLinkFormat = null, string $projectDir = null, $outputBuffer = '', LoggerInterface $logger = null) + public function __construct($debug = false, ?string $charset = null, $fileLinkFormat = null, ?string $projectDir = null, $outputBuffer = '', ?LoggerInterface $logger = null) { if (!\is_bool($debug) && !\is_callable($debug)) { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a boolean or a callable, "%s" given.', __METHOD__, \gettype($debug))); @@ -58,8 +58,8 @@ class HtmlErrorRenderer implements ErrorRendererInterface } $this->debug = $debug; - $this->charset = $charset ?: (ini_get('default_charset') ?: 'UTF-8'); - $this->fileLinkFormat = $fileLinkFormat ?: (ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')); + $this->charset = $charset ?: (\ini_get('default_charset') ?: 'UTF-8'); + $this->fileLinkFormat = $fileLinkFormat ?: (\ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')); $this->projectDir = $projectDir; $this->outputBuffer = $outputBuffer; $this->logger = $logger; @@ -173,6 +173,8 @@ class HtmlErrorRenderer implements ErrorRendererInterface $formattedValue = ''.strtolower(var_export($item[1], true)).''; } elseif ('resource' === $item[0]) { $formattedValue = 'resource'; + } elseif (preg_match('/[^\x07-\x0D\x1B\x20-\xFF]/', $item[1])) { + $formattedValue = 'binary string'; } else { $formattedValue = str_replace("\n", '', $this->escape(var_export($item[1], true))); } @@ -233,7 +235,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface * @param int $line The line number * @param string $text Use this text for the link rather than the file path */ - private function formatFile(string $file, int $line, string $text = null): string + private function formatFile(string $file, int $line, ?string $text = null): string { $file = trim($file); @@ -269,13 +271,25 @@ class HtmlErrorRenderer implements ErrorRendererInterface // highlight_file could throw warnings // see https://bugs.php.net/25725 $code = @highlight_file($file, true); - // remove main code/span tags - $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); - // split multiline spans - $code = preg_replace_callback('#]++)>((?:[^<]*+
    )++[^<]*+)
    #', function ($m) { - return "".str_replace('
    ', "

    ", $m[2]).''; - }, $code); - $content = explode('
    ', $code); + if (\PHP_VERSION_ID >= 80300) { + // remove main pre/code tags + $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); + // split multiline code tags + $code = preg_replace_callback('#]++)>((?:[^<]*+\\n)++[^<]*+)#', function ($m) { + return "".str_replace("\n", "\n", $m[2]).''; + }, $code); + // Convert spaces to html entities to preserve indentation when rendered + $code = str_replace(' ', ' ', $code); + $content = explode("\n", $code); + } else { + // remove main code/span tags + $code = preg_replace('#^\s*(.*)\s*#s', '\\1', $code); + // split multiline spans + $code = preg_replace_callback('#]++)>((?:[^<]*+
    )++[^<]*+)
    #', function ($m) { + return "".str_replace('
    ', "

    ", $m[2]).''; + }, $code); + $content = explode('
    ', $code); + } $lines = []; if (0 > $srcContext) { @@ -315,7 +329,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface { return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) { return 'in '.$this->formatFile($match[2], $match[3]); - }, $text); + }, $text) ?? $text; } private function formatLogMessage(string $message, array $context) @@ -323,7 +337,7 @@ class HtmlErrorRenderer implements ErrorRendererInterface if ($context && false !== strpos($message, '{')) { $replacements = []; foreach ($context as $key => $val) { - if (is_scalar($val)) { + if (\is_scalar($val)) { $replacements['{'.$key.'}'] = $val; } } diff --git a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php b/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php index cec8e4d4..e6c4c898 100644 --- a/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php +++ b/vendor/symfony/error-handler/ErrorRenderer/SerializerErrorRenderer.php @@ -34,7 +34,7 @@ class SerializerErrorRenderer implements ErrorRendererInterface * formats not supported by Request::getMimeTypes() should be given as mime types * @param bool|callable $debug The debugging mode as a boolean or a callable that should return it */ - public function __construct(SerializerInterface $serializer, $format, ErrorRendererInterface $fallbackErrorRenderer = null, $debug = false) + public function __construct(SerializerInterface $serializer, $format, ?ErrorRendererInterface $fallbackErrorRenderer = null, $debug = false) { if (!\is_string($format) && !\is_callable($format)) { throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be a string or a callable, "%s" given.', __METHOD__, \gettype($format))); @@ -55,7 +55,7 @@ class SerializerErrorRenderer implements ErrorRendererInterface */ public function render(\Throwable $exception): FlattenException { - $headers = []; + $headers = ['Vary' => 'Accept']; $debug = \is_bool($this->debug) ? $this->debug : ($this->debug)($exception); if ($debug) { $headers['X-Debug-Exception'] = rawurlencode($exception->getMessage()); @@ -66,19 +66,17 @@ class SerializerErrorRenderer implements ErrorRendererInterface try { $format = \is_string($this->format) ? $this->format : ($this->format)($flattenException); - $headers = [ - 'Content-Type' => Request::getMimeTypes($format)[0] ?? $format, - 'Vary' => 'Accept', - ]; + $headers['Content-Type'] = Request::getMimeTypes($format)[0] ?? $format; - return $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ + $flattenException->setAsString($this->serializer->serialize($flattenException, $format, [ 'exception' => $exception, 'debug' => $debug, - ])) - ->setHeaders($flattenException->getHeaders() + $headers); + ])); } catch (NotEncodableValueException $e) { - return $this->fallbackErrorRenderer->render($exception); + $flattenException = $this->fallbackErrorRenderer->render($exception); } + + return $flattenException->setHeaders($flattenException->getHeaders() + $headers); } public static function getPreferredFormat(RequestStack $requestStack): \Closure diff --git a/vendor/symfony/error-handler/Exception/FlattenException.php b/vendor/symfony/error-handler/Exception/FlattenException.php index 262dae62..f73842ad 100644 --- a/vendor/symfony/error-handler/Exception/FlattenException.php +++ b/vendor/symfony/error-handler/Exception/FlattenException.php @@ -63,7 +63,7 @@ class FlattenException /** * @return static */ - public static function create(\Exception $exception, int $statusCode = null, array $headers = []): self + public static function create(\Exception $exception, ?int $statusCode = null, array $headers = []): self { return static::createFromThrowable($exception, $statusCode, $headers); } @@ -71,7 +71,7 @@ class FlattenException /** * @return static */ - public static function createFromThrowable(\Throwable $exception, int $statusCode = null, array $headers = []): self + public static function createFromThrowable(\Throwable $exception, ?int $statusCode = null, array $headers = []): self { $e = new static(); $e->setMessage($exception->getMessage()); diff --git a/vendor/symfony/error-handler/Internal/TentativeTypes.php b/vendor/symfony/error-handler/Internal/TentativeTypes.php index 5707a835..1e8afe39 100644 --- a/vendor/symfony/error-handler/Internal/TentativeTypes.php +++ b/vendor/symfony/error-handler/Internal/TentativeTypes.php @@ -37,7 +37,7 @@ class TentativeTypes 'DateTime' => [ '__wakeup' => 'void', '__set_state' => 'DateTime', - 'createFromImmutable' => 'DateTime', + 'createFromImmutable' => 'static', 'createFromFormat' => 'DateTime|false', 'getLastErrors' => 'array|false', 'format' => 'string', @@ -72,7 +72,7 @@ class TentativeTypes 'setDate' => 'DateTimeImmutable', 'setISODate' => 'DateTimeImmutable', 'setTimestamp' => 'DateTimeImmutable', - 'createFromMutable' => 'DateTimeImmutable', + 'createFromMutable' => 'static', ], 'DateTimeZone' => [ 'getName' => 'string', @@ -753,6 +753,7 @@ class TentativeTypes 'isVariadic' => 'bool', 'isStatic' => 'bool', 'getClosureThis' => '?object', + 'getClosureCalledClass' => '?ReflectionClass', 'getClosureScopeClass' => '?ReflectionClass', 'getDocComment' => 'string|false', 'getEndLine' => 'int|false', @@ -1102,6 +1103,8 @@ class TentativeTypes 'isDot' => 'bool', 'rewind' => 'void', 'valid' => 'bool', + 'key' => 'mixed', + 'current' => 'mixed', 'next' => 'void', 'seek' => 'void', ], @@ -1148,8 +1151,8 @@ class TentativeTypes 'getFlags' => 'int', 'setMaxLineLen' => 'void', 'getMaxLineLen' => 'int', - 'hasChildren' => 'bool', - 'getChildren' => '?RecursiveIterator', + 'hasChildren' => 'false', + 'getChildren' => 'null', 'seek' => 'void', 'getCurrentLine' => 'string', ], @@ -1238,7 +1241,7 @@ class TentativeTypes 'current' => 'never', 'next' => 'void', 'key' => 'never', - 'valid' => 'bool', + 'valid' => 'false', 'rewind' => 'void', ], 'CallbackFilterIterator' => [ diff --git a/vendor/symfony/error-handler/LICENSE b/vendor/symfony/error-handler/LICENSE index 9c907a46..f37c76b5 100644 --- a/vendor/symfony/error-handler/LICENSE +++ b/vendor/symfony/error-handler/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019-2022 Fabien Potencier +Copyright (c) 2019-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/error-handler/Resources/assets/js/exception.js b/vendor/symfony/error-handler/Resources/assets/js/exception.js index a85409da..95b8ea17 100644 --- a/vendor/symfony/error-handler/Resources/assets/js/exception.js +++ b/vendor/symfony/error-handler/Resources/assets/js/exception.js @@ -1,297 +1,285 @@ /* This file is based on WebProfilerBundle/Resources/views/Profiler/base_js.html.twig. If you make any change in this file, verify the same change is needed in the other file. */ /* .tab'); + var tabNavigation = document.createElement('ul'); + tabNavigation.className = 'tab-navigation'; + + var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ + for (var j = 0; j < tabs.length; j++) { + var tabId = 'tab-' + i + '-' + j; + var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; + + var tabNavigationItem = document.createElement('li'); + tabNavigationItem.setAttribute('data-tab-id', tabId); + if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } + if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); } + tabNavigationItem.innerHTML = tabTitle; + tabNavigation.appendChild(tabNavigationItem); + + var tabContent = tabs[j].querySelector('.tab-content'); + tabContent.parentElement.setAttribute('id', tabId); + } + + tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); + addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); } - var addEventListener; + /* display the active tab and add the 'click' event listeners */ + for (i = 0; i < tabGroups.length; i++) { + tabNavigation = tabGroups[i].querySelectorAll(':scope >.tab-navigation li'); - var el = document.createElement('div'); - if (!('addEventListener' in el)) { - addEventListener = function (element, eventName, callback) { - element.attachEvent('on' + eventName, callback); - }; - } else { - addEventListener = function (element, eventName, callback) { - element.addEventListener(eventName, callback, false); - }; - } + for (j = 0; j < tabNavigation.length; j++) { + tabId = tabNavigation[j].getAttribute('data-tab-id'); + document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; - if (navigator.clipboard) { - document.querySelectorAll('[data-clipboard-text]').forEach(function(element) { - removeClass(element, 'hidden'); - element.addEventListener('click', function() { - navigator.clipboard.writeText(element.getAttribute('data-clipboard-text')); - }) - }); - } - - return { - addEventListener: addEventListener, - - createTabs: function() { - var tabGroups = document.querySelectorAll('.sf-tabs:not([data-processed=true])'); - - /* create the tab navigation for each group of tabs */ - for (var i = 0; i < tabGroups.length; i++) { - var tabs = tabGroups[i].querySelectorAll(':scope > .tab'); - var tabNavigation = document.createElement('ul'); - tabNavigation.className = 'tab-navigation'; - - var selectedTabId = 'tab-' + i + '-0'; /* select the first tab by default */ - for (var j = 0; j < tabs.length; j++) { - var tabId = 'tab-' + i + '-' + j; - var tabTitle = tabs[j].querySelector('.tab-title').innerHTML; - - var tabNavigationItem = document.createElement('li'); - tabNavigationItem.setAttribute('data-tab-id', tabId); - if (hasClass(tabs[j], 'active')) { selectedTabId = tabId; } - if (hasClass(tabs[j], 'disabled')) { addClass(tabNavigationItem, 'disabled'); } - tabNavigationItem.innerHTML = tabTitle; - tabNavigation.appendChild(tabNavigationItem); - - var tabContent = tabs[j].querySelector('.tab-content'); - tabContent.parentElement.setAttribute('id', tabId); - } - - tabGroups[i].insertBefore(tabNavigation, tabGroups[i].firstChild); - addClass(document.querySelector('[data-tab-id="' + selectedTabId + '"]'), 'active'); + if (hasClass(tabNavigation[j], 'active')) { + document.getElementById(tabId).className = 'block'; + } else { + document.getElementById(tabId).className = 'hidden'; } - /* display the active tab and add the 'click' event listeners */ - for (i = 0; i < tabGroups.length; i++) { - tabNavigation = tabGroups[i].querySelectorAll(':scope >.tab-navigation li'); + tabNavigation[j].addEventListener('click', function(e) { + var activeTab = e.target || e.srcElement; - for (j = 0; j < tabNavigation.length; j++) { - tabId = tabNavigation[j].getAttribute('data-tab-id'); - document.getElementById(tabId).querySelector('.tab-title').className = 'hidden'; - - if (hasClass(tabNavigation[j], 'active')) { - document.getElementById(tabId).className = 'block'; - } else { - document.getElementById(tabId).className = 'hidden'; - } - - tabNavigation[j].addEventListener('click', function(e) { - var activeTab = e.target || e.srcElement; - - /* needed because when the tab contains HTML contents, user can click */ - /* on any of those elements instead of their parent '
  • ' element */ - while (activeTab.tagName.toLowerCase() !== 'li') { - activeTab = activeTab.parentNode; - } - - /* get the full list of tabs through the parent of the active tab element */ - var tabNavigation = activeTab.parentNode.children; - for (var k = 0; k < tabNavigation.length; k++) { - var tabId = tabNavigation[k].getAttribute('data-tab-id'); - document.getElementById(tabId).className = 'hidden'; - removeClass(tabNavigation[k], 'active'); - } - - addClass(activeTab, 'active'); - var activeTabId = activeTab.getAttribute('data-tab-id'); - document.getElementById(activeTabId).className = 'block'; - }); + /* needed because when the tab contains HTML contents, user can click */ + /* on any of those elements instead of their parent '
  • ' element */ + while (activeTab.tagName.toLowerCase() !== 'li') { + activeTab = activeTab.parentNode; } - tabGroups[i].setAttribute('data-processed', 'true'); - } - }, - - createToggles: function() { - var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])'); - - for (var i = 0; i < toggles.length; i++) { - var elementSelector = toggles[i].getAttribute('data-toggle-selector'); - var element = document.querySelector(elementSelector); - - addClass(element, 'sf-toggle-content'); - - if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { - addClass(toggles[i], 'sf-toggle-on'); - addClass(element, 'sf-toggle-visible'); - } else { - addClass(toggles[i], 'sf-toggle-off'); - addClass(element, 'sf-toggle-hidden'); + /* get the full list of tabs through the parent of the active tab element */ + var tabNavigation = activeTab.parentNode.children; + for (var k = 0; k < tabNavigation.length; k++) { + var tabId = tabNavigation[k].getAttribute('data-tab-id'); + document.getElementById(tabId).className = 'hidden'; + removeClass(tabNavigation[k], 'active'); } - addEventListener(toggles[i], 'click', function(e) { - e.preventDefault(); - - if ('' !== window.getSelection().toString()) { - /* Don't do anything on text selection */ - return; - } - - var toggle = e.target || e.srcElement; - - /* needed because when the toggle contains HTML contents, user can click */ - /* on any of those elements instead of their parent '.sf-toggle' element */ - while (!hasClass(toggle, 'sf-toggle')) { - toggle = toggle.parentNode; - } - - var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); - - toggleClass(toggle, 'sf-toggle-on'); - toggleClass(toggle, 'sf-toggle-off'); - toggleClass(element, 'sf-toggle-hidden'); - toggleClass(element, 'sf-toggle-visible'); - - /* the toggle doesn't change its contents when clicking on it */ - if (!toggle.hasAttribute('data-toggle-alt-content')) { - return; - } - - if (!toggle.hasAttribute('data-toggle-original-content')) { - toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); - } - - var currentContent = toggle.innerHTML; - var originalContent = toggle.getAttribute('data-toggle-original-content'); - var altContent = toggle.getAttribute('data-toggle-alt-content'); - toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; - }); - - /* Prevents from disallowing clicks on links inside toggles */ - var toggleLinks = toggles[i].querySelectorAll('a'); - for (var j = 0; j < toggleLinks.length; j++) { - addEventListener(toggleLinks[j], 'click', function(e) { - e.stopPropagation(); - }); - } - - /* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */ - var copyToClipboardElements = toggles[i].querySelectorAll('span[data-clipboard-text]'); - for (var k = 0; k < copyToClipboardElements.length; k++) { - addEventListener(copyToClipboardElements[k], 'click', function(e) { - e.stopPropagation(); - }); - } - - toggles[i].setAttribute('data-processed', 'true'); - } - }, - - createFilters: function() { - document.querySelectorAll('[data-filters] [data-filter]').forEach(function (filter) { - var filters = filter.closest('[data-filters]'), - type = 'choice', - name = filter.dataset.filter, - ucName = name.charAt(0).toUpperCase()+name.slice(1), - list = document.createElement('ul'), - values = filters.dataset['filter'+ucName] || filters.querySelectorAll('[data-filter-'+name+']'), - labels = {}, - defaults = null, - indexed = {}, - processed = {}; - if (typeof values === 'string') { - type = 'level'; - labels = values.split(','); - values = values.toLowerCase().split(','); - defaults = values.length - 1; - } - addClass(list, 'filter-list'); - addClass(list, 'filter-list-'+type); - values.forEach(function (value, i) { - if (value instanceof HTMLElement) { - value = value.dataset['filter'+ucName]; - } - if (value in processed) { - return; - } - var option = document.createElement('li'), - label = i in labels ? labels[i] : value, - active = false, - matches; - if ('' === label) { - option.innerHTML = '(none)'; - } else { - option.innerText = label; - } - option.dataset.filter = value; - option.setAttribute('title', 1 === (matches = filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').length) ? 'Matches 1 row' : 'Matches '+matches+' rows'); - indexed[value] = i; - list.appendChild(option); - addEventListener(option, 'click', function () { - if ('choice' === type) { - filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { - if (option.dataset.filter === row.dataset['filter'+ucName]) { - toggleClass(row, 'filter-hidden-'+name); - } - }); - toggleClass(option, 'active'); - } else if ('level' === type) { - if (i === this.parentNode.querySelectorAll('.active').length - 1) { - return; - } - this.parentNode.querySelectorAll('li').forEach(function (currentOption, j) { - if (j <= i) { - addClass(currentOption, 'active'); - if (i === j) { - addClass(currentOption, 'last-active'); - } else { - removeClass(currentOption, 'last-active'); - } - } else { - removeClass(currentOption, 'active'); - removeClass(currentOption, 'last-active'); - } - }); - filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { - if (i < indexed[row.dataset['filter'+ucName]]) { - addClass(row, 'filter-hidden-'+name); - } else { - removeClass(row, 'filter-hidden-'+name); - } - }); - } - }); - if ('choice' === type) { - active = null === defaults || 0 <= defaults.indexOf(value); - } else if ('level' === type) { - active = i <= defaults; - if (active && i === defaults) { - addClass(option, 'last-active'); - } - } - if (active) { - addClass(option, 'active'); - } else { - filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').forEach(function (row) { - toggleClass(row, 'filter-hidden-'+name); - }); - } - processed[value] = true; - }); - - if (1 < list.childNodes.length) { - filter.appendChild(list); - filter.dataset.filtered = ''; - } + addClass(activeTab, 'active'); + var activeTabId = activeTab.getAttribute('data-tab-id'); + document.getElementById(activeTabId).className = 'block'; }); } - }; + + tabGroups[i].setAttribute('data-processed', 'true'); + } })(); - Sfjs.addEventListener(document, 'DOMContentLoaded', function() { - Sfjs.createTabs(); - Sfjs.createToggles(); - Sfjs.createFilters(); - }); -} + (function createToggles() { + var toggles = document.querySelectorAll('.sf-toggle:not([data-processed=true])'); + + for (var i = 0; i < toggles.length; i++) { + var elementSelector = toggles[i].getAttribute('data-toggle-selector'); + var element = document.querySelector(elementSelector); + + addClass(element, 'sf-toggle-content'); + + if (toggles[i].hasAttribute('data-toggle-initial') && toggles[i].getAttribute('data-toggle-initial') == 'display') { + addClass(toggles[i], 'sf-toggle-on'); + addClass(element, 'sf-toggle-visible'); + } else { + addClass(toggles[i], 'sf-toggle-off'); + addClass(element, 'sf-toggle-hidden'); + } + + addEventListener(toggles[i], 'click', function(e) { + e.preventDefault(); + + if ('' !== window.getSelection().toString()) { + /* Don't do anything on text selection */ + return; + } + + var toggle = e.target || e.srcElement; + + /* needed because when the toggle contains HTML contents, user can click */ + /* on any of those elements instead of their parent '.sf-toggle' element */ + while (!hasClass(toggle, 'sf-toggle')) { + toggle = toggle.parentNode; + } + + var element = document.querySelector(toggle.getAttribute('data-toggle-selector')); + + toggleClass(toggle, 'sf-toggle-on'); + toggleClass(toggle, 'sf-toggle-off'); + toggleClass(element, 'sf-toggle-hidden'); + toggleClass(element, 'sf-toggle-visible'); + + /* the toggle doesn't change its contents when clicking on it */ + if (!toggle.hasAttribute('data-toggle-alt-content')) { + return; + } + + if (!toggle.hasAttribute('data-toggle-original-content')) { + toggle.setAttribute('data-toggle-original-content', toggle.innerHTML); + } + + var currentContent = toggle.innerHTML; + var originalContent = toggle.getAttribute('data-toggle-original-content'); + var altContent = toggle.getAttribute('data-toggle-alt-content'); + toggle.innerHTML = currentContent !== altContent ? altContent : originalContent; + }); + + /* Prevents from disallowing clicks on links inside toggles */ + var toggleLinks = toggles[i].querySelectorAll('a'); + for (var j = 0; j < toggleLinks.length; j++) { + addEventListener(toggleLinks[j], 'click', function(e) { + e.stopPropagation(); + }); + } + + /* Prevents from disallowing clicks on "copy to clipboard" elements inside toggles */ + var copyToClipboardElements = toggles[i].querySelectorAll('span[data-clipboard-text]'); + for (var k = 0; k < copyToClipboardElements.length; k++) { + addEventListener(copyToClipboardElements[k], 'click', function(e) { + e.stopPropagation(); + }); + } + + toggles[i].setAttribute('data-processed', 'true'); + } + })(); + + (function createFilters() { + document.querySelectorAll('[data-filters] [data-filter]').forEach(function (filter) { + var filters = filter.closest('[data-filters]'), + type = 'choice', + name = filter.dataset.filter, + ucName = name.charAt(0).toUpperCase()+name.slice(1), + list = document.createElement('ul'), + values = filters.dataset['filter'+ucName] || filters.querySelectorAll('[data-filter-'+name+']'), + labels = {}, + defaults = null, + indexed = {}, + processed = {}; + if (typeof values === 'string') { + type = 'level'; + labels = values.split(','); + values = values.toLowerCase().split(','); + defaults = values.length - 1; + } + addClass(list, 'filter-list'); + addClass(list, 'filter-list-'+type); + values.forEach(function (value, i) { + if (value instanceof HTMLElement) { + value = value.dataset['filter'+ucName]; + } + if (value in processed) { + return; + } + var option = document.createElement('li'), + label = i in labels ? labels[i] : value, + active = false, + matches; + if ('' === label) { + option.innerHTML = '(none)'; + } else { + option.innerText = label; + } + option.dataset.filter = value; + option.setAttribute('title', 1 === (matches = filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').length) ? 'Matches 1 row' : 'Matches '+matches+' rows'); + indexed[value] = i; + list.appendChild(option); + addEventListener(option, 'click', function () { + if ('choice' === type) { + filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { + if (option.dataset.filter === row.dataset['filter'+ucName]) { + toggleClass(row, 'filter-hidden-'+name); + } + }); + toggleClass(option, 'active'); + } else if ('level' === type) { + if (i === this.parentNode.querySelectorAll('.active').length - 1) { + return; + } + this.parentNode.querySelectorAll('li').forEach(function (currentOption, j) { + if (j <= i) { + addClass(currentOption, 'active'); + if (i === j) { + addClass(currentOption, 'last-active'); + } else { + removeClass(currentOption, 'last-active'); + } + } else { + removeClass(currentOption, 'active'); + removeClass(currentOption, 'last-active'); + } + }); + filters.querySelectorAll('[data-filter-'+name+']').forEach(function (row) { + if (i < indexed[row.dataset['filter'+ucName]]) { + addClass(row, 'filter-hidden-'+name); + } else { + removeClass(row, 'filter-hidden-'+name); + } + }); + } + }); + if ('choice' === type) { + active = null === defaults || 0 <= defaults.indexOf(value); + } else if ('level' === type) { + active = i <= defaults; + if (active && i === defaults) { + addClass(option, 'last-active'); + } + } + if (active) { + addClass(option, 'active'); + } else { + filters.querySelectorAll('[data-filter-'+name+'="'+value+'"]').forEach(function (row) { + toggleClass(row, 'filter-hidden-'+name); + }); + } + processed[value] = true; + }); + + if (1 < list.childNodes.length) { + filter.appendChild(list); + filter.dataset.filtered = ''; + } + }); + })(); +})(); /*]]>*/ diff --git a/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php b/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php old mode 100755 new mode 100644 index cc98f58b..ae2c703e --- a/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php +++ b/vendor/symfony/error-handler/Resources/bin/extract-tentative-return-types.php @@ -10,6 +10,10 @@ * file that was distributed with this source code. */ +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + // Run from the root of the php-src repository, this script generates // a table with all the methods that have a tentative return type. // diff --git a/vendor/symfony/error-handler/Resources/bin/patch-type-declarations b/vendor/symfony/error-handler/Resources/bin/patch-type-declarations old mode 100755 new mode 100644 index efcfcb25..824ef679 --- a/vendor/symfony/error-handler/Resources/bin/patch-type-declarations +++ b/vendor/symfony/error-handler/Resources/bin/patch-type-declarations @@ -10,6 +10,10 @@ * file that was distributed with this source code. */ +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + if (\in_array('-h', $argv) || \in_array('--help', $argv)) { echo implode(PHP_EOL, [ ' Patches type declarations based on "@return" PHPDoc and triggers deprecations for', diff --git a/vendor/symfony/error-handler/Resources/views/error.html.php b/vendor/symfony/error-handler/Resources/views/error.html.php index 5416d03c..dcd30c29 100644 --- a/vendor/symfony/error-handler/Resources/views/error.html.php +++ b/vendor/symfony/error-handler/Resources/views/error.html.php @@ -1,5 +1,5 @@ - + diff --git a/vendor/symfony/error-handler/Resources/views/traces.html.php b/vendor/symfony/error-handler/Resources/views/traces.html.php index f64d9171..4eef59a6 100644 --- a/vendor/symfony/error-handler/Resources/views/traces.html.php +++ b/vendor/symfony/error-handler/Resources/views/traces.html.php @@ -12,7 +12,7 @@ $class = substr($exception['class'], $separator); ?> -
    +

    diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index 7fe26db1..67bc6322 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -73,7 +73,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa { if (isset($this->wrappedListeners[$eventName])) { foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { + if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { $listener = $wrappedListener; unset($this->wrappedListeners[$eventName][$index]); break; @@ -108,8 +108,8 @@ class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterfa // we might have wrapped listeners for the event (if called while dispatching) // in that case get the priority by wrapper if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener) { + foreach ($this->wrappedListeners[$eventName] as $wrappedListener) { + if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { return $this->dispatcher->getListenerPriority($eventName, $wrappedListener); } } diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php index a986bb97..11bd0c80 100644 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -47,7 +47,7 @@ final class WrappedListener $r = new \ReflectionFunction($listener); if (str_contains($r->name, '{closure}')) { $this->pretty = $this->name = 'closure'; - } elseif ($class = $r->getClosureScopeClass()) { + } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { $this->name = $class->name; $this->pretty = $this->name.'::'.$r->name; } else { diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index 33d91b7d..1812c987 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -108,7 +108,7 @@ class EventDispatcher implements EventDispatcherInterface $v[0] = $v[0](); $v[1] = $v[1] ?? '__invoke'; } - if ($v === $listener) { + if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { return $priority; } } @@ -164,7 +164,7 @@ class EventDispatcher implements EventDispatcherInterface $v[0] = $v[0](); $v[1] = $v[1] ?? '__invoke'; } - if ($v === $listener) { + if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); } } diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE index 88bf75bb..00837045 100644 --- a/vendor/symfony/event-dispatcher/LICENSE +++ b/vendor/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php index 3af551f4..23cf94ec 100644 --- a/vendor/symfony/finder/Comparator/Comparator.php +++ b/vendor/symfony/finder/Comparator/Comparator.php @@ -19,7 +19,7 @@ class Comparator private $target; private $operator = '=='; - public function __construct(string $target = null, string $operator = '==') + public function __construct(?string $target = null, string $operator = '==') { if (null === $target) { trigger_deprecation('symfony/finder', '5.4', 'Constructing a "%s" without setting "$target" is deprecated.', __CLASS__); diff --git a/vendor/symfony/finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Comparator/NumberComparator.php index ff85d967..dd308207 100644 --- a/vendor/symfony/finder/Comparator/NumberComparator.php +++ b/vendor/symfony/finder/Comparator/NumberComparator.php @@ -35,7 +35,7 @@ namespace Symfony\Component\Finder\Comparator; class NumberComparator extends Comparator { /** - * @param string|int $test A comparison string or an integer + * @param string|null $test A comparison string or null * * @throws \InvalidArgumentException If the test is not understood */ diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php index 8cc564cd..0b569655 100644 --- a/vendor/symfony/finder/Finder.php +++ b/vendor/symfony/finder/Finder.php @@ -164,8 +164,8 @@ class Finder implements \IteratorAggregate, \Countable * * You can use patterns (delimited with / sign), globs or simple strings. * - * $finder->name('*.php') - * $finder->name('/\.php$/') // same as above + * $finder->name('/\.php$/') + * $finder->name('*.php') // same as above, without dot files * $finder->name('test.php') * $finder->name(['test.py', 'test.php']) * diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php index d9e182c1..39797c82 100644 --- a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -17,6 +17,7 @@ namespace Symfony\Component\Finder\Iterator; * @author Fabien Potencier * * @extends \FilterIterator + * * @implements \RecursiveIterator */ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php index 27589cdd..886dae58 100644 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -29,7 +29,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator /** * @var bool */ - private $rewindable; + private $ignoreFirstRewind = true; // these 3 properties take part of the performance optimization to avoid redoing the same work in all iterations private $rootPath; @@ -118,7 +118,6 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator $children->ignoreUnreadableDirs = $this->ignoreUnreadableDirs; // performance optimization to avoid redoing the same work in all children - $children->rewindable = &$this->rewindable; $children->rootPath = $this->rootPath; } @@ -129,40 +128,30 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator } /** - * Do nothing for non rewindable stream. - * + * @return void + */ + #[\ReturnTypeWillChange] + public function next() + { + $this->ignoreFirstRewind = false; + + parent::next(); + } + + /** * @return void */ #[\ReturnTypeWillChange] public function rewind() { - if (false === $this->isRewindable()) { + // some streams like FTP are not rewindable, ignore the first rewind after creation, + // as newly created DirectoryIterator does not need to be rewound + if ($this->ignoreFirstRewind) { + $this->ignoreFirstRewind = false; + return; } parent::rewind(); } - - /** - * Checks if the stream is rewindable. - * - * @return bool - */ - public function isRewindable() - { - if (null !== $this->rewindable) { - return $this->rewindable; - } - - if (false !== $stream = @opendir($this->getPath())) { - $infos = stream_get_meta_data($stream); - closedir($stream); - - if ($infos['seekable']) { - return $this->rewindable = true; - } - } - - return $this->rewindable = false; - } } diff --git a/vendor/symfony/finder/LICENSE b/vendor/symfony/finder/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/finder/LICENSE +++ b/vendor/symfony/finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index 4769cab0..1878caae 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -34,6 +34,7 @@ class BinaryFileResponse extends Response protected $offset = 0; protected $maxlen = -1; protected $deleteFileAfterSend = false; + protected $chunkSize = 16 * 1024; /** * @param \SplFileInfo|string $file The file to stream @@ -44,7 +45,7 @@ class BinaryFileResponse extends Response * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set */ - public function __construct($file, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) + public function __construct($file, int $status = 200, array $headers = [], bool $public = true, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) { parent::__construct(null, $status, $headers); @@ -68,7 +69,7 @@ class BinaryFileResponse extends Response * * @deprecated since Symfony 5.2, use __construct() instead. */ - public static function create($file = null, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) + public static function create($file = null, int $status = 200, array $headers = [], bool $public = true, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) { trigger_deprecation('symfony/http-foundation', '5.2', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); @@ -84,7 +85,7 @@ class BinaryFileResponse extends Response * * @throws FileException */ - public function setFile($file, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) + public function setFile($file, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) { if (!$file instanceof File) { if ($file instanceof \SplFileInfo) { @@ -125,6 +126,22 @@ class BinaryFileResponse extends Response return $this->file; } + /** + * Sets the response stream chunk size. + * + * @return $this + */ + public function setChunkSize(int $chunkSize): self + { + if ($chunkSize < 1 || $chunkSize > \PHP_INT_MAX) { + throw new \LogicException('The chunk size of a BinaryFileResponse cannot be less than 1 or greater than PHP_INT_MAX.'); + } + + $this->chunkSize = $chunkSize; + + return $this; + } + /** * Automatically sets the Last-Modified header according the file modification date. * @@ -189,15 +206,19 @@ class BinaryFileResponse extends Response */ public function prepare(Request $request) { + if ($this->isInformational() || $this->isEmpty()) { + parent::prepare($request); + + $this->maxlen = 0; + + return $this; + } + if (!$this->headers->has('Content-Type')) { $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); } - if ('HTTP/1.0' !== $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); - } - - $this->ensureIEOverSSLCompatibility($request); + parent::prepare($request); $this->offset = 0; $this->maxlen = -1; @@ -205,6 +226,7 @@ class BinaryFileResponse extends Response if (false === $fileSize = $this->file->getSize()) { return $this; } + $this->headers->remove('Transfer-Encoding'); $this->headers->set('Content-Length', $fileSize); if (!$this->headers->has('Accept-Ranges')) { @@ -245,7 +267,7 @@ class BinaryFileResponse extends Response $range = $request->headers->get('Range'); if (str_starts_with($range, 'bytes=')) { - [$start, $end] = explode('-', substr($range, 6), 2) + [0]; + [$start, $end] = explode('-', substr($range, 6), 2) + [1 => 0]; $end = ('' === $end) ? $fileSize - 1 : (int) $end; @@ -274,6 +296,10 @@ class BinaryFileResponse extends Response } } + if ($request->isMethod('HEAD')) { + $this->maxlen = 0; + } + return $this; } @@ -295,24 +321,49 @@ class BinaryFileResponse extends Response */ public function sendContent() { - if (!$this->isSuccessful()) { - return parent::sendContent(); - } + try { + if (!$this->isSuccessful()) { + return parent::sendContent(); + } - if (0 === $this->maxlen) { - return $this; - } + if (0 === $this->maxlen) { + return $this; + } - $out = fopen('php://output', 'w'); - $file = fopen($this->file->getPathname(), 'r'); + $out = fopen('php://output', 'w'); + $file = fopen($this->file->getPathname(), 'r'); - stream_copy_to_stream($file, $out, $this->maxlen, $this->offset); + ignore_user_abort(true); - fclose($out); - fclose($file); + if (0 !== $this->offset) { + fseek($file, $this->offset); + } - if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { - unlink($this->file->getPathname()); + $length = $this->maxlen; + while ($length && !feof($file)) { + $read = $length > $this->chunkSize || 0 > $length ? $this->chunkSize : $length; + + if (false === $data = fread($file, $read)) { + break; + } + while ('' !== $data) { + $read = fwrite($out, $data); + if (false === $read || connection_aborted()) { + break 2; + } + if (0 < $length) { + $length -= $read; + } + $data = substr($data, $read); + } + } + + fclose($out); + fclose($file); + } finally { + if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { + unlink($this->file->getPathname()); + } } return $this; diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index b4b26c01..3ff93b9c 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -71,7 +71,7 @@ class Cookie return new static($name, $value, $data['expires'], $data['path'], $data['domain'], $data['secure'], $data['httponly'], $data['raw'], $data['samesite']); } - public static function create(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX): self + public static function create(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX): self { return new self($name, $value, $expire, $path, $domain, $secure, $httpOnly, $raw, $sameSite); } @@ -80,7 +80,7 @@ class Cookie * @param string $name The name of the cookie * @param string|null $value The value of the cookie * @param int|string|\DateTimeInterface $expire The time the cookie expires - * @param string $path The path on the server in which the cookie will be available on + * @param string|null $path The path on the server in which the cookie will be available on * @param string|null $domain The domain that the cookie is available to * @param bool|null $secure Whether the client should send back the cookie only over HTTPS or null to auto-enable this when the request is already using HTTPS * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol @@ -89,7 +89,7 @@ class Cookie * * @throws \InvalidArgumentException */ - public function __construct(string $name, string $value = null, $expire = 0, ?string $path = '/', string $domain = null, bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = 'lax') + public function __construct(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = 'lax') { // from PHP source code if ($raw && false !== strpbrk($name, self::RESERVED_CHARS_LIST)) { diff --git a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php b/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php index 9c719aa0..80a21bf1 100644 --- a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php +++ b/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpFoundation\Exception; /** - * Raised when a session does not exists. This happens in the following cases: + * Raised when a session does not exist. This happens in the following cases: * - the session is not enabled * - attempt to read a session outside a request context (ie. cli script). * @@ -20,7 +20,7 @@ namespace Symfony\Component\HttpFoundation\Exception; */ class SessionNotFoundException extends \LogicException implements RequestExceptionInterface { - public function __construct(string $message = 'There is currently no session available.', int $code = 0, \Throwable $previous = null) + public function __construct(string $message = 'There is currently no session available.', int $code = 0, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php index d941577d..2deb53d6 100644 --- a/vendor/symfony/http-foundation/File/File.php +++ b/vendor/symfony/http-foundation/File/File.php @@ -88,7 +88,7 @@ class File extends \SplFileInfo * * @throws FileException if the target file could not be created */ - public function move(string $directory, string $name = null) + public function move(string $directory, ?string $name = null) { $target = $this->getTargetFile($directory, $name); @@ -121,7 +121,7 @@ class File extends \SplFileInfo /** * @return self */ - protected function getTargetFile(string $directory, string $name = null) + protected function getTargetFile(string $directory, ?string $name = null) { if (!is_dir($directory)) { if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php index 5cfe8c4c..6ff6e51a 100644 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/File/UploadedFile.php @@ -60,7 +60,7 @@ class UploadedFile extends File * @throws FileException If file_uploads is disabled * @throws FileNotFoundException If the file does not exist */ - public function __construct(string $path, string $originalName, string $mimeType = null, int $error = null, bool $test = false) + public function __construct(string $path, string $originalName, ?string $mimeType = null, ?int $error = null, bool $test = false) { $this->originalName = $this->getName($originalName); $this->mimeType = $mimeType ?: 'application/octet-stream'; @@ -74,7 +74,7 @@ class UploadedFile extends File * Returns the original file name. * * It is extracted from the request from which the file has been uploaded. - * Then it should not be considered as a safe value. + * This should not be considered as a safe value to use for a file name on your servers. * * @return string */ @@ -87,7 +87,7 @@ class UploadedFile extends File * Returns the original file extension. * * It is extracted from the original file name that was uploaded. - * Then it should not be considered as a safe value. + * This should not be considered as a safe value to use for a file name on your servers. * * @return string */ @@ -172,7 +172,7 @@ class UploadedFile extends File * * @throws FileException if, for any reason, the file could not have been moved */ - public function move(string $directory, string $name = null) + public function move(string $directory, ?string $name = null) { if ($this->isValid()) { if ($this->test) { @@ -223,8 +223,8 @@ class UploadedFile extends File */ public static function getMaxFilesize() { - $sizePostMax = self::parseFilesize(ini_get('post_max_size')); - $sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize')); + $sizePostMax = self::parseFilesize(\ini_get('post_max_size')); + $sizeUploadMax = self::parseFilesize(\ini_get('upload_max_filesize')); return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX); } @@ -253,11 +253,11 @@ class UploadedFile extends File switch (substr($size, -1)) { case 't': $max *= 1024; - // no break + // no break case 'g': $max *= 1024; - // no break + // no break case 'm': $max *= 1024; - // no break + // no break case 'k': $max *= 1024; } diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index 4683a684..43d5f632 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -67,7 +67,7 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @return array>|array */ - public function all(string $key = null) + public function all(?string $key = null) { if (null !== $key) { return $this->headers[strtr($key, self::UPPER, self::LOWER)] ?? []; @@ -110,7 +110,7 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @return string|null */ - public function get(string $key, string $default = null) + public function get(string $key, ?string $default = null) { $headers = $this->all($key); @@ -197,7 +197,7 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @throws \RuntimeException When the HTTP header is not parseable */ - public function getDate(string $key, \DateTime $default = null) + public function getDate(string $key, ?\DateTime $default = null) { if (null === $value = $this->get($key)) { return $default; diff --git a/vendor/symfony/http-foundation/HeaderUtils.php b/vendor/symfony/http-foundation/HeaderUtils.php index 1d56be08..3456edac 100644 --- a/vendor/symfony/http-foundation/HeaderUtils.php +++ b/vendor/symfony/http-foundation/HeaderUtils.php @@ -33,17 +33,21 @@ class HeaderUtils * * Example: * - * HeaderUtils::split("da, en-gb;q=0.8", ",;") + * HeaderUtils::split('da, en-gb;q=0.8', ',;') * // => ['da'], ['en-gb', 'q=0.8']] * * @param string $separators List of characters to split on, ordered by - * precedence, e.g. ",", ";=", or ",;=" + * precedence, e.g. ',', ';=', or ',;=' * * @return array Nested array with as many levels as there are characters in * $separators */ public static function split(string $header, string $separators): array { + if ('' === $separators) { + throw new \InvalidArgumentException('At least one separator must be specified.'); + } + $quotedSeparators = preg_quote($separators, '/'); preg_match_all(' @@ -77,8 +81,8 @@ class HeaderUtils * * Example: * - * HeaderUtils::combine([["foo", "abc"], ["bar"]]) - * // => ["foo" => "abc", "bar" => true] + * HeaderUtils::combine([['foo', 'abc'], ['bar']]) + * // => ['foo' => 'abc', 'bar' => true] */ public static function combine(array $parts): array { @@ -95,13 +99,13 @@ class HeaderUtils /** * Joins an associative array into a string for use in an HTTP header. * - * The key and value of each entry are joined with "=", and all entries + * The key and value of each entry are joined with '=', and all entries * are joined with the specified separator and an additional space (for * readability). Values are quoted if necessary. * * Example: * - * HeaderUtils::toString(["foo" => "abc", "bar" => true, "baz" => "a b c"], ",") + * HeaderUtils::toString(['foo' => 'abc', 'bar' => true, 'baz' => 'a b c'], ',') * // => 'foo=abc, bar, baz="a b c"' */ public static function toString(array $assoc, string $separator): string @@ -138,7 +142,7 @@ class HeaderUtils * Decodes a quoted string. * * If passed an unquoted string that matches the "token" construct (as - * defined in the HTTP specification), it is passed through verbatimly. + * defined in the HTTP specification), it is passed through verbatim. */ public static function unquote(string $s): string { @@ -252,40 +256,37 @@ class HeaderUtils private static function groupParts(array $matches, string $separators, bool $first = true): array { $separator = $separators[0]; - $partSeparators = substr($separators, 1); - + $separators = substr($separators, 1) ?: ''; $i = 0; + + if ('' === $separators && !$first) { + $parts = ['']; + + foreach ($matches as $match) { + if (!$i && isset($match['separator'])) { + $i = 1; + $parts[1] = ''; + } else { + $parts[$i] .= self::unquote($match[0]); + } + } + + return $parts; + } + + $parts = []; $partMatches = []; - $previousMatchWasSeparator = false; + foreach ($matches as $match) { - if (!$first && $previousMatchWasSeparator && isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; - $partMatches[$i][] = $match; - } elseif (isset($match['separator']) && $match['separator'] === $separator) { - $previousMatchWasSeparator = true; + if (($match['separator'] ?? null) === $separator) { ++$i; } else { - $previousMatchWasSeparator = false; $partMatches[$i][] = $match; } } - $parts = []; - if ($partSeparators) { - foreach ($partMatches as $matches) { - $parts[] = self::groupParts($matches, $partSeparators, false); - } - } else { - foreach ($partMatches as $matches) { - $parts[] = self::unquote($matches[0][0]); - } - - if (!$first && 2 < \count($parts)) { - $parts = [ - $parts[0], - implode($separator, \array_slice($parts, 1)), - ]; - } + foreach ($partMatches as $matches) { + $parts[] = '' === $separators ? self::unquote($matches[0][0]) : self::groupParts($matches, $separators, false); } return $parts; diff --git a/vendor/symfony/http-foundation/InputBag.php b/vendor/symfony/http-foundation/InputBag.php index b36001d8..356fbbc6 100644 --- a/vendor/symfony/http-foundation/InputBag.php +++ b/vendor/symfony/http-foundation/InputBag.php @@ -29,14 +29,14 @@ final class InputBag extends ParameterBag */ public function get(string $key, $default = null) { - if (null !== $default && !is_scalar($default) && !(\is_object($default) && method_exists($default, '__toString'))) { + if (null !== $default && !\is_scalar($default) && !(\is_object($default) && method_exists($default, '__toString'))) { trigger_deprecation('symfony/http-foundation', '5.1', 'Passing a non-scalar value as 2nd argument to "%s()" is deprecated, pass a scalar or null instead.', __METHOD__); } $value = parent::get($key, $this); - if (null !== $value && $this !== $value && !is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-string value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__); + if (null !== $value && $this !== $value && !\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { + trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-scalar value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__); } return $this === $value ? $default : $value; @@ -45,7 +45,7 @@ final class InputBag extends ParameterBag /** * {@inheritdoc} */ - public function all(string $key = null): array + public function all(?string $key = null): array { return parent::all($key); } @@ -76,7 +76,7 @@ final class InputBag extends ParameterBag */ public function set(string $key, $value) { - if (null !== $value && !is_scalar($value) && !\is_array($value) && !method_exists($value, '__toString')) { + if (null !== $value && !\is_scalar($value) && !\is_array($value) && !method_exists($value, '__toString')) { trigger_deprecation('symfony/http-foundation', '5.1', 'Passing "%s" as a 2nd Argument to "%s()" is deprecated, pass a scalar, array, or null instead.', get_debug_type($value), __METHOD__); } diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php index 24111f1e..49d9a9d7 100644 --- a/vendor/symfony/http-foundation/IpUtils.php +++ b/vendor/symfony/http-foundation/IpUtils.php @@ -73,7 +73,7 @@ class IpUtils return false; } - $cacheKey = $requestIp.'-'.$ip; + $cacheKey = $requestIp.'-'.$ip.'-v4'; if (isset(self::$checkedIps[$cacheKey])) { return self::$checkedIps[$cacheKey]; } @@ -86,7 +86,7 @@ class IpUtils [$address, $netmask] = explode('/', $ip, 2); if ('0' === $netmask) { - return self::$checkedIps[$cacheKey] = filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); + return self::$checkedIps[$cacheKey] = false !== filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); } if ($netmask < 0 || $netmask > 32) { @@ -126,7 +126,7 @@ class IpUtils return false; } - $cacheKey = $requestIp.'-'.$ip; + $cacheKey = $requestIp.'-'.$ip.'-v6'; if (isset(self::$checkedIps[$cacheKey])) { return self::$checkedIps[$cacheKey]; } @@ -135,9 +135,18 @@ class IpUtils throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); } + // Check to see if we were given a IP4 $requestIp or $ip by mistake + if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { + return self::$checkedIps[$cacheKey] = false; + } + if (str_contains($ip, '/')) { [$address, $netmask] = explode('/', $ip, 2); + if (!filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { + return self::$checkedIps[$cacheKey] = false; + } + if ('0' === $netmask) { return (bool) unpack('n*', @inet_pton($address)); } @@ -146,6 +155,10 @@ class IpUtils return self::$checkedIps[$cacheKey] = false; } } else { + if (!filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { + return self::$checkedIps[$cacheKey] = false; + } + $address = $ip; $netmask = 128; } diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index 501a6387..51bdf197 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -105,7 +105,7 @@ class JsonResponse extends Response * * @throws \InvalidArgumentException When the callback name is not valid */ - public function setCallback(string $callback = null) + public function setCallback(?string $callback = null) { if (null !== $callback) { // partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/ diff --git a/vendor/symfony/http-foundation/LICENSE b/vendor/symfony/http-foundation/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/http-foundation/LICENSE +++ b/vendor/symfony/http-foundation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index 7d051abe..b542292b 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -39,7 +39,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @return array */ - public function all(/*string $key = null*/) + public function all(/* ?string $key = null */) { $key = \func_num_args() > 0 ? func_get_arg(0) : null; diff --git a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php b/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php index c91d614f..a6dd993b 100644 --- a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php +++ b/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php @@ -35,9 +35,7 @@ abstract class AbstractRequestRateLimiter implements RequestRateLimiterInterface foreach ($limiters as $limiter) { $rateLimit = $limiter->consume(1); - if (null === $minimalRateLimit || $rateLimit->getRemainingTokens() < $minimalRateLimit->getRemainingTokens()) { - $minimalRateLimit = $rateLimit; - } + $minimalRateLimit = $minimalRateLimit ? self::getMinimalRateLimit($minimalRateLimit, $rateLimit) : $rateLimit; } return $minimalRateLimit; @@ -54,4 +52,20 @@ abstract class AbstractRequestRateLimiter implements RequestRateLimiterInterface * @return LimiterInterface[] a set of limiters using keys extracted from the request */ abstract protected function getLimiters(Request $request): array; + + private static function getMinimalRateLimit(RateLimit $first, RateLimit $second): RateLimit + { + if ($first->isAccepted() !== $second->isAccepted()) { + return $first->isAccepted() ? $second : $first; + } + + $firstRemainingTokens = $first->getRemainingTokens(); + $secondRemainingTokens = $second->getRemainingTokens(); + + if ($firstRemainingTokens === $secondRemainingTokens) { + return $first->getRetryAfter() < $second->getRetryAfter() ? $second : $first; + } + + return $firstRemainingTokens > $secondRemainingTokens ? $second : $first; + } } diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php index 2103280c..7b89f0fa 100644 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ b/vendor/symfony/http-foundation/RedirectResponse.php @@ -103,6 +103,7 @@ class RedirectResponse extends Response ', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); $this->headers->set('Location', $url); + $this->headers->set('Content-Type', 'text/html; charset=utf-8'); return $this; } diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php index d112b1f1..75db0300 100644 --- a/vendor/symfony/http-foundation/Request.php +++ b/vendor/symfony/http-foundation/Request.php @@ -191,7 +191,7 @@ class Request protected $session; /** - * @var string + * @var string|null */ protected $locale; @@ -246,6 +246,9 @@ class Request self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX', ]; + /** @var bool */ + private $isIisRewrite = false; + /** * @param array $query The GET parameters * @param array $request The POST parameters @@ -439,16 +442,16 @@ class Request /** * Clones a request and overrides some of its parameters. * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters + * @param array|null $query The GET parameters + * @param array|null $request The POST parameters + * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array|null $cookies The COOKIE parameters + * @param array|null $files The FILES parameters + * @param array|null $server The SERVER parameters * * @return static */ - public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) + public function duplicate(?array $query = null, ?array $request = null, ?array $attributes = null, ?array $cookies = null, ?array $files = null, ?array $server = null) { $dup = clone $this; if (null !== $query) { @@ -522,10 +525,10 @@ class Request $cookies = []; foreach ($this->cookies as $k => $v) { - $cookies[] = $k.'='.$v; + $cookies[] = \is_array($v) ? http_build_query([$k => $v], '', '; ', \PHP_QUERY_RFC3986) : "$k=$v"; } - if (!empty($cookies)) { + if ($cookies) { $cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n"; } @@ -562,7 +565,7 @@ class Request $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; - $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); + $requestOrder = \ini_get('request_order') ?: \ini_get('variables_order'); $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; $_REQUEST = [[]]; @@ -1452,7 +1455,7 @@ class Request */ public function getLocale() { - return null === $this->locale ? $this->defaultLocale : $this->locale; + return $this->locale ?? $this->defaultLocale; } /** @@ -1573,9 +1576,9 @@ class Request /** * Gets the request body decoded as array, typically from a JSON payload. * - * @throws JsonException When the body cannot be decoded to an array - * * @return array + * + * @throws JsonException When the body cannot be decoded to an array */ public function toArray() { @@ -1648,7 +1651,7 @@ class Request * * @return string|null */ - public function getPreferredLanguage(array $locales = null) + public function getPreferredLanguage(?array $locales = null) { $preferredLanguages = $this->getLanguages(); @@ -1689,7 +1692,8 @@ class Request $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); $this->languages = []; - foreach ($languages as $lang => $acceptHeaderItem) { + foreach ($languages as $acceptHeaderItem) { + $lang = $acceptHeaderItem->getValue(); if (str_contains($lang, '-')) { $codes = explode('-', $lang); if ('i' === $codes[0]) { @@ -1727,7 +1731,7 @@ class Request return $this->charsets; } - return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + return $this->charsets = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all())); } /** @@ -1741,7 +1745,7 @@ class Request return $this->encodings; } - return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + return $this->encodings = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all())); } /** @@ -1755,7 +1759,7 @@ class Request return $this->acceptableContentTypes; } - return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + return $this->acceptableContentTypes = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all())); } /** @@ -1804,11 +1808,10 @@ class Request { $requestUri = ''; - if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { + if ($this->isIisRewrite() && '' != $this->server->get('UNENCODED_URL')) { // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) $requestUri = $this->server->get('UNENCODED_URL'); $this->server->remove('UNENCODED_URL'); - $this->server->remove('IIS_WasUrlRewritten'); } elseif ($this->server->has('REQUEST_URI')) { $requestUri = $this->server->get('REQUEST_URI'); @@ -2011,7 +2014,13 @@ class Request */ private function getUrlencodedPrefix(string $string, string $prefix): ?string { - if (!str_starts_with(rawurldecode($string), $prefix)) { + if ($this->isIisRewrite()) { + // ISS with UrlRewriteModule might report SCRIPT_NAME/PHP_SELF with wrong case + // see https://github.com/php/php-src/issues/11981 + if (0 !== stripos(rawurldecode($string), $prefix)) { + return null; + } + } elseif (!str_starts_with(rawurldecode($string), $prefix)) { return null; } @@ -2052,7 +2061,7 @@ class Request return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR', ''), self::$trustedProxies); } - private function getTrustedValues(int $type, string $ip = null): array + private function getTrustedValues(int $type, ?string $ip = null): array { $clientValues = []; $forwardedValues = []; @@ -2144,4 +2153,20 @@ class Request // Now the IP chain contains only untrusted proxies and the client IP return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; } + + /** + * Is this IIS with UrlRewriteModule? + * + * This method consumes, caches and removed the IIS_WasUrlRewritten env var, + * so we don't inherit it to sub-requests. + */ + private function isIisRewrite(): bool + { + if (1 === $this->server->getInt('IIS_WasUrlRewritten')) { + $this->isIisRewrite = true; + $this->server->remove('IIS_WasUrlRewritten'); + } + + return $this->isIisRewrite; + } } diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index f2645f9a..03ccee97 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -58,7 +58,7 @@ class RequestMatcher implements RequestMatcherInterface * @param string|string[]|null $ips * @param string|string[]|null $schemes */ - public function __construct(string $path = null, string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, int $port = null) + public function __construct(?string $path = null, ?string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, ?int $port = null) { $this->matchPath($path); $this->matchHost($host); @@ -91,7 +91,7 @@ class RequestMatcher implements RequestMatcherInterface } /** - * Adds a check for the the URL port. + * Adds a check for the URL port. * * @param int|null $port The port number to connect to */ diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index def7f8e7..6798a04c 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -72,7 +72,7 @@ class Response public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 - public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; + public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; // RFC7725 public const HTTP_INTERNAL_SERVER_ERROR = 500; public const HTTP_NOT_IMPLEMENTED = 501; public const HTTP_BAD_GATEWAY = 502; @@ -298,7 +298,7 @@ class Response $charset = $this->charset ?: 'UTF-8'; if (!$headers->has('Content-Type')) { $headers->set('Content-Type', 'text/html; charset='.$charset); - } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { + } elseif (0 === stripos($headers->get('Content-Type') ?? '', 'text/') && false === stripos($headers->get('Content-Type') ?? '', 'charset')) { // add the charset $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset); } @@ -399,6 +399,7 @@ class Response litespeed_finish_request(); } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { static::closeOutputBuffers(0, true); + flush(); } return $this; @@ -462,7 +463,7 @@ class Response * * @final */ - public function setStatusCode(int $code, string $text = null): object + public function setStatusCode(int $code, ?string $text = null): object { $this->statusCode = $code; if ($this->isInvalid()) { @@ -736,7 +737,7 @@ class Response * * @final */ - public function setExpires(\DateTimeInterface $date = null): object + public function setExpires(?\DateTimeInterface $date = null): object { if (null === $date) { $this->headers->remove('Expires'); @@ -773,8 +774,10 @@ class Response return (int) $this->headers->getCacheControlDirective('max-age'); } - if (null !== $this->getExpires()) { - return (int) $this->getExpires()->format('U') - (int) $this->getDate()->format('U'); + if (null !== $expires = $this->getExpires()) { + $maxAge = (int) $expires->format('U') - (int) $this->getDate()->format('U'); + + return max($maxAge, 0); } return null; @@ -818,7 +821,7 @@ class Response * * It returns null when no freshness information is present in the response. * - * When the responses TTL is <= 0, the response may not be served from cache without first + * When the response's TTL is 0, the response may not be served from cache without first * revalidating with the origin. * * @final @@ -827,7 +830,7 @@ class Response { $maxAge = $this->getMaxAge(); - return null !== $maxAge ? $maxAge - $this->getAge() : null; + return null !== $maxAge ? max($maxAge - $this->getAge(), 0) : null; } /** @@ -883,7 +886,7 @@ class Response * * @final */ - public function setLastModified(\DateTimeInterface $date = null): object + public function setLastModified(?\DateTimeInterface $date = null): object { if (null === $date) { $this->headers->remove('Last-Modified'); @@ -921,7 +924,7 @@ class Response * * @final */ - public function setEtag(string $etag = null, bool $weak = false): object + public function setEtag(?string $etag = null, bool $weak = false): object { if (null === $etag) { $this->headers->remove('Etag'); @@ -1214,7 +1217,7 @@ class Response * * @final */ - public function isRedirect(string $location = null): bool + public function isRedirect(?string $location = null): bool { return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); } diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 1df13fa2..d4c4f393 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -88,7 +88,7 @@ class ResponseHeaderBag extends HeaderBag /** * {@inheritdoc} */ - public function all(string $key = null) + public function all(?string $key = null) { $headers = parent::all(); @@ -186,7 +186,7 @@ class ResponseHeaderBag extends HeaderBag /** * Removes a cookie from the array, but does not unset it in the browser. */ - public function removeCookie(string $name, ?string $path = '/', string $domain = null) + public function removeCookie(string $name, ?string $path = '/', ?string $domain = null) { if (null === $path) { $path = '/'; @@ -239,7 +239,7 @@ class ResponseHeaderBag extends HeaderBag /** * Clears a cookie in the browser. */ - public function clearCookie(string $name, ?string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, string $sameSite = null) + public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null) { $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); } diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php index 25688d52..831caa67 100644 --- a/vendor/symfony/http-foundation/ServerBag.php +++ b/vendor/symfony/http-foundation/ServerBag.php @@ -31,7 +31,7 @@ class ServerBag extends ParameterBag foreach ($this->parameters as $key => $value) { if (str_starts_with($key, 'HTTP_')) { $headers[substr($key, 5)] = $value; - } elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { + } elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true) && '' !== $value) { $headers[$key] = $value; } } @@ -51,7 +51,7 @@ class ServerBag extends ParameterBag * RewriteCond %{HTTP:Authorization} .+ * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] * RewriteCond %{REQUEST_FILENAME} !-f - * RewriteRule ^(.*)$ app.php [QSA,L] + * RewriteRule ^(.*)$ index.php [QSA,L] */ $authorizationHeader = null; diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index 022e3986..917920a4 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -39,7 +39,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable private $usageIndex = 0; private $usageReporter; - public function __construct(SessionStorageInterface $storage = null, AttributeBagInterface $attributes = null, FlashBagInterface $flashes = null, callable $usageReporter = null) + public function __construct(?SessionStorageInterface $storage = null, ?AttributeBagInterface $attributes = null, ?FlashBagInterface $flashes = null, ?callable $usageReporter = null) { $this->storage = $storage ?? new NativeSessionStorage(); $this->usageReporter = $usageReporter; @@ -175,7 +175,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable /** * {@inheritdoc} */ - public function invalidate(int $lifetime = null) + public function invalidate(?int $lifetime = null) { $this->storage->clear(); @@ -185,7 +185,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable /** * {@inheritdoc} */ - public function migrate(bool $destroy = false, int $lifetime = null) + public function migrate(bool $destroy = false, ?int $lifetime = null) { return $this->storage->regenerate($destroy, $lifetime); } diff --git a/vendor/symfony/http-foundation/Session/SessionFactory.php b/vendor/symfony/http-foundation/Session/SessionFactory.php index 04c4b06a..bd79282e 100644 --- a/vendor/symfony/http-foundation/Session/SessionFactory.php +++ b/vendor/symfony/http-foundation/Session/SessionFactory.php @@ -26,7 +26,7 @@ class SessionFactory implements SessionFactoryInterface private $storageFactory; private $usageReporter; - public function __construct(RequestStack $requestStack, SessionStorageFactoryInterface $storageFactory, callable $usageReporter = null) + public function __construct(RequestStack $requestStack, SessionStorageFactoryInterface $storageFactory, ?callable $usageReporter = null) { $this->requestStack = $requestStack; $this->storageFactory = $storageFactory; diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php index b2f09fd0..b73dfd0c 100644 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionInterface.php @@ -59,28 +59,28 @@ interface SessionInterface * Clears all session attributes and flashes and regenerates the * session and deletes the old session from persistence. * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. + * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. * * @return bool */ - public function invalidate(int $lifetime = null); + public function invalidate(?int $lifetime = null); /** * Migrates the current session to a new session id while maintaining all * session attributes. * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. + * @param bool $destroy Whether to delete the old session or leave it to garbage collection + * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. * * @return bool */ - public function migrate(bool $destroy = false, int $lifetime = null); + public function migrate(bool $destroy = false, ?int $lifetime = null); /** * Force the session to be saved and closed. diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php index bc7b944f..35d7b4b8 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -35,8 +35,8 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess public function open($savePath, $sessionName) { $this->sessionName = $sessionName; - if (!headers_sent() && !ini_get('session.cache_limiter') && '0' !== ini_get('session.cache_limiter')) { - header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) ini_get('session.cache_expire'))); + if (!headers_sent() && !\ini_get('session.cache_limiter') && '0' !== \ini_get('session.cache_limiter')) { + header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire'))); } return true; @@ -126,7 +126,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess #[\ReturnTypeWillChange] public function destroy($sessionId) { - if (!headers_sent() && filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { + if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { if (!$this->sessionName) { throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class)); } @@ -141,7 +141,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess */ if (null === $cookie || isset($_COOKIE[$this->sessionName])) { if (\PHP_VERSION_ID < 70300) { - setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN)); + setcookie($this->sessionName, '', 0, \ini_get('session.cookie_path'), \ini_get('session.cookie_domain'), filter_var(\ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(\ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN)); } else { $params = session_get_cookie_params(); unset($params['lifetime']); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php index a5a78eb9..e0ec4d2d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -77,7 +77,7 @@ class MemcachedSessionHandler extends AbstractSessionHandler #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { - $this->memcached->touch($this->prefix.$sessionId, time() + (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); + $this->memcached->touch($this->prefix.$sessionId, $this->getCompatibleTtl()); return true; } @@ -87,7 +87,20 @@ class MemcachedSessionHandler extends AbstractSessionHandler */ protected function doWrite(string $sessionId, string $data) { - return $this->memcached->set($this->prefix.$sessionId, $data, time() + (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); + return $this->memcached->set($this->prefix.$sessionId, $data, $this->getCompatibleTtl()); + } + + private function getCompatibleTtl(): int + { + $ttl = (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')); + + // If the relative TTL that is used exceeds 30 days, memcached will treat the value as Unix time. + // We have to convert it to an absolute Unix time at this point, to make sure the TTL is correct. + if ($ttl > 60 * 60 * 24 * 30) { + $ttl += time(); + } + + return $ttl; } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index 8384e79d..ef8f7194 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -121,7 +121,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler */ protected function doWrite(string $sessionId, string $data) { - $expiry = new UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); + $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); $fields = [ $this->options['time_field'] => new UTCDateTime(), @@ -144,7 +144,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { - $expiry = new UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); + $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); $this->getCollection()->updateOne( [$this->options['id_field'] => $sessionId], diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php index effc9db5..570d4f42 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -19,19 +19,19 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; class NativeFileSessionHandler extends \SessionHandler { /** - * @param string $savePath Path of directory to save session files - * Default null will leave setting as defined by PHP. - * '/path', 'N;/path', or 'N;octal-mode;/path + * @param string|null $savePath Path of directory to save session files + * Default null will leave setting as defined by PHP. + * '/path', 'N;/path', or 'N;octal-mode;/path * * @see https://php.net/session.configuration#ini.session.save-path for further details. * * @throws \InvalidArgumentException On invalid $savePath * @throws \RuntimeException When failing to create the save directory */ - public function __construct(string $savePath = null) + public function __construct(?string $savePath = null) { if (null === $savePath) { - $savePath = ini_get('session.save_path'); + $savePath = \ini_get('session.save_path'); } $baseDir = $savePath; @@ -49,7 +49,11 @@ class NativeFileSessionHandler extends \SessionHandler throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir)); } - ini_set('session.save_path', $savePath); - ini_set('session.save_handler', 'files'); + if ($savePath !== \ini_get('session.save_path')) { + ini_set('session.save_path', $savePath); + } + if ('files' !== \ini_get('session.save_handler')) { + ini_set('session.save_handler', 'files'); + } } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 067bfcb3..f9c5d9b5 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -112,16 +112,16 @@ class PdoSessionHandler extends AbstractSessionHandler /** * Username when lazy-connect. * - * @var string + * @var string|null */ - private $username = ''; + private $username = null; /** * Password when lazy-connect. * - * @var string + * @var string|null */ - private $password = ''; + private $password = null; /** * Connection options when lazy-connect. @@ -344,7 +344,7 @@ class PdoSessionHandler extends AbstractSessionHandler */ protected function doWrite(string $sessionId, string $data) { - $maxlifetime = (int) ini_get('session.gc_maxlifetime'); + $maxlifetime = (int) \ini_get('session.gc_maxlifetime'); try { // We use a single MERGE SQL query when supported by the database. @@ -391,14 +391,14 @@ class PdoSessionHandler extends AbstractSessionHandler #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { - $expiry = time() + (int) ini_get('session.gc_maxlifetime'); + $expiry = time() + (int) \ini_get('session.gc_maxlifetime'); try { $updateStmt = $this->pdo->prepare( "UPDATE $this->table SET $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id" ); - $updateStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $updateStmt->bindParam(':expiry', $expiry, \PDO::PARAM_INT); + $updateStmt->bindValue(':id', $sessionId, \PDO::PARAM_STR); + $updateStmt->bindValue(':expiry', $expiry, \PDO::PARAM_INT); $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); $updateStmt->execute(); } catch (\PDOException $e) { @@ -530,8 +530,8 @@ class PdoSessionHandler extends AbstractSessionHandler return $dsn; } } - // If "unix_socket" is not in the query, we continue with the same process as pgsql - // no break + // If "unix_socket" is not in the query, we continue with the same process as pgsql + // no break case 'pgsql': $dsn ?? $dsn = 'pgsql:'; @@ -687,7 +687,7 @@ class PdoSessionHandler extends AbstractSessionHandler throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); } - if (!filter_var(ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { + if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { // In strict mode, session fixation is not possible: new sessions always start with a unique // random id, so that concurrency is not possible and this code path can be skipped. // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block @@ -935,7 +935,7 @@ class PdoSessionHandler extends AbstractSessionHandler protected function getConnection() { if (null === $this->pdo) { - $this->connect($this->dsn ?: ini_get('session.save_path')); + $this->connect($this->dsn ?: \ini_get('session.save_path')); } return $this->pdo; diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php index 9573b311..31954e67 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php @@ -79,7 +79,7 @@ class RedisSessionHandler extends AbstractSessionHandler */ protected function doWrite(string $sessionId, string $data): bool { - $result = $this->redis->setEx($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime')), $data); + $result = $this->redis->setEx($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')), $data); return $result && !$result instanceof ErrorInterface; } @@ -132,6 +132,6 @@ class RedisSessionHandler extends AbstractSessionHandler #[\ReturnTypeWillChange] public function updateTimestamp($sessionId, $data) { - return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? ini_get('session.gc_maxlifetime'))); + return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime'))); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php b/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php index f3f7b201..76e4373f 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php @@ -11,7 +11,10 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; +use Doctrine\DBAL\Tools\DsnParser; use Symfony\Component\Cache\Adapter\AbstractAdapter; use Symfony\Component\Cache\Traits\RedisClusterProxy; use Symfony\Component\Cache\Traits\RedisProxy; @@ -60,7 +63,7 @@ class SessionHandlerFactory case str_starts_with($connection, 'rediss:'): case str_starts_with($connection, 'memcached:'): if (!class_exists(AbstractAdapter::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require symfony/cache".', $connection)); + throw new \InvalidArgumentException('Unsupported Redis or Memcached DSN. Try running "composer require symfony/cache".'); } $handlerClass = str_starts_with($connection, 'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class; $connection = AbstractAdapter::createConnection($connection, ['lazy' => true]); @@ -69,9 +72,18 @@ class SessionHandlerFactory case str_starts_with($connection, 'pdo_oci://'): if (!class_exists(DriverManager::class)) { - throw new \InvalidArgumentException(sprintf('Unsupported DSN "%s". Try running "composer require doctrine/dbal".', $connection)); + throw new \InvalidArgumentException('Unsupported PDO OCI DSN. Try running "composer require doctrine/dbal".'); } - $connection = DriverManager::getConnection(['url' => $connection])->getWrappedConnection(); + $connection[3] = '-'; + $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($connection) : ['url' => $connection]; + $config = new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $connection = DriverManager::getConnection($params, $config); + // The condition should be removed once support for DBAL <3.3 is dropped + $connection = method_exists($connection, 'getNativeConnection') ? $connection->getNativeConnection() : $connection->getWrappedConnection(); // no break; case str_starts_with($connection, 'mssql://'): diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php index 0461e997..f7c385f6 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php @@ -30,6 +30,16 @@ class StrictSessionHandler extends AbstractSessionHandler $this->handler = $handler; } + /** + * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. + * + * @internal + */ + public function isWrapper(): bool + { + return $this->handler instanceof \SessionHandler; + } + /** * @return bool */ diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php index 1bfce552..3e10f6db 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php @@ -95,12 +95,12 @@ class MetadataBag implements SessionBagInterface /** * Stamps a new session's metadata. * - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. + * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. */ - public function stampNew(int $lifetime = null) + public function stampNew(?int $lifetime = null) { $this->stampCreated($lifetime); } @@ -158,10 +158,10 @@ class MetadataBag implements SessionBagInterface $this->name = $name; } - private function stampCreated(int $lifetime = null): void + private function stampCreated(?int $lifetime = null): void { $timeStamp = time(); $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; - $this->meta[self::LIFETIME] = $lifetime ?? (int) ini_get('session.cookie_lifetime'); + $this->meta[self::LIFETIME] = $lifetime ?? (int) \ini_get('session.cookie_lifetime'); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php index c5c2bb07..77bb38f1 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php @@ -62,7 +62,7 @@ class MockArraySessionStorage implements SessionStorageInterface */ protected $bags = []; - public function __construct(string $name = 'MOCKSESSID', MetadataBag $metaBag = null) + public function __construct(string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) { $this->name = $name; $this->setMetadataBag($metaBag); @@ -94,7 +94,7 @@ class MockArraySessionStorage implements SessionStorageInterface /** * {@inheritdoc} */ - public function regenerate(bool $destroy = false, int $lifetime = null) + public function regenerate(bool $destroy = false, ?int $lifetime = null) { if (!$this->started) { $this->start(); @@ -204,7 +204,7 @@ class MockArraySessionStorage implements SessionStorageInterface return $this->started; } - public function setMetadataBag(MetadataBag $bag = null) + public function setMetadataBag(?MetadataBag $bag = null) { if (null === $bag) { $bag = new MetadataBag(); diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 8e32a45e..8aeb9724 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -30,7 +30,7 @@ class MockFileSessionStorage extends MockArraySessionStorage /** * @param string|null $savePath Path of directory to save session files */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) + public function __construct(?string $savePath = null, string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) { if (null === $savePath) { $savePath = sys_get_temp_dir(); @@ -68,7 +68,7 @@ class MockFileSessionStorage extends MockArraySessionStorage /** * {@inheritdoc} */ - public function regenerate(bool $destroy = false, int $lifetime = null) + public function regenerate(bool $destroy = false, ?int $lifetime = null) { if (!$this->started) { $this->start(); diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php index d0da1e16..900fa7cf 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php @@ -28,7 +28,7 @@ class MockFileSessionStorageFactory implements SessionStorageFactoryInterface /** * @see MockFileSessionStorage constructor. */ - public function __construct(string $savePath = null, string $name = 'MOCKSESSID', MetadataBag $metaBag = null) + public function __construct(?string $savePath = null, string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) { $this->savePath = $savePath; $this->name = $name; diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 02467da9..e7b42ed0 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -97,7 +97,7 @@ class NativeSessionStorage implements SessionStorageInterface * * @param AbstractProxy|\SessionHandlerInterface|null $handler */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) + public function __construct(array $options = [], $handler = null, ?MetadataBag $metaBag = null) { if (!\extension_loaded('session')) { throw new \LogicException('PHP extension "session" is required.'); @@ -141,10 +141,46 @@ class NativeSessionStorage implements SessionStorageInterface throw new \RuntimeException('Failed to start the session: already started by PHP.'); } - if (filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { + if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); } + $sessionId = $_COOKIE[session_name()] ?? null; + /* + * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`. + * + * ---------- Part 1 + * + * The part `[a-zA-Z0-9,-]` is related to the PHP ini directive `session.sid_bits_per_character` defined as 6. + * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character. + * Allowed values are integers such as: + * - 4 for range `a-f0-9` + * - 5 for range `a-v0-9` + * - 6 for range `a-zA-Z0-9,-` + * + * ---------- Part 2 + * + * The part `{22,250}` is related to the PHP ini directive `session.sid_length`. + * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-length. + * Allowed values are integers between 22 and 256, but we use 250 for the max. + * + * Where does the 250 come from? + * - The length of Windows and Linux filenames is limited to 255 bytes. Then the max must not exceed 255. + * - The session filename prefix is `sess_`, a 5 bytes string. Then the max must not exceed 255 - 5 = 250. + * + * ---------- Conclusion + * + * The parts 1 and 2 prevent the warning below: + * `PHP Warning: SessionHandler::read(): Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed.` + * + * The part 2 prevents the warning below: + * `PHP Warning: SessionHandler::read(): open(filepath, O_RDWR) failed: No such file or directory (2).` + */ + if ($sessionId && $this->saveHandler instanceof AbstractProxy && 'files' === $this->saveHandler->getSaveHandlerName() && !preg_match('/^[a-zA-Z0-9,-]{22,250}$/', $sessionId)) { + // the session ID in the header is invalid, create a new one + session_id(session_create_id()); + } + // ok to try and start the session if (!session_start()) { throw new \RuntimeException('Failed to start the session.'); @@ -197,7 +233,7 @@ class NativeSessionStorage implements SessionStorageInterface /** * {@inheritdoc} */ - public function regenerate(bool $destroy = false, int $lifetime = null) + public function regenerate(bool $destroy = false, ?int $lifetime = null) { // Cannot regenerate the session ID for non-active sessions. if (\PHP_SESSION_ACTIVE !== session_status()) { @@ -208,7 +244,7 @@ class NativeSessionStorage implements SessionStorageInterface return false; } - if (null !== $lifetime && $lifetime != ini_get('session.cookie_lifetime')) { + if (null !== $lifetime && $lifetime != \ini_get('session.cookie_lifetime')) { $this->save(); ini_set('session.cookie_lifetime', $lifetime); $this->start(); @@ -243,7 +279,7 @@ class NativeSessionStorage implements SessionStorageInterface unset($_SESSION[$key]); } } - if ([$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { + if ($_SESSION && [$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { unset($_SESSION[$key]); } @@ -319,7 +355,7 @@ class NativeSessionStorage implements SessionStorageInterface return $this->bags[$name]; } - public function setMetadataBag(MetadataBag $metaBag = null) + public function setMetadataBag(?MetadataBag $metaBag = null) { if (null === $metaBag) { $metaBag = new MetadataBag(); @@ -419,9 +455,10 @@ class NativeSessionStorage implements SessionStorageInterface */ public function setSaveHandler($saveHandler = null) { - if (!$saveHandler instanceof AbstractProxy && - !$saveHandler instanceof \SessionHandlerInterface && - null !== $saveHandler) { + if (!$saveHandler instanceof AbstractProxy + && !$saveHandler instanceof \SessionHandlerInterface + && null !== $saveHandler + ) { throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null.'); } @@ -450,7 +487,7 @@ class NativeSessionStorage implements SessionStorageInterface * PHP takes the return value from the read() handler, unserializes it * and populates $_SESSION with the result automatically. */ - protected function loadSession(array &$session = null) + protected function loadSession(?array &$session = null) { if (null === $session) { $session = &$_SESSION; diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php index a7d7411f..48e65267 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php @@ -29,7 +29,7 @@ class NativeSessionStorageFactory implements SessionStorageFactoryInterface /** * @see NativeSessionStorage constructor. */ - public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null, bool $secure = false) + public function __construct(array $options = [], $handler = null, ?MetadataBag $metaBag = null, bool $secure = false) { $this->options = $options; $this->handler = $handler; diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php index 72dbef13..855d5e11 100644 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php @@ -23,7 +23,7 @@ class PhpBridgeSessionStorage extends NativeSessionStorage /** * @param AbstractProxy|\SessionHandlerInterface|null $handler */ - public function __construct($handler = null, MetadataBag $metaBag = null) + public function __construct($handler = null, ?MetadataBag $metaBag = null) { if (!\extension_loaded('session')) { throw new \LogicException('PHP extension "session" is required.'); diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php index 173ef71d..aa932632 100644 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php +++ b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php @@ -28,7 +28,7 @@ class PhpBridgeSessionStorageFactory implements SessionStorageFactoryInterface /** * @see PhpBridgeSessionStorage constructor. */ - public function __construct($handler = null, MetadataBag $metaBag = null, bool $secure = false) + public function __construct($handler = null, ?MetadataBag $metaBag = null, bool $secure = false) { $this->handler = $handler; $this->metaBag = $metaBag; diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php index 9b0cdeb7..0defa4a7 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; + /** * @author Drak */ @@ -22,7 +24,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf { $this->handler = $handler; $this->wrapper = $handler instanceof \SessionHandler; - $this->saveHandlerName = $this->wrapper ? ini_get('session.save_handler') : 'user'; + $this->saveHandlerName = $this->wrapper || ($handler instanceof StrictSessionHandler && $handler->isWrapper()) ? \ini_get('session.save_handler') : 'user'; } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php index b7f66e7c..70b7c6a1 100644 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php @@ -80,17 +80,17 @@ interface SessionStorageInterface * Otherwise session data could get lost again for concurrent requests with the * new ID. One result could be that you get logged out after just logging in. * - * @param bool $destroy Destroy session when regenerating? - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. + * @param bool $destroy Destroy session when regenerating? + * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value + * will leave the system settings unchanged, 0 sets the cookie + * to expire with browser session. Time is in seconds, and is + * not a Unix timestamp. * * @return bool * * @throws \RuntimeException If an error occurs while regenerating this storage */ - public function regenerate(bool $destroy = false, int $lifetime = null); + public function regenerate(bool $destroy = false, ?int $lifetime = null); /** * Force the session to be saved and closed. diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index 676cd668..b42330dc 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -30,7 +30,7 @@ class StreamedResponse extends Response protected $streamed; private $headersSent; - public function __construct(callable $callback = null, int $status = 200, array $headers = []) + public function __construct(?callable $callback = null, int $status = 200, array $headers = []) { parent::__construct(null, $status, $headers); @@ -114,9 +114,9 @@ class StreamedResponse extends Response /** * {@inheritdoc} * - * @throws \LogicException when the content is not null - * * @return $this + * + * @throws \LogicException when the content is not null */ public function setContent(?string $content) { diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php index 554e1a16..939925b9 100644 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php @@ -22,7 +22,7 @@ final class ResponseCookieValueSame extends Constraint private $path; private $domain; - public function __construct(string $name, string $value, string $path = '/', string $domain = null) + public function __construct(string $name, string $value, string $path = '/', ?string $domain = null) { $this->name = $name; $this->value = $value; @@ -59,7 +59,7 @@ final class ResponseCookieValueSame extends Constraint return false; } - return $this->value === $cookie->getValue(); + return $this->value === (string) $cookie->getValue(); } /** diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php index eae9e271..9d6e58c8 100644 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php @@ -21,7 +21,7 @@ final class ResponseHasCookie extends Constraint private $path; private $domain; - public function __construct(string $name, string $path = '/', string $domain = null) + public function __construct(string $name, string $path = '/', ?string $domain = null) { $this->name = $name; $this->path = $path; diff --git a/vendor/symfony/http-foundation/UrlHelper.php b/vendor/symfony/http-foundation/UrlHelper.php index c15f101c..90659947 100644 --- a/vendor/symfony/http-foundation/UrlHelper.php +++ b/vendor/symfony/http-foundation/UrlHelper.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpFoundation; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RequestContextAwareInterface; /** * A helper service for manipulating URLs within and outside the request scope. @@ -23,8 +24,15 @@ final class UrlHelper private $requestStack; private $requestContext; - public function __construct(RequestStack $requestStack, RequestContext $requestContext = null) + /** + * @param RequestContextAwareInterface|RequestContext|null $requestContext + */ + public function __construct(RequestStack $requestStack, $requestContext = null) { + if (null !== $requestContext && !$requestContext instanceof RequestContext && !$requestContext instanceof RequestContextAwareInterface) { + throw new \TypeError(__METHOD__.': Argument #2 ($requestContext) must of type Symfony\Component\Routing\RequestContextAwareInterface|Symfony\Component\Routing\RequestContext|null, '.get_debug_type($requestContext).' given.'); + } + $this->requestStack = $requestStack; $this->requestContext = $requestContext; } @@ -73,28 +81,36 @@ final class UrlHelper private function getAbsoluteUrlFromContext(string $path): string { - if (null === $this->requestContext || '' === $host = $this->requestContext->getHost()) { + if (null === $context = $this->requestContext) { return $path; } - $scheme = $this->requestContext->getScheme(); + if ($context instanceof RequestContextAwareInterface) { + $context = $context->getContext(); + } + + if ('' === $host = $context->getHost()) { + return $path; + } + + $scheme = $context->getScheme(); $port = ''; - if ('http' === $scheme && 80 !== $this->requestContext->getHttpPort()) { - $port = ':'.$this->requestContext->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $this->requestContext->getHttpsPort()) { - $port = ':'.$this->requestContext->getHttpsPort(); + if ('http' === $scheme && 80 !== $context->getHttpPort()) { + $port = ':'.$context->getHttpPort(); + } elseif ('https' === $scheme && 443 !== $context->getHttpsPort()) { + $port = ':'.$context->getHttpsPort(); } if ('#' === $path[0]) { - $queryString = $this->requestContext->getQueryString(); - $path = $this->requestContext->getPathInfo().($queryString ? '?'.$queryString : '').$path; + $queryString = $context->getQueryString(); + $path = $context->getPathInfo().($queryString ? '?'.$queryString : '').$path; } elseif ('?' === $path[0]) { - $path = $this->requestContext->getPathInfo().$path; + $path = $context->getPathInfo().$path; } if ('/' !== $path[0]) { - $path = rtrim($this->requestContext->getBaseUrl(), '/').'/'.$path; + $path = rtrim($context->getBaseUrl(), '/').'/'.$path; } return $scheme.'://'.$host.$port.$path; diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json index d54bbfd1..cb8d59ff 100644 --- a/vendor/symfony/http-foundation/composer.json +++ b/vendor/symfony/http-foundation/composer.json @@ -24,8 +24,11 @@ "require-dev": { "predis/predis": "~1.0", "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0" + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" }, "suggest" : { "symfony/mime": "To use the file extension guesser" diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php index 67f9ed50..730f0f7b 100644 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php +++ b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php @@ -29,7 +29,7 @@ class CacheWarmerAggregate implements CacheWarmerInterface /** * @param iterable $warmers */ - public function __construct(iterable $warmers = [], bool $debug = false, string $deprecationLogsFilepath = null) + public function __construct(iterable $warmers = [], bool $debug = false, ?string $deprecationLogsFilepath = null) { $this->warmers = $warmers; $this->debug = $debug; diff --git a/vendor/symfony/http-kernel/Config/FileLocator.php b/vendor/symfony/http-kernel/Config/FileLocator.php index 6eca9863..4b984375 100644 --- a/vendor/symfony/http-kernel/Config/FileLocator.php +++ b/vendor/symfony/http-kernel/Config/FileLocator.php @@ -33,7 +33,7 @@ class FileLocator extends BaseFileLocator /** * {@inheritdoc} */ - public function locate(string $file, string $currentPath = null, bool $first = true) + public function locate(string $file, ?string $currentPath = null, bool $first = true) { if (isset($file[0]) && '@' === $file[0]) { $resource = $this->kernel->locateResource($file); diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php index a54140b7..76ef7974 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php @@ -33,7 +33,7 @@ final class ArgumentResolver implements ArgumentResolverInterface /** * @param iterable $argumentValueResolvers */ - public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) + public function __construct(?ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) { $this->argumentMetadataFactory = $argumentMetadataFactory ?? new ArgumentMetadataFactory(); $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php index d4971cc1..48ea6e74 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php @@ -69,8 +69,9 @@ final class NotTaggedControllerValueResolver implements ArgumentValueResolverInt } if (!$this->container->has($controller)) { - $i = strrpos($controller, ':'); - $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); + $controller = (false !== $i = strrpos($controller, ':')) + ? substr($controller, 0, $i).strtolower(substr($controller, $i)) + : $controller.'::__invoke'; } $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); diff --git a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php index 3b946846..b7f77d00 100644 --- a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php @@ -25,7 +25,7 @@ class ContainerControllerResolver extends ControllerResolver { protected $container; - public function __construct(ContainerInterface $container, LoggerInterface $logger = null) + public function __construct(ContainerInterface $container, ?LoggerInterface $logger = null) { $this->container = $container; diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php index 8abbadd4..e6b4b805 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php @@ -25,7 +25,7 @@ class ControllerResolver implements ControllerResolverInterface { private $logger; - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger; } diff --git a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php b/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php index e22cf082..859cf3a6 100644 --- a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php @@ -35,10 +35,10 @@ class TraceableArgumentResolver implements ArgumentResolverInterface { $e = $this->stopwatch->start('controller.get_arguments'); - $ret = $this->resolver->getArguments($request, $controller); - - $e->stop(); - - return $ret; + try { + return $this->resolver->getArguments($request, $controller); + } finally { + $e->stop(); + } } } diff --git a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php index bf6b6aa1..013dfe23 100644 --- a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php @@ -35,10 +35,10 @@ class TraceableControllerResolver implements ControllerResolverInterface { $e = $this->stopwatch->start('controller.get_callable'); - $ret = $this->resolver->getController($request); - - $e->stop(); - - return $ret; + try { + return $this->resolver->getController($request); + } finally { + $e->stop(); + } } } diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php index 1a9ebc0c..5046c84b 100644 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php +++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php @@ -107,9 +107,9 @@ class ArgumentMetadata /** * Returns the default value of the argument. * - * @throws \LogicException if no default value is present; {@see self::hasDefaultValue()} - * * @return mixed + * + * @throws \LogicException if no default value is present; {@see self::hasDefaultValue()} */ public function getDefaultValue() { @@ -137,7 +137,7 @@ class ArgumentMetadata /** * @return object[] */ - public function getAttributes(string $name = null, int $flags = 0): array + public function getAttributes(?string $name = null, int $flags = 0): array { if (!$name) { return $this->attributes; diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php index e3835c05..00e67334 100644 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -33,7 +33,7 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface $class = $reflection->class; } else { $reflection = new \ReflectionFunction($controller); - if ($class = str_contains($reflection->name, '{closure}') ? null : $reflection->getClosureScopeClass()) { + if ($class = str_contains($reflection->name, '{closure') ? null : (\PHP_VERSION_ID >= 80111 ? $reflection->getClosureCalledClass() : $reflection->getClosureScopeClass())) { $class = $class->name; } } diff --git a/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php b/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php index fda6a4ea..31764f09 100644 --- a/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response; */ class AjaxDataCollector extends DataCollector { - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { // all collecting is done client side } diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php index d0f2c7c2..72f79c5b 100644 --- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php @@ -32,7 +32,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte /** * Sets the Kernel associated with this Request. */ - public function setKernel(KernelInterface $kernel = null) + public function setKernel(?KernelInterface $kernel = null) { $this->kernel = $kernel; } @@ -40,7 +40,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE); $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE); @@ -60,8 +60,8 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte 'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', 'php_timezone' => date_default_timezone_get(), 'xdebug_enabled' => \extension_loaded('xdebug'), - 'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), - 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), + 'apcu_enabled' => \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN), + 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN), 'bundles' => [], 'sapi_name' => \PHP_SAPI, ]; diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/DataCollector/DataCollector.php index ccaf66da..14a6f26f 100644 --- a/vendor/symfony/http-kernel/DataCollector/DataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DataCollector.php @@ -70,9 +70,21 @@ abstract class DataCollector implements DataCollectorInterface $casters = [ '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { + $b = $a; foreach ($a as $k => $v) { - if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { - $a[$k] = new CutStub($v); + if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) { + continue; + } + + try { + $a[$k] = $s = new CutStub($v); + + if ($b[$k] === $s) { + // we've hit a non-typed reference + $a[$k] = $v; + } + } catch (\TypeError $e) { + // we've hit a typed reference } } } diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php b/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php index 1cb865fd..8aca9480 100644 --- a/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php +++ b/vendor/symfony/http-kernel/DataCollector/DataCollectorInterface.php @@ -25,7 +25,7 @@ interface DataCollectorInterface extends ResetInterface /** * Collects data for the given Request and Response. */ - public function collect(Request $request, Response $response, \Throwable $exception = null); + public function collect(Request $request, Response $response, ?\Throwable $exception = null); /** * Returns the name of the collector. diff --git a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php index 8e052d9d..3311bd40 100644 --- a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php @@ -47,11 +47,12 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface * @param string|FileLinkFormatter|null $fileLinkFormat * @param DataDumperInterface|Connection|null $dumper */ - public function __construct(Stopwatch $stopwatch = null, $fileLinkFormat = null, string $charset = null, RequestStack $requestStack = null, $dumper = null) + public function __construct(?Stopwatch $stopwatch = null, $fileLinkFormat = null, ?string $charset = null, ?RequestStack $requestStack = null, $dumper = null) { + $fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); $this->stopwatch = $stopwatch; - $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->charset = $charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'; + $this->fileLinkFormat = $fileLinkFormat instanceof FileLinkFormatter && false === $fileLinkFormat->format('', 0) ? false : $fileLinkFormat; + $this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'; $this->requestStack = $requestStack; $this->dumper = $dumper; @@ -100,7 +101,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface } } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (!$this->dataCount) { $this->data = []; @@ -115,11 +116,11 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if (!$this->requestStack || !$response->headers->has('X-Debug-Token') || $response->isRedirection() - || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type'), 'html')) + || ($response->headers->has('Content-Type') && !str_contains($response->headers->get('Content-Type') ?? '', 'html')) || 'html' !== $request->getRequestFormat() || false === strripos($response->getContent(), '') ) { - if ($response->headers->has('Content-Type') && str_contains($response->headers->get('Content-Type'), 'html')) { + if ($response->headers->has('Content-Type') && str_contains($response->headers->get('Content-Type') ?? '', 'html')) { $dumper = new HtmlDumper('php://output', $this->charset); $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { @@ -232,7 +233,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $h = headers_list(); $i = \count($h); - array_unshift($h, 'Content-Type: '.ini_get('default_mimetype')); + array_unshift($h, 'Content-Type: '.\ini_get('default_mimetype')); while (0 !== stripos($h[$i], 'Content-Type:')) { --$i; } diff --git a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php index a8135533..3f6ef4f7 100644 --- a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php @@ -30,7 +30,7 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter private $requestStack; private $currentRequest; - public function __construct(EventDispatcherInterface $dispatcher = null, RequestStack $requestStack = null) + public function __construct(?EventDispatcherInterface $dispatcher = null, ?RequestStack $requestStack = null) { $this->dispatcher = $dispatcher; $this->requestStack = $requestStack; @@ -39,7 +39,7 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; $this->data = [ diff --git a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php index 14bbbb36..d93b8139 100644 --- a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php @@ -25,7 +25,7 @@ class ExceptionDataCollector extends DataCollector /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (null !== $exception) { $this->data = [ diff --git a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php index 15094fdb..0d6df48c 100644 --- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php @@ -30,7 +30,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private $requestStack; private $processedLogs; - public function __construct(object $logger = null, string $containerPathPrefix = null, RequestStack $requestStack = null) + public function __construct(?object $logger = null, ?string $containerPathPrefix = null, ?RequestStack $requestStack = null) { if (null !== $logger && $logger instanceof DebugLoggerInterface) { $this->logger = $logger; @@ -43,7 +43,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { $this->currentRequest = $this->requestStack && $this->requestStack->getMainRequest() !== $request ? $request : null; } @@ -144,7 +144,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte $allChannels = []; foreach ($this->getProcessedLogs() as $log) { - if ('' === trim($log['channel'])) { + if ('' === trim($log['channel'] ?? '')) { continue; } @@ -222,9 +222,9 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return $logs; } - private function getContainerCompilerLogs(string $compilerLogsFilepath = null): array + private function getContainerCompilerLogs(?string $compilerLogsFilepath = null): array { - if (!is_file($compilerLogsFilepath)) { + if (!$compilerLogsFilepath || !is_file($compilerLogsFilepath)) { return []; } diff --git a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php index 4b64a573..62d048ad 100644 --- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @@ -29,7 +29,7 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { $this->updateMemoryUsage(); } @@ -41,7 +41,7 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte { $this->data = [ 'memory' => 0, - 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), + 'memory_limit' => $this->convertToBytes(\ini_get('memory_limit')), ]; } @@ -100,11 +100,11 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte switch (substr($memoryLimit, -1)) { case 't': $max *= 1024; - // no break + // no break case 'g': $max *= 1024; - // no break + // no break case 'm': $max *= 1024; - // no break + // no break case 'k': $max *= 1024; } diff --git a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php index 523f5c95..6931336f 100644 --- a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php @@ -38,7 +38,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter private $sessionUsages = []; private $requestStack; - public function __construct(RequestStack $requestStack = null) + public function __construct(?RequestStack $requestStack = null) { $this->controllers = new \SplObjectStorage(); $this->requestStack = $requestStack; @@ -47,7 +47,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { // attributes are serialized and as they can be anything, they need to be converted to strings. $attributes = []; @@ -110,7 +110,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter 'session_metadata' => $sessionMetadata, 'session_attributes' => $sessionAttributes, 'session_usages' => array_values($this->sessionUsages), - 'stateless_check' => $this->requestStack && $this->requestStack->getMainRequest()->attributes->get('_stateless', false), + 'stateless_check' => $this->requestStack && ($mainRequest = $this->requestStack->getMainRequest()) && $mainRequest->attributes->get('_stateless', false), 'flashes' => $flashes, 'path_info' => $request->getPathInfo(), 'controller' => 'n/a', @@ -474,12 +474,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter 'line' => $r->getStartLine(), ]; - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { return $controller; } $controller['method'] = $r->name; - if ($class = $r->getClosureScopeClass()) { + if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { $controller['class'] = $class->name; } else { return $r->name; diff --git a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php index 372ede03..f3735fe5 100644 --- a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php @@ -36,7 +36,7 @@ class RouterDataCollector extends DataCollector * * @final */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if ($response instanceof RedirectResponse) { $this->data['redirect'] = true; diff --git a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php index 43799060..13a62e63 100644 --- a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php @@ -27,16 +27,17 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf private $kernel; private $stopwatch; - public function __construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null) + public function __construct(?KernelInterface $kernel = null, ?Stopwatch $stopwatch = null) { $this->kernel = $kernel; $this->stopwatch = $stopwatch; + $this->data = ['events' => [], 'stopwatch_installed' => false, 'start_time' => 0]; } /** * {@inheritdoc} */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (null !== $this->kernel) { $startTime = $this->kernel->getStartTime(); @@ -57,7 +58,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf */ public function reset() { - $this->data = []; + $this->data = ['events' => [], 'stopwatch_installed' => false, 'start_time' => 0]; if (null !== $this->stopwatch) { $this->stopwatch->reset(); diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php index 0e3df040..8ec7e38d 100644 --- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php +++ b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php @@ -40,12 +40,12 @@ class FileLinkFormatter private $urlFormat; /** - * @param string|\Closure $urlFormat the URL format, or a closure that returns it on-demand + * @param string|array|null $fileLinkFormat + * @param string|\Closure $urlFormat the URL format, or a closure that returns it on-demand */ - public function __construct(string $fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, $urlFormat = null) + public function __construct($fileLinkFormat = null, ?RequestStack $requestStack = null, ?string $baseDir = null, $urlFormat = null) { - $fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - if ($fileLinkFormat && !\is_array($fileLinkFormat)) { + if (!\is_array($fileLinkFormat) && $fileLinkFormat = (self::FORMATS[$fileLinkFormat] ?? $fileLinkFormat) ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) { $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, \PREG_SPLIT_DELIM_CAPTURE); } diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 8fd1f553..0bdba44b 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -24,6 +24,7 @@ use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\TypedReference; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\SessionInterface; /** @@ -69,6 +70,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); $def->setPublic(true); + $def->setLazy(false); $class = $def->getClass(); $autowire = $def->isAutowired(); $bindings = $def->getBindings(); @@ -174,7 +176,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface $invalidBehavior = ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE; } - if (Request::class === $type || SessionInterface::class === $type) { + if (Request::class === $type || SessionInterface::class === $type || Response::class === $type) { continue; } diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php index 0924b766..a339f44a 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php @@ -36,13 +36,15 @@ use Symfony\Contracts\Service\ResetInterface; * * @author Johannes M. Schmitt * @author Tobias Schultze - * - * @internal */ abstract class AbstractSessionListener implements EventSubscriberInterface, ResetInterface { public const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; + + /** + * @internal + */ protected $container; private $sessionUsageStack = []; private $debug; @@ -52,13 +54,19 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese */ private $sessionOptions; - public function __construct(ContainerInterface $container = null, bool $debug = false, array $sessionOptions = []) + /** + * @internal + */ + public function __construct(?ContainerInterface $container = null, bool $debug = false, array $sessionOptions = []) { $this->container = $container; $this->debug = $debug; $this->sessionOptions = $sessionOptions; } + /** + * @internal + */ public function onKernelRequest(RequestEvent $event) { if (!$event->isMainRequest()) { @@ -72,6 +80,7 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese $request->setSessionFactory(function () use (&$sess, $request) { if (!$sess) { $sess = $this->getSession(); + $request->setSession($sess); /* * For supporting sessions in php runtime with runners like roadrunner or swoole, the session @@ -93,6 +102,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese $this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : 0; } + /** + * @internal + */ public function onKernelResponse(ResponseEvent $event) { if (!$event->isMainRequest() || (!$this->container->has('initialized_session') && !$event->getRequest()->hasSession())) { @@ -104,7 +116,7 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese // Always remove the internal header if present $response->headers->remove(self::NO_AUTO_CACHE_CONTROL_HEADER); - if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : $event->getRequest()->getSession()) { + if (!$session = $this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : ($event->getRequest()->hasSession() ? $event->getRequest()->getSession() : null)) { return; } @@ -158,6 +170,11 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese $isSessionEmpty = $session->isEmpty() && empty($_SESSION); // checking $_SESSION to keep compatibility with native sessions if ($requestSessionCookieId && $isSessionEmpty) { + // PHP internally sets the session cookie value to "deleted" when setcookie() is called with empty string $value argument + // which happens in \Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler::destroy + // when the session gets invalidated (for example on logout) so we must handle this case here too + // otherwise we would send two Set-Cookie headers back with the response + SessionUtils::popSessionCookie($sessionName, 'deleted'); $response->headers->clearCookie( $sessionName, $sessionCookiePath, @@ -195,10 +212,11 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese } if ($autoCacheControl) { + $maxAge = $response->headers->hasCacheControlDirective('public') ? 0 : (int) $response->getMaxAge(); $response - ->setExpires(new \DateTime()) + ->setExpires(new \DateTimeImmutable('+'.$maxAge.' seconds')) ->setPrivate() - ->setMaxAge(0) + ->setMaxAge($maxAge) ->headers->addCacheControlDirective('must-revalidate'); } @@ -215,6 +233,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese } } + /** + * @internal + */ public function onFinishRequest(FinishRequestEvent $event) { if ($event->isMainRequest()) { @@ -222,6 +243,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese } } + /** + * @internal + */ public function onSessionUsage(): void { if (!$this->debug) { @@ -257,6 +281,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); } + /** + * @internal + */ public static function getSubscribedEvents(): array { return [ @@ -267,6 +294,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese ]; } + /** + * @internal + */ public function reset(): void { if (\PHP_SESSION_ACTIVE === session_status()) { @@ -284,6 +314,8 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese /** * Gets the session object. * + * @internal + * * @return SessionInterface|null */ abstract protected function getSession(); diff --git a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php index efe3960b..da71d086 100644 --- a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php +++ b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php @@ -49,7 +49,7 @@ class DebugHandlersListener implements EventSubscriberInterface * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged * @param bool $scope Enables/disables scoping mode */ - public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $scope = true, $deprecationLogger = null, $fileLinkFormat = null) + public function __construct(?callable $exceptionHandler = null, ?LoggerInterface $logger = null, $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, $scope = true, $deprecationLogger = null, $fileLinkFormat = null) { if (!\is_bool($scope)) { trigger_deprecation('symfony/http-kernel', '5.4', 'Passing a $fileLinkFormat is deprecated.'); @@ -57,7 +57,7 @@ class DebugHandlersListener implements EventSubscriberInterface $deprecationLogger = $fileLinkFormat; } - $handler = set_exception_handler('var_dump'); + $handler = set_exception_handler('is_int'); $this->earlyHandler = \is_array($handler) ? $handler[0] : null; restore_exception_handler(); @@ -73,7 +73,7 @@ class DebugHandlersListener implements EventSubscriberInterface /** * Configures the error handler. */ - public function configure(object $event = null) + public function configure(?object $event = null) { if ($event instanceof ConsoleEvent && !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { return; @@ -83,7 +83,7 @@ class DebugHandlersListener implements EventSubscriberInterface } $this->firstCall = $this->hasTerminatedWithException = false; - $handler = set_exception_handler('var_dump'); + $handler = set_exception_handler('is_int'); $handler = \is_array($handler) ? $handler[0] : null; restore_exception_handler(); diff --git a/vendor/symfony/http-kernel/EventListener/DumpListener.php b/vendor/symfony/http-kernel/EventListener/DumpListener.php index 30908a4f..f7f9bd69 100644 --- a/vendor/symfony/http-kernel/EventListener/DumpListener.php +++ b/vendor/symfony/http-kernel/EventListener/DumpListener.php @@ -29,7 +29,7 @@ class DumpListener implements EventSubscriberInterface private $dumper; private $connection; - public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper, Connection $connection = null) + public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper, ?Connection $connection = null) { $this->cloner = $cloner; $this->dumper = $dumper; diff --git a/vendor/symfony/http-kernel/EventListener/ErrorListener.php b/vendor/symfony/http-kernel/EventListener/ErrorListener.php index 9dc3871c..668a908e 100644 --- a/vendor/symfony/http-kernel/EventListener/ErrorListener.php +++ b/vendor/symfony/http-kernel/EventListener/ErrorListener.php @@ -33,9 +33,15 @@ class ErrorListener implements EventSubscriberInterface protected $controller; protected $logger; protected $debug; + /** + * @var array|null}> + */ protected $exceptionsMapping; - public function __construct($controller, LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = []) + /** + * @param array|null}> $exceptionsMapping + */ + public function __construct($controller, ?LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = []) { $this->controller = $controller; $this->logger = $logger; @@ -149,7 +155,7 @@ class ErrorListener implements EventSubscriberInterface /** * Logs an exception. */ - protected function logException(\Throwable $exception, string $message, string $logLevel = null): void + protected function logException(\Throwable $exception, string $message, ?string $logLevel = null): void { if (null !== $this->logger) { if (null !== $logLevel) { diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php index f19e1364..a4073eaa 100644 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ b/vendor/symfony/http-kernel/EventListener/LocaleListener.php @@ -35,7 +35,7 @@ class LocaleListener implements EventSubscriberInterface private $useAcceptLanguageHeader; private $enabledLocales; - public function __construct(RequestStack $requestStack, string $defaultLocale = 'en', RequestContextAwareInterface $router = null, bool $useAcceptLanguageHeader = false, array $enabledLocales = []) + public function __construct(RequestStack $requestStack, string $defaultLocale = 'en', ?RequestContextAwareInterface $router = null, bool $useAcceptLanguageHeader = false, array $enabledLocales = []) { $this->defaultLocale = $defaultLocale; $this->requestStack = $requestStack; @@ -68,8 +68,10 @@ class LocaleListener implements EventSubscriberInterface { if ($locale = $request->attributes->get('_locale')) { $request->setLocale($locale); - } elseif ($this->useAcceptLanguageHeader && $this->enabledLocales && ($preferredLanguage = $request->getPreferredLanguage($this->enabledLocales))) { - $request->setLocale($preferredLanguage); + } elseif ($this->useAcceptLanguageHeader && $this->enabledLocales) { + if ($request->getLanguages() && $preferredLanguage = $request->getPreferredLanguage($this->enabledLocales)) { + $request->setLocale($preferredLanguage); + } $request->attributes->set('_vary_by_language', true); } } diff --git a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php index 85525249..e4261871 100644 --- a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php +++ b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php @@ -15,6 +15,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestMatcherInterface; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpKernel\Event\ExceptionEvent; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\Event\TerminateEvent; @@ -47,7 +48,7 @@ class ProfilerListener implements EventSubscriberInterface * @param bool $onlyException True if the profiler only collects data when an exception occurs, false otherwise * @param bool $onlyMainRequests True if the profiler only collects data when the request is the main request, false otherwise */ - public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = null, bool $onlyException = false, bool $onlyMainRequests = false, string $collectParameter = null) + public function __construct(Profiler $profiler, RequestStack $requestStack, ?RequestMatcherInterface $matcher = null, bool $onlyException = false, bool $onlyMainRequests = false, ?string $collectParameter = null) { $this->profiler = $profiler; $this->matcher = $matcher; @@ -96,8 +97,21 @@ class ProfilerListener implements EventSubscriberInterface return; } - if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) { - return; + $session = $request->hasPreviousSession() && $request->hasSession() ? $request->getSession() : null; + + if ($session instanceof Session) { + $usageIndexValue = $usageIndexReference = &$session->getUsageIndex(); + $usageIndexReference = \PHP_INT_MIN; + } + + try { + if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) { + return; + } + } finally { + if ($session instanceof Session) { + $usageIndexReference = $usageIndexValue; + } } $this->profiles[$request] = $profile; diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php index 7c4da989..8c1bc0ac 100644 --- a/vendor/symfony/http-kernel/EventListener/RouterListener.php +++ b/vendor/symfony/http-kernel/EventListener/RouterListener.php @@ -55,7 +55,7 @@ class RouterListener implements EventSubscriberInterface * * @throws \InvalidArgumentException */ - public function __construct($matcher, RequestStack $requestStack, RequestContext $context = null, LoggerInterface $logger = null, string $projectDir = null, bool $debug = true) + public function __construct($matcher, RequestStack $requestStack, ?RequestContext $context = null, ?LoggerInterface $logger = null, ?string $projectDir = null, bool $debug = true) { if (!$matcher instanceof UrlMatcherInterface && !$matcher instanceof RequestMatcherInterface) { throw new \InvalidArgumentException('Matcher must either implement UrlMatcherInterface or RequestMatcherInterface.'); @@ -73,7 +73,7 @@ class RouterListener implements EventSubscriberInterface $this->debug = $debug; } - private function setCurrentRequest(Request $request = null) + private function setCurrentRequest(?Request $request = null) { if (null !== $request) { try { diff --git a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php index 9081bff6..dbf3846d 100644 --- a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php +++ b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php @@ -28,7 +28,7 @@ class SurrogateListener implements EventSubscriberInterface { private $surrogate; - public function __construct(SurrogateInterface $surrogate = null) + public function __construct(?SurrogateInterface $surrogate = null) { $this->surrogate = $surrogate; } diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php index 58680a32..a93954a4 100644 --- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php @@ -22,7 +22,7 @@ class AccessDeniedHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php index f530f7db..343769c9 100644 --- a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php +++ b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php @@ -21,7 +21,7 @@ class BadRequestHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php index 79c36041..541e9f12 100644 --- a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php @@ -21,7 +21,7 @@ class ConflictHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Exception/GoneHttpException.php index 9ea65057..1a36a531 100644 --- a/vendor/symfony/http-kernel/Exception/GoneHttpException.php +++ b/vendor/symfony/http-kernel/Exception/GoneHttpException.php @@ -21,7 +21,7 @@ class GoneHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/HttpException.php b/vendor/symfony/http-kernel/Exception/HttpException.php index 249fe366..c3088937 100644 --- a/vendor/symfony/http-kernel/Exception/HttpException.php +++ b/vendor/symfony/http-kernel/Exception/HttpException.php @@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface private $statusCode; private $headers; - public function __construct(int $statusCode, ?string $message = '', \Throwable $previous = null, array $headers = [], ?int $code = 0) + public function __construct(int $statusCode, ?string $message = '', ?\Throwable $previous = null, array $headers = [], ?int $code = 0) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php index fcac1378..7531ecfb 100644 --- a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php @@ -21,7 +21,7 @@ class LengthRequiredHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php index 37576bca..e3dc8411 100644 --- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php @@ -22,7 +22,7 @@ class MethodNotAllowedHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int|null $code The internal exception code */ - public function __construct(array $allow, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) + public function __construct(array $allow, ?string $message = '', ?\Throwable $previous = null, ?int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php index 5a422406..9283dcd9 100644 --- a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php @@ -21,7 +21,7 @@ class NotAcceptableHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php index a475113c..d0adb03c 100644 --- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php @@ -21,7 +21,7 @@ class NotFoundHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php index e23740a2..30ce0815 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php @@ -21,7 +21,7 @@ class PreconditionFailedHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php index 5c31fae8..4f8a484f 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php @@ -23,7 +23,7 @@ class PreconditionRequiredHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php index d5681bbe..16efd934 100644 --- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php @@ -22,7 +22,7 @@ class ServiceUnavailableHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int|null $code The internal exception code */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) + public function __construct($retryAfter = null, ?string $message = '', ?\Throwable $previous = null, ?int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php index fd74402b..81148f16 100644 --- a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php +++ b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php @@ -24,7 +24,7 @@ class TooManyRequestsHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int|null $code The internal exception code */ - public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) + public function __construct($retryAfter = null, ?string $message = '', ?\Throwable $previous = null, ?int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php index aeb9713a..e1b8acec 100644 --- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php @@ -22,7 +22,7 @@ class UnauthorizedHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int|null $code The internal exception code */ - public function __construct(string $challenge, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = []) + public function __construct(string $challenge, ?string $message = '', ?\Throwable $previous = null, ?int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php index 7b828b1d..5dc7b986 100644 --- a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php @@ -21,7 +21,7 @@ class UnprocessableEntityHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php index 7908423f..35e20a01 100644 --- a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php @@ -21,7 +21,7 @@ class UnsupportedMediaTypeHttpException extends HttpException * @param \Throwable|null $previous The previous exception * @param int $code The internal exception code */ - public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(?string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = []) { if (null === $message) { trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php index d051ad8b..8a21f6bf 100644 --- a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -34,7 +34,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere * * @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported */ - public function __construct(SurrogateInterface $surrogate = null, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null) + public function __construct(?SurrogateInterface $surrogate, FragmentRendererInterface $inlineStrategy, ?UriSigner $signer = null) { $this->surrogate = $surrogate; $this->inlineStrategy = $inlineStrategy; @@ -89,9 +89,11 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere private function containsNonScalars(array $values): bool { foreach ($values as $value) { - if (\is_array($value)) { - return $this->containsNonScalars($value); - } elseif (!is_scalar($value) && null !== $value) { + if (\is_scalar($value) || null === $value) { + continue; + } + + if (!\is_array($value) || $this->containsNonScalars($value)) { return true; } } diff --git a/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php b/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php index dabe3048..6ab0b814 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentUriGenerator.php @@ -28,7 +28,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface private $signer; private $requestStack; - public function __construct(string $fragmentPath, UriSigner $signer = null, RequestStack $requestStack = null) + public function __construct(string $fragmentPath, ?UriSigner $signer = null, ?RequestStack $requestStack = null) { $this->fragmentPath = $fragmentPath; $this->signer = $signer; @@ -38,7 +38,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface /** * {@inheritDoc} */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string + public function generate(ControllerReference $controller, ?Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string { if (null === $request && (null === $this->requestStack || null === $request = $this->requestStack->getCurrentRequest())) { throw new \LogicException('Generating a fragment URL can only be done when handling a Request.'); @@ -85,7 +85,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface foreach ($values as $key => $value) { if (\is_array($value)) { $this->checkNonScalar($value); - } elseif (!is_scalar($value) && null !== $value) { + } elseif (!\is_scalar($value) && null !== $value) { throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key)); } } diff --git a/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php b/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php index b211f5e3..040011b5 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentUriGeneratorInterface.php @@ -28,5 +28,5 @@ interface FragmentUriGeneratorInterface * @param bool $strict Whether to allow non-scalar attributes or not * @param bool $sign Whether to sign the URL or not */ - public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string; + public function generate(ControllerReference $controller, ?Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string; } diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php index 446ce2d9..a23ffcc7 100644 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php @@ -30,9 +30,9 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer private $charset; /** - * @param string $globalDefaultTemplate The global default content (it can be a template name or the content) + * @param string|null $globalDefaultTemplate The global default content (it can be a template name or the content) */ - public function __construct(Environment $twig = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8') + public function __construct(?Environment $twig = null, ?UriSigner $signer = null, ?string $globalDefaultTemplate = null, string $charset = 'utf-8') { $this->twig = $twig; $this->globalDefaultTemplate = $globalDefaultTemplate; diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php index ea45fdcb..60421f09 100644 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php @@ -30,7 +30,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer private $kernel; private $dispatcher; - public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) + public function __construct(HttpKernelInterface $kernel, ?EventDispatcherInterface $dispatcher = null) { $this->kernel = $kernel; $this->dispatcher = $dispatcher; diff --git a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php index 33848058..e1d73dc7 100644 --- a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php +++ b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php @@ -95,7 +95,7 @@ abstract class AbstractSurrogate implements SurrogateInterface try { $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); - if (!$response->isSuccessful()) { + if (!$response->isSuccessful() && Response::HTTP_NOT_MODIFIED !== $response->getStatusCode()) { throw new \RuntimeException(sprintf('Error when rendering "%s" (Status code is %d).', $subRequest->getUri(), $response->getStatusCode())); } @@ -133,4 +133,15 @@ abstract class AbstractSurrogate implements SurrogateInterface $response->headers->set('Surrogate-Control', preg_replace(sprintf('#content="%s/1.0",\s*#', $upperName), '', $value)); } } + + protected static function generateBodyEvalBoundary(): string + { + static $cookie; + $cookie = hash('md5', $cookie ?? $cookie = random_bytes(16), true); + $boundary = base64_encode($cookie); + + \assert(HttpCache::BODY_EVAL_BOUNDARY_LENGTH === \strlen($boundary)); + + return $boundary; + } } diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php index cd6a00a1..5e7d17a7 100644 --- a/vendor/symfony/http-kernel/HttpCache/Esi.php +++ b/vendor/symfony/http-kernel/HttpCache/Esi.php @@ -45,7 +45,7 @@ class Esi extends AbstractSurrogate /** * {@inheritdoc} */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '') + public function renderIncludeTag(string $uri, ?string $alt = null, bool $ignoreErrors = true, string $comment = '') { $html = sprintf('', $uri, @@ -80,8 +80,8 @@ class Esi extends AbstractSurrogate $content = preg_replace('#.*?#s', '', $content); $content = preg_replace('#]+>#s', '', $content); + $boundary = self::generateBodyEvalBoundary(); $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); $i = 1; while (isset($chunks[$i])) { @@ -95,16 +95,10 @@ class Esi extends AbstractSurrogate throw new \RuntimeException('Unable to process an ESI tag without a "src" attribute.'); } - $chunks[$i] = sprintf('surrogate->handle($this, %s, %s, %s) ?>'."\n", - var_export($options['src'], true), - var_export($options['alt'] ?? '', true), - isset($options['onerror']) && 'continue' === $options['onerror'] ? 'true' : 'false' - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; + $chunks[$i] = $boundary.$options['src']."\n".($options['alt'] ?? '')."\n".('continue' === ($options['onerror'] ?? ''))."\n"; + $i += 2; } - $content = implode('', $chunks); + $content = $boundary.implode('', $chunks).$boundary; $response->setContent($content); $response->headers->set('X-Body-Eval', 'ESI'); diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index bf93171f..9bffc8ad 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -29,6 +29,8 @@ use Symfony\Component\HttpKernel\TerminableInterface; */ class HttpCache implements HttpKernelInterface, TerminableInterface { + public const BODY_EVAL_BOUNDARY_LENGTH = 24; + private $kernel; private $store; private $request; @@ -79,7 +81,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * This setting is overridden by the stale-if-error HTTP Cache-Control extension * (see RFC 5861). */ - public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = []) + public function __construct(HttpKernelInterface $kernel, StoreInterface $store, ?SurrogateInterface $surrogate = null, array $options = []) { $this->store = $store; $this->kernel = $kernel; @@ -469,7 +471,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * * @return Response */ - protected function forward(Request $request, bool $catch = false, Response $entry = null) + protected function forward(Request $request, bool $catch = false, ?Response $entry = null) { if ($this->surrogate) { $this->surrogate->addSurrogateCapability($request); @@ -631,12 +633,22 @@ class HttpCache implements HttpKernelInterface, TerminableInterface private function restoreResponseBody(Request $request, Response $response) { if ($response->headers->has('X-Body-Eval')) { + \assert(self::BODY_EVAL_BOUNDARY_LENGTH === 24); + ob_start(); - if ($response->headers->has('X-Body-File')) { - include $response->headers->get('X-Body-File'); - } else { - eval('; ?>'.$response->getContent().'getContent(); + $boundary = substr($content, 0, 24); + $j = strpos($content, $boundary, 24); + echo substr($content, 24, $j - 24); + $i = $j + 24; + + while (false !== $j = strpos($content, $boundary, $i)) { + [$uri, $alt, $ignoreErrors, $part] = explode("\n", substr($content, $i, $j - $i), 4); + $i = $j + 24; + + echo $this->surrogate->handle($this, $uri, $alt, $ignoreErrors); + echo $part; } $response->setContent(ob_get_clean()); @@ -718,7 +730,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $timeout = $this->options['stale_while_revalidate']; } - return abs($entry->getTtl()) < $timeout; + $age = $entry->getAge(); + $maxAge = $entry->getMaxAge() ?? 0; + $ttl = $maxAge - $age; + + return abs($ttl) < $timeout; } /** diff --git a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php index cf868225..5f372c56 100644 --- a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php +++ b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php @@ -147,7 +147,7 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface if (is_numeric($this->ageDirectives['expires'])) { $date = clone $response->getDate(); - $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); + $date = $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); $response->setExpires($date); } } diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php index f114e05c..d7903ff1 100644 --- a/vendor/symfony/http-kernel/HttpCache/Ssi.php +++ b/vendor/symfony/http-kernel/HttpCache/Ssi.php @@ -42,7 +42,7 @@ class Ssi extends AbstractSurrogate /** * {@inheritdoc} */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '') + public function renderIncludeTag(string $uri, ?string $alt = null, bool $ignoreErrors = true, string $comment = '') { return sprintf('', $uri); } @@ -64,9 +64,8 @@ class Ssi extends AbstractSurrogate // we don't use a proper XML parser here as we can have SSI tags in a plain text response $content = $response->getContent(); - + $boundary = self::generateBodyEvalBoundary(); $chunks = preg_split('##', $content, -1, \PREG_SPLIT_DELIM_CAPTURE); - $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); $i = 1; while (isset($chunks[$i])) { @@ -80,14 +79,10 @@ class Ssi extends AbstractSurrogate throw new \RuntimeException('Unable to process an SSI tag without a "virtual" attribute.'); } - $chunks[$i] = sprintf('surrogate->handle($this, %s, \'\', false) ?>'."\n", - var_export($options['virtual'], true) - ); - ++$i; - $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); - ++$i; + $chunks[$i] = $boundary.$options['virtual']."\n\n\n"; + $i += 2; } - $content = implode('', $chunks); + $content = $boundary.implode('', $chunks).$boundary; $response->setContent($content); $response->headers->set('X-Body-Eval', 'SSI'); diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index c7773913..f4810b2a 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -29,17 +29,28 @@ class Store implements StoreInterface private $keyCache; /** @var array */ private $locks = []; + private $options; /** + * Constructor. + * + * The available options are: + * + * * private_headers Set of response headers that should not be stored + * when a response is cached. (default: Set-Cookie) + * * @throws \RuntimeException */ - public function __construct(string $root) + public function __construct(string $root, array $options = []) { $this->root = $root; if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); + $this->options = array_merge([ + 'private_headers' => ['Set-Cookie'], + ], $options); } /** @@ -186,7 +197,7 @@ class Store implements StoreInterface if ($this->getPath($digest) !== $response->headers->get('X-Body-File')) { throw new \RuntimeException('X-Body-File and X-Content-Digest do not match.'); } - // Everything seems ok, omit writing content to disk + // Everything seems ok, omit writing content to disk } else { $digest = $this->generateContentDigest($response); $response->headers->set('X-Content-Digest', $digest); @@ -216,6 +227,10 @@ class Store implements StoreInterface $headers = $this->persistResponse($response); unset($headers['age']); + foreach ($this->options['private_headers'] as $h) { + unset($headers[strtolower($h)]); + } + array_unshift($entries, [$storedEnv, $headers]); if (!$this->save($key, serialize($entries))) { @@ -460,15 +475,25 @@ class Store implements StoreInterface /** * Restores a Response from the HTTP headers and body. */ - private function restoreResponse(array $headers, string $path = null): Response + private function restoreResponse(array $headers, ?string $path = null): ?Response { $status = $headers['X-Status'][0]; unset($headers['X-Status']); + $content = null; if (null !== $path) { $headers['X-Body-File'] = [$path]; + unset($headers['x-body-file']); + + if ($headers['X-Body-Eval'] ?? $headers['x-body-eval'] ?? false) { + $content = file_get_contents($path); + \assert(HttpCache::BODY_EVAL_BOUNDARY_LENGTH === 24); + if (48 > \strlen($content) || substr($content, -24) !== substr($content, 0, 24)) { + return null; + } + } } - return new Response($path, $status, $headers); + return new Response($content, $status, $headers); } } diff --git a/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php b/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php index 3f3c74a9..12ed0552 100644 --- a/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php +++ b/vendor/symfony/http-kernel/HttpCache/SurrogateInterface.php @@ -59,12 +59,12 @@ interface SurrogateInterface /** * Renders a Surrogate tag. * - * @param string $alt An alternate URI - * @param string $comment A comment to add as an esi:include tag + * @param string|null $alt An alternate URI + * @param string $comment A comment to add as an esi:include tag * * @return string */ - public function renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = ''); + public function renderIncludeTag(string $uri, ?string $alt = null, bool $ignoreErrors = true, string $comment = ''); /** * Replaces a Response Surrogate tags with the included resource content. diff --git a/vendor/symfony/http-kernel/HttpClientKernel.php b/vendor/symfony/http-kernel/HttpClientKernel.php index 58ca82e5..2b4620bb 100644 --- a/vendor/symfony/http-kernel/HttpClientKernel.php +++ b/vendor/symfony/http-kernel/HttpClientKernel.php @@ -33,7 +33,7 @@ final class HttpClientKernel implements HttpKernelInterface { private $client; - public function __construct(HttpClientInterface $client = null) + public function __construct(?HttpClientInterface $client = null) { if (null === $client && !class_exists(HttpClient::class)) { throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__)); diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php index e10e6833..f4b4b8ff 100644 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/HttpKernel.php @@ -55,7 +55,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface protected $requestStack; private $argumentResolver; - public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null, ArgumentResolverInterface $argumentResolver = null) + public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, ?RequestStack $requestStack = null, ?ArgumentResolverInterface $argumentResolver = null) { $this->dispatcher = $dispatcher; $this->resolver = $resolver; @@ -70,6 +70,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface { $request->headers->set('X-Php-Ob-Level', (string) ob_get_level()); + $this->requestStack->push($request); try { return $this->handleRaw($request, $type); } catch (\Exception $e) { @@ -83,6 +84,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } return $this->handleThrowable($e, $request, $type); + } finally { + $this->requestStack->pop(); } } @@ -97,13 +100,23 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface /** * @internal */ - public function terminateWithException(\Throwable $exception, Request $request = null) + public function terminateWithException(\Throwable $exception, ?Request $request = null) { if (!$request = $request ?: $this->requestStack->getMainRequest()) { throw $exception; } - $response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST); + if ($pop = $request !== $this->requestStack->getMainRequest()) { + $this->requestStack->push($request); + } + + try { + $response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST); + } finally { + if ($pop) { + $this->requestStack->pop(); + } + } $response->sendHeaders(); $response->sendContent(); @@ -121,8 +134,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response { - $this->requestStack->push($request); - // request $event = new RequestEvent($this, $request, $type); $this->dispatcher->dispatch($event, KernelEvents::REQUEST); @@ -199,7 +210,6 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface private function finishRequest(Request $request, int $type) { $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); - $this->requestStack->pop(); } /** diff --git a/vendor/symfony/http-kernel/HttpKernelBrowser.php b/vendor/symfony/http-kernel/HttpKernelBrowser.php index 643134f1..5c6506cc 100644 --- a/vendor/symfony/http-kernel/HttpKernelBrowser.php +++ b/vendor/symfony/http-kernel/HttpKernelBrowser.php @@ -36,7 +36,7 @@ class HttpKernelBrowser extends AbstractBrowser /** * @param array $server The server parameters (equivalent of $_SERVER) */ - public function __construct(HttpKernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) + public function __construct(HttpKernelInterface $kernel, array $server = [], ?History $history = null, ?CookieJar $cookieJar = null) { // These class properties must be set before calling the parent constructor, as it may depend on it. $this->kernel = $kernel; diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index 578d976f..d4fe96b6 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -78,11 +78,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static $freshCache = []; - public const VERSION = '5.4.8'; - public const VERSION_ID = 50408; + public const VERSION = '5.4.39'; + public const VERSION_ID = 50439; public const MAJOR_VERSION = 5; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 8; + public const RELEASE_VERSION = 39; public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2024'; @@ -404,9 +404,9 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl /** * Gets the container class. * - * @throws \InvalidArgumentException If the generated classname is invalid - * * @return string + * + * @throws \InvalidArgumentException If the generated classname is invalid */ protected function getContainerClass() { @@ -467,7 +467,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl try { is_dir($buildDir) ?: mkdir($buildDir, 0777, true); - if ($lock = fopen($cachePath.'.lock', 'w')) { + if ($lock = fopen($cachePath.'.lock', 'w+')) { if (!flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock) && !flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) { fclose($lock); $lock = null; @@ -778,7 +778,9 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $this->startTime = microtime(true); } if ($this->debug && !isset($_ENV['SHELL_VERBOSITY']) && !isset($_SERVER['SHELL_VERBOSITY'])) { - putenv('SHELL_VERBOSITY=3'); + if (\function_exists('putenv')) { + putenv('SHELL_VERBOSITY=3'); + } $_ENV['SHELL_VERBOSITY'] = 3; $_SERVER['SHELL_VERBOSITY'] = 3; } diff --git a/vendor/symfony/http-kernel/LICENSE b/vendor/symfony/http-kernel/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/http-kernel/LICENSE +++ b/vendor/symfony/http-kernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php b/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php index 19ff0db1..d5167fcc 100644 --- a/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php +++ b/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php @@ -29,14 +29,14 @@ interface DebugLoggerInterface * * @return array */ - public function getLogs(Request $request = null); + public function getLogs(?Request $request = null); /** * Returns the number of errors. * * @return int */ - public function countErrors(Request $request = null); + public function countErrors(?Request $request = null); /** * Removes all log records. diff --git a/vendor/symfony/http-kernel/Log/Logger.php b/vendor/symfony/http-kernel/Log/Logger.php index 378fbd53..a37c0cf1 100644 --- a/vendor/symfony/http-kernel/Log/Logger.php +++ b/vendor/symfony/http-kernel/Log/Logger.php @@ -42,17 +42,21 @@ class Logger extends AbstractLogger /** * @param string|resource|null $output */ - public function __construct(string $minLevel = null, $output = null, callable $formatter = null) + public function __construct(?string $minLevel = null, $output = null, ?callable $formatter = null) { if (null === $minLevel) { $minLevel = null === $output || 'php://stdout' === $output || 'php://stderr' === $output ? LogLevel::ERROR : LogLevel::WARNING; if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { switch ((int) ($_ENV['SHELL_VERBOSITY'] ?? $_SERVER['SHELL_VERBOSITY'])) { - case -1: $minLevel = LogLevel::ERROR; break; - case 1: $minLevel = LogLevel::NOTICE; break; - case 2: $minLevel = LogLevel::INFO; break; - case 3: $minLevel = LogLevel::DEBUG; break; + case -1: $minLevel = LogLevel::ERROR; + break; + case 1: $minLevel = LogLevel::NOTICE; + break; + case 2: $minLevel = LogLevel::INFO; + break; + case 3: $minLevel = LogLevel::DEBUG; + break; } } } @@ -85,7 +89,7 @@ class Logger extends AbstractLogger $formatter = $this->formatter; if ($this->handle) { - @fwrite($this->handle, $formatter($level, $message, $context)); + @fwrite($this->handle, $formatter($level, $message, $context).\PHP_EOL); } else { error_log($formatter($level, $message, $context, false)); } @@ -96,7 +100,7 @@ class Logger extends AbstractLogger if (str_contains($message, '{')) { $replacements = []; foreach ($context as $key => $val) { - if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { + if (null === $val || \is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; } elseif ($val instanceof \DateTimeInterface) { $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); @@ -110,7 +114,7 @@ class Logger extends AbstractLogger $message = strtr($message, $replacements); } - $log = sprintf('[%s] %s', $level, $message).\PHP_EOL; + $log = sprintf('[%s] %s', $level, $message); if ($prefixDate) { $log = date(\DateTime::RFC3339).' '.$log; } diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php index 3e7b1bd8..6fa24f11 100644 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php @@ -47,7 +47,7 @@ class FileProfilerStorage implements ProfilerStorageInterface /** * {@inheritdoc} */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null, string $statusCode = null): array + public function find(?string $ip, ?string $url, ?int $limit, ?string $method, ?int $start = null, ?int $end = null, ?string $statusCode = null): array { $file = $this->getIndexFilename(); @@ -61,6 +61,12 @@ class FileProfilerStorage implements ProfilerStorageInterface $result = []; while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { $values = str_getcsv($line); + + if (7 !== \count($values)) { + // skip invalid lines + continue; + } + [$csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values; $csvTime = (int) $csvTime; @@ -115,19 +121,7 @@ class FileProfilerStorage implements ProfilerStorageInterface */ public function read(string $token): ?Profile { - if (!$token || !file_exists($file = $this->getFilename($token))) { - return null; - } - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } - - if (!$data = unserialize(file_get_contents($file))) { - return null; - } - - return $this->createProfileFromData($token, $data); + return $this->doRead($token); } /** @@ -169,14 +163,13 @@ class FileProfilerStorage implements ProfilerStorageInterface 'status_code' => $profile->getStatusCode(), ]; - $context = stream_context_create(); + $data = serialize($data); - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - stream_context_set_option($context, 'zlib', 'level', 3); + if (\function_exists('gzencode')) { + $data = gzencode($data, 3); } - if (false === file_put_contents($file, serialize($data), 0, $context)) { + if (false === file_put_contents($file, $data, \LOCK_EX)) { return false; } @@ -272,7 +265,7 @@ class FileProfilerStorage implements ProfilerStorageInterface return '' === $line ? null : $line; } - protected function createProfileFromData(string $token, array $data, Profile $parent = null) + protected function createProfileFromData(string $token, array $data, ?Profile $parent = null) { $profile = new Profile($token); $profile->setIp($data['ip']); @@ -291,21 +284,34 @@ class FileProfilerStorage implements ProfilerStorageInterface } foreach ($data['children'] as $token) { - if (!$token || !file_exists($file = $this->getFilename($token))) { - continue; + if (null !== $childProfile = $this->doRead($token, $profile)) { + $profile->addChild($childProfile); } - - if (\function_exists('gzcompress')) { - $file = 'compress.zlib://'.$file; - } - - if (!$childData = unserialize(file_get_contents($file))) { - continue; - } - - $profile->addChild($this->createProfileFromData($token, $childData, $profile)); } return $profile; } + + private function doRead($token, ?Profile $profile = null): ?Profile + { + if (!$token || !file_exists($file = $this->getFilename($token))) { + return null; + } + + $h = fopen($file, 'r'); + flock($h, \LOCK_SH); + $data = stream_get_contents($h); + flock($h, \LOCK_UN); + fclose($h); + + if (\function_exists('gzdecode')) { + $data = @gzdecode($data) ?: $data; + } + + if (!$data = unserialize($data)) { + return null; + } + + return $this->createProfileFromData($token, $data, $profile); + } } diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php index 25e126f7..412a8592 100644 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ b/vendor/symfony/http-kernel/Profiler/Profiler.php @@ -37,7 +37,7 @@ class Profiler implements ResetInterface private $initiallyEnabled = true; private $enabled = true; - public function __construct(ProfilerStorageInterface $storage, LoggerInterface $logger = null, bool $enable = true) + public function __construct(ProfilerStorageInterface $storage, ?LoggerInterface $logger = null, bool $enable = true) { $this->storage = $storage; $this->logger = $logger; @@ -116,7 +116,7 @@ class Profiler implements ResetInterface /** * Finds profiler tokens for the given criteria. * - * @param string|null $limit The maximum number of tokens to return + * @param int|null $limit The maximum number of tokens to return * @param string|null $start The start date to search from * @param string|null $end The end date to search to * @@ -124,7 +124,7 @@ class Profiler implements ResetInterface * * @see https://php.net/datetime.formats for the supported date/time formats */ - public function find(?string $ip, ?string $url, ?string $limit, ?string $method, ?string $start, ?string $end, string $statusCode = null) + public function find(?string $ip, ?string $url, ?int $limit, ?string $method, ?string $start, ?string $end, ?string $statusCode = null) { return $this->storage->find($ip, $url, $limit, $method, $this->getTimestamp($start), $this->getTimestamp($end), $statusCode); } @@ -134,7 +134,7 @@ class Profiler implements ResetInterface * * @return Profile|null */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (false === $this->enabled) { return null; diff --git a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php b/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php index 95d72f46..6b23c1a2 100644 --- a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php +++ b/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php @@ -33,7 +33,7 @@ interface ProfilerStorageInterface * @param int|null $start The start date to search from * @param int|null $end The end date to search to */ - public function find(?string $ip, ?string $url, ?int $limit, ?string $method, int $start = null, int $end = null): array; + public function find(?string $ip, ?string $url, ?int $limit, ?string $method, ?int $start = null, ?int $end = null): array; /** * Reads data associated with the given token. diff --git a/vendor/symfony/http-kernel/composer.json b/vendor/symfony/http-kernel/composer.json index 09682db4..67d5ad4b 100644 --- a/vendor/symfony/http-kernel/composer.json +++ b/vendor/symfony/http-kernel/composer.json @@ -20,7 +20,7 @@ "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^4.4|^5.0|^6.0", "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", + "symfony/http-foundation": "^5.4.21|^6.2.7", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", @@ -41,6 +41,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "psr/cache": "^1.0|^2.0|^3.0", "twig/twig": "^2.13|^3.0.4" }, diff --git a/vendor/symfony/mime/CharacterStream.php b/vendor/symfony/mime/CharacterStream.php index 9d0a9c66..238debde 100644 --- a/vendor/symfony/mime/CharacterStream.php +++ b/vendor/symfony/mime/CharacterStream.php @@ -81,17 +81,17 @@ final class CharacterStream $this->fixedWidth = 2; break; - // 32 bits + // 32 bits case 'ucs4': case 'ucs-4': case 'utf32': case 'utf-32': $this->fixedWidth = 4; - break; + break; - // 7-8 bit charsets: (us-)?ascii, (iso|iec)-?8859-?[0-9]+, windows-?125[0-9], cp-?[0-9]+, ansi, macintosh, + // 7-8 bit charsets: (us-)?ascii, (iso|iec)-?8859-?[0-9]+, windows-?125[0-9], cp-?[0-9]+, ansi, macintosh, // koi-?7, koi-?8-?.+, mik, (cork|t1), v?iscii - // and fallback + // and fallback default: $this->fixedWidth = 1; } diff --git a/vendor/symfony/mime/Crypto/SMimeEncrypter.php b/vendor/symfony/mime/Crypto/SMimeEncrypter.php index 9081860d..e92b37b1 100644 --- a/vendor/symfony/mime/Crypto/SMimeEncrypter.php +++ b/vendor/symfony/mime/Crypto/SMimeEncrypter.php @@ -26,7 +26,7 @@ final class SMimeEncrypter extends SMime * @param string|string[] $certificate The path (or array of paths) of the file(s) containing the X.509 certificate(s) * @param int|null $cipher A set of algorithms used to encrypt the message. Must be one of these PHP constants: https://www.php.net/manual/en/openssl.ciphers.php */ - public function __construct($certificate, int $cipher = null) + public function __construct($certificate, ?int $cipher = null) { if (!\extension_loaded('openssl')) { throw new \LogicException('PHP extension "openssl" is required to use SMime.'); diff --git a/vendor/symfony/mime/Crypto/SMimeSigner.php b/vendor/symfony/mime/Crypto/SMimeSigner.php index 5b94a454..94c2bbd6 100644 --- a/vendor/symfony/mime/Crypto/SMimeSigner.php +++ b/vendor/symfony/mime/Crypto/SMimeSigner.php @@ -31,7 +31,7 @@ final class SMimeSigner extends SMime * @param string|null $extraCerts The path of the file containing intermediate certificates (in PEM format) needed by the signing certificate * @param int|null $signOptions Bitwise operator options for openssl_pkcs7_sign() (@see https://secure.php.net/manual/en/openssl.pkcs7.flags.php) */ - public function __construct(string $certificate, string $privateKey, string $privateKeyPassphrase = null, string $extraCerts = null, int $signOptions = null) + public function __construct(string $certificate, string $privateKey, ?string $privateKeyPassphrase = null, ?string $extraCerts = null, ?int $signOptions = null) { if (!\extension_loaded('openssl')) { throw new \LogicException('PHP extension "openssl" is required to use SMime.'); diff --git a/vendor/symfony/mime/Email.php b/vendor/symfony/mime/Email.php index 44efe7b3..5365294a 100644 --- a/vendor/symfony/mime/Email.php +++ b/vendor/symfony/mime/Email.php @@ -43,6 +43,10 @@ class Email extends Message private $html; private $htmlCharset; private $attachments = []; + /** + * @var AbstractPart|null + */ + private $cachedBody; // Used to avoid wrong body hash in DKIM signatures with multiple parts (e.g. HTML + TEXT) due to multiple boundaries. /** * @return $this @@ -117,6 +121,10 @@ class Email extends Message */ public function from(...$addresses) { + if (!$addresses) { + throw new LogicException('"from()" must be called with at least one address.'); + } + return $this->setListAddressHeaderBody('From', $addresses); } @@ -272,12 +280,17 @@ class Email extends Message } /** - * @param resource|string $body + * @param resource|string|null $body * * @return $this */ public function text($body, string $charset = 'utf-8') { + if (null !== $body && !\is_string($body) && !\is_resource($body)) { + throw new \TypeError(sprintf('The body must be a string, a resource or null (got "%s").', get_debug_type($body))); + } + + $this->cachedBody = null; $this->text = $body; $this->textCharset = $charset; @@ -304,6 +317,11 @@ class Email extends Message */ public function html($body, string $charset = 'utf-8') { + if (null !== $body && !\is_string($body) && !\is_resource($body)) { + throw new \TypeError(sprintf('The body must be a string, a resource or null (got "%s").', get_debug_type($body))); + } + + $this->cachedBody = null; $this->html = $body; $this->htmlCharset = $charset; @@ -328,8 +346,13 @@ class Email extends Message * * @return $this */ - public function attach($body, string $name = null, string $contentType = null) + public function attach($body, ?string $name = null, ?string $contentType = null) { + if (!\is_string($body) && !\is_resource($body)) { + throw new \TypeError(sprintf('The body must be a string or a resource (got "%s").', get_debug_type($body))); + } + + $this->cachedBody = null; $this->attachments[] = ['body' => $body, 'name' => $name, 'content-type' => $contentType, 'inline' => false]; return $this; @@ -338,8 +361,9 @@ class Email extends Message /** * @return $this */ - public function attachFromPath(string $path, string $name = null, string $contentType = null) + public function attachFromPath(string $path, ?string $name = null, ?string $contentType = null) { + $this->cachedBody = null; $this->attachments[] = ['path' => $path, 'name' => $name, 'content-type' => $contentType, 'inline' => false]; return $this; @@ -350,8 +374,13 @@ class Email extends Message * * @return $this */ - public function embed($body, string $name = null, string $contentType = null) + public function embed($body, ?string $name = null, ?string $contentType = null) { + if (!\is_string($body) && !\is_resource($body)) { + throw new \TypeError(sprintf('The body must be a string or a resource (got "%s").', get_debug_type($body))); + } + + $this->cachedBody = null; $this->attachments[] = ['body' => $body, 'name' => $name, 'content-type' => $contentType, 'inline' => true]; return $this; @@ -360,8 +389,9 @@ class Email extends Message /** * @return $this */ - public function embedFromPath(string $path, string $name = null, string $contentType = null) + public function embedFromPath(string $path, ?string $name = null, ?string $contentType = null) { + $this->cachedBody = null; $this->attachments[] = ['path' => $path, 'name' => $name, 'content-type' => $contentType, 'inline' => true]; return $this; @@ -372,6 +402,7 @@ class Email extends Message */ public function attachPart(DataPart $part) { + $this->cachedBody = null; $this->attachments[] = ['part' => $part]; return $this; @@ -430,9 +461,13 @@ class Email extends Message */ private function generateBody(): AbstractPart { + if (null !== $this->cachedBody) { + return $this->cachedBody; + } + $this->ensureValidity(); - [$htmlPart, $attachmentParts, $inlineParts] = $this->prepareParts(); + [$htmlPart, $otherParts, $relatedParts] = $this->prepareParts(); $part = null === $this->text ? null : new TextPart($this->text, $this->textCharset); if (null !== $htmlPart) { @@ -443,19 +478,19 @@ class Email extends Message } } - if ($inlineParts) { - $part = new RelatedPart($part, ...$inlineParts); + if ($relatedParts) { + $part = new RelatedPart($part, ...$relatedParts); } - if ($attachmentParts) { + if ($otherParts) { if ($part) { - $part = new MixedPart($part, ...$attachmentParts); + $part = new MixedPart($part, ...$otherParts); } else { - $part = new MixedPart(...$attachmentParts); + $part = new MixedPart(...$otherParts); } } - return $part; + return $this->cachedBody = $part; } private function prepareParts(): ?array @@ -463,38 +498,52 @@ class Email extends Message $names = []; $htmlPart = null; $html = $this->html; - if (null !== $this->html) { + if (null !== $html) { $htmlPart = new TextPart($html, $this->htmlCharset, 'html'); $html = $htmlPart->getBody(); - preg_match_all('(]*src\s*=\s*(?:([\'"])cid:([^"]+)\\1|cid:([^>\s]+)))i', $html, $names); + preg_match_all('(]*src\s*=\s*(?:([\'"])cid:(.+?)\\1|cid:([^>\s]+)))i', $html, $names); $names = array_filter(array_unique(array_merge($names[2], $names[3]))); } - $attachmentParts = $inlineParts = []; + // usage of reflection is a temporary workaround for missing getters that will be added in 6.2 + $nameRef = new \ReflectionProperty(TextPart::class, 'name'); + $nameRef->setAccessible(true); + $otherParts = $relatedParts = []; foreach ($this->attachments as $attachment) { + $part = $this->createDataPart($attachment); + if (isset($attachment['part'])) { + $attachment['name'] = $nameRef->getValue($part); + } + + $related = false; foreach ($names as $name) { - if (isset($attachment['part'])) { - continue; - } if ($name !== $attachment['name']) { continue; } - if (isset($inlineParts[$name])) { + if (isset($relatedParts[$name])) { continue 2; } - $attachment['inline'] = true; - $inlineParts[$name] = $part = $this->createDataPart($attachment); - $html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html); + $part->setDisposition('inline'); + $html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html, $count); + if ($count) { + $related = true; + } $part->setName($part->getContentId()); - continue 2; + + break; + } + + if ($related) { + $relatedParts[$attachment['name']] = $part; + } else { + $otherParts[] = $part; } - $attachmentParts[] = $this->createDataPart($attachment); } if (null !== $htmlPart) { $htmlPart = new TextPart($html, $this->htmlCharset, 'html'); } - return [$htmlPart, $attachmentParts, array_values($inlineParts)]; + return [$htmlPart, $otherParts, array_values($relatedParts)]; } private function createDataPart(array $attachment): DataPart diff --git a/vendor/symfony/mime/FileinfoMimeTypeGuesser.php b/vendor/symfony/mime/FileinfoMimeTypeGuesser.php index c6c7559a..1208976b 100644 --- a/vendor/symfony/mime/FileinfoMimeTypeGuesser.php +++ b/vendor/symfony/mime/FileinfoMimeTypeGuesser.php @@ -24,11 +24,11 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface private $magicFile; /** - * @param string $magicFile A magic file to use with the finfo instance + * @param string|null $magicFile A magic file to use with the finfo instance * * @see http://www.php.net/manual/en/function.finfo-open.php */ - public function __construct(string $magicFile = null) + public function __construct(?string $magicFile = null) { $this->magicFile = $magicFile; } diff --git a/vendor/symfony/mime/Header/AbstractHeader.php b/vendor/symfony/mime/Header/AbstractHeader.php index b82eb53e..d61df570 100644 --- a/vendor/symfony/mime/Header/AbstractHeader.php +++ b/vendor/symfony/mime/Header/AbstractHeader.php @@ -109,6 +109,11 @@ abstract class AbstractHeader implements HeaderInterface } $phraseStr = $this->encodeWords($header, $string, $usedLength); } + } elseif (str_contains($phraseStr, '(')) { + foreach (['\\', '"'] as $char) { + $phraseStr = str_replace($char, '\\'.$char, $phraseStr); + } + $phraseStr = '"'.$phraseStr.'"'; } return $phraseStr; @@ -195,7 +200,7 @@ abstract class AbstractHeader implements HeaderInterface $encodingWrapperLength = \strlen('=?'.$charsetDecl.'?'.self::$encoder->getName().'??='); if ($firstLineOffset >= 75) { - //Does this logic need to be here? + // Does this logic need to be here? $firstLineOffset = 0; } @@ -226,7 +231,7 @@ abstract class AbstractHeader implements HeaderInterface /** * Generate a list of all tokens in the final header. */ - protected function toTokens(string $string = null): array + protected function toTokens(?string $string = null): array { if (null === $string) { $string = $this->getBodyAsString(); diff --git a/vendor/symfony/mime/Header/Headers.php b/vendor/symfony/mime/Header/Headers.php index 8db91252..b1ebf9a2 100644 --- a/vendor/symfony/mime/Header/Headers.php +++ b/vendor/symfony/mime/Header/Headers.php @@ -190,7 +190,7 @@ final class Headers return array_shift($values); } - public function all(string $name = null): iterable + public function all(?string $name = null): iterable { if (null === $name) { foreach ($this->headers as $name => $collection) { diff --git a/vendor/symfony/mime/Header/MailboxListHeader.php b/vendor/symfony/mime/Header/MailboxListHeader.php index 1d00fdb1..ee2a26cf 100644 --- a/vendor/symfony/mime/Header/MailboxListHeader.php +++ b/vendor/symfony/mime/Header/MailboxListHeader.php @@ -44,9 +44,9 @@ final class MailboxListHeader extends AbstractHeader } /** - * @throws RfcComplianceException - * * @return Address[] + * + * @throws RfcComplianceException */ public function getBody(): array { @@ -99,9 +99,9 @@ final class MailboxListHeader extends AbstractHeader /** * Gets the full mailbox list of this Header as an array of valid RFC 2822 strings. * - * @throws RfcComplianceException - * * @return string[] + * + * @throws RfcComplianceException */ public function getAddressStrings(): array { diff --git a/vendor/symfony/mime/Header/ParameterizedHeader.php b/vendor/symfony/mime/Header/ParameterizedHeader.php index e5d4238b..22f46a8f 100644 --- a/vendor/symfony/mime/Header/ParameterizedHeader.php +++ b/vendor/symfony/mime/Header/ParameterizedHeader.php @@ -85,7 +85,7 @@ final class ParameterizedHeader extends UnstructuredHeader * This doesn't need to be overridden in theory, but it is for implementation * reasons to prevent potential breakage of attributes. */ - protected function toTokens(string $string = null): array + protected function toTokens(?string $string = null): array { $tokens = parent::toTokens(parent::getBodyAsString()); diff --git a/vendor/symfony/mime/LICENSE b/vendor/symfony/mime/LICENSE index 298be141..4dd83ce0 100644 --- a/vendor/symfony/mime/LICENSE +++ b/vendor/symfony/mime/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010-2022 Fabien Potencier +Copyright (c) 2010-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/mime/Message.php b/vendor/symfony/mime/Message.php index 651ffd45..639b26b5 100644 --- a/vendor/symfony/mime/Message.php +++ b/vendor/symfony/mime/Message.php @@ -24,7 +24,7 @@ class Message extends RawMessage private $headers; private $body; - public function __construct(Headers $headers = null, AbstractPart $body = null) + public function __construct(?Headers $headers = null, ?AbstractPart $body = null) { $this->headers = $headers ? clone $headers : new Headers(); $this->body = $body; @@ -42,7 +42,7 @@ class Message extends RawMessage /** * @return $this */ - public function setBody(AbstractPart $body = null) + public function setBody(?AbstractPart $body = null) { $this->body = $body; @@ -140,7 +140,10 @@ class Message extends RawMessage if ($this->headers->has('Sender')) { $sender = $this->headers->get('Sender')->getAddress(); } elseif ($this->headers->has('From')) { - $sender = $this->headers->get('From')->getAddresses()[0]; + if (!$froms = $this->headers->get('From')->getAddresses()) { + throw new LogicException('A "From" header must have at least one email address.'); + } + $sender = $froms[0]; } else { throw new LogicException('An email must have a "From" or a "Sender" header.'); } diff --git a/vendor/symfony/mime/MessageConverter.php b/vendor/symfony/mime/MessageConverter.php index 788a5ff9..0539eac8 100644 --- a/vendor/symfony/mime/MessageConverter.php +++ b/vendor/symfony/mime/MessageConverter.php @@ -83,7 +83,7 @@ final class MessageConverter 2 === \count($parts) && $parts[0] instanceof TextPart && 'text' === $parts[0]->getMediaType() && 'plain' === $parts[0]->getMediaSubtype() && $parts[1] instanceof TextPart && 'text' === $parts[1]->getMediaType() && 'html' === $parts[1]->getMediaSubtype() - ) { + ) { return (new Email(clone $message->getHeaders())) ->text($parts[0]->getBody(), $parts[0]->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8') ->html($parts[1]->getBody(), $parts[1]->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8') diff --git a/vendor/symfony/mime/Part/DataPart.php b/vendor/symfony/mime/Part/DataPart.php index 75bcb64a..3219df40 100644 --- a/vendor/symfony/mime/Part/DataPart.php +++ b/vendor/symfony/mime/Part/DataPart.php @@ -33,7 +33,7 @@ class DataPart extends TextPart /** * @param resource|string $body */ - public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null) + public function __construct($body, ?string $filename = null, ?string $contentType = null, ?string $encoding = null) { unset($this->_parent); @@ -51,7 +51,7 @@ class DataPart extends TextPart $this->setDisposition('attachment'); } - public static function fromPath(string $path, string $name = null, string $contentType = null): self + public static function fromPath(string $path, ?string $name = null, ?string $contentType = null): self { if (null === $contentType) { $ext = strtolower(substr($path, strrpos($path, '.') + 1)); @@ -61,13 +61,20 @@ class DataPart extends TextPart $contentType = self::$mimeTypes->getMimeTypes($ext)[0] ?? 'application/octet-stream'; } - if (false === is_readable($path)) { + if ((is_file($path) && !is_readable($path)) || is_dir($path)) { throw new InvalidArgumentException(sprintf('Path "%s" is not readable.', $path)); } if (false === $handle = @fopen($path, 'r', false)) { throw new InvalidArgumentException(sprintf('Unable to open path "%s".', $path)); } + + if (!is_file($path)) { + $cache = fopen('php://temp', 'r+'); + stream_copy_to_stream($handle, $cache); + $handle = $cache; + } + $p = new self($handle, $name ?: basename($path), $contentType); $p->handle = $handle; diff --git a/vendor/symfony/mime/Part/MessagePart.php b/vendor/symfony/mime/Part/MessagePart.php index 1b5c23e2..00129b47 100644 --- a/vendor/symfony/mime/Part/MessagePart.php +++ b/vendor/symfony/mime/Part/MessagePart.php @@ -59,4 +59,17 @@ class MessagePart extends DataPart { return $this->message->toIterable(); } + + /** + * @return array + */ + public function __sleep() + { + return ['message']; + } + + public function __wakeup() + { + $this->__construct($this->message); + } } diff --git a/vendor/symfony/mime/Part/Multipart/FormDataPart.php b/vendor/symfony/mime/Part/Multipart/FormDataPart.php index ff6df818..e3c9afc0 100644 --- a/vendor/symfony/mime/Part/Multipart/FormDataPart.php +++ b/vendor/symfony/mime/Part/Multipart/FormDataPart.php @@ -58,7 +58,7 @@ final class FormDataPart extends AbstractMultipartPart $values = []; $prepare = function ($item, $key, $root = null) use (&$values, &$prepare) { - if (\is_int($key) && \is_array($item)) { + if (null === $root && \is_int($key) && \is_array($item)) { if (1 !== \count($item)) { throw new InvalidArgumentException(sprintf('Form field values with integer keys can only have one array element, the key being the field name and the value being the field value, %d provided.', \count($item))); } diff --git a/vendor/symfony/mime/Part/TextPart.php b/vendor/symfony/mime/Part/TextPart.php index 4afb6560..fe9ca022 100644 --- a/vendor/symfony/mime/Part/TextPart.php +++ b/vendor/symfony/mime/Part/TextPart.php @@ -42,7 +42,7 @@ class TextPart extends AbstractPart /** * @param resource|string $body */ - public function __construct($body, ?string $charset = 'utf-8', string $subtype = 'plain', string $encoding = null) + public function __construct($body, ?string $charset = 'utf-8', string $subtype = 'plain', ?string $encoding = null) { unset($this->_headers); @@ -197,6 +197,7 @@ class TextPart extends AbstractPart // convert resources to strings for serialization if (null !== $this->seekable) { $this->body = $this->getBody(); + $this->seekable = null; } $this->_headers = $this->getHeaders(); diff --git a/vendor/symfony/mime/RawMessage.php b/vendor/symfony/mime/RawMessage.php index d2a311da..ace19601 100644 --- a/vendor/symfony/mime/RawMessage.php +++ b/vendor/symfony/mime/RawMessage.php @@ -18,6 +18,9 @@ use Symfony\Component\Mime\Exception\LogicException; */ class RawMessage implements \Serializable { + /** + * @var iterable|string + */ private $message; /** diff --git a/vendor/symfony/mime/Resources/bin/update_mime_types.php b/vendor/symfony/mime/Resources/bin/update_mime_types.php index 9f13bf3e..5586f097 100644 --- a/vendor/symfony/mime/Resources/bin/update_mime_types.php +++ b/vendor/symfony/mime/Resources/bin/update_mime_types.php @@ -9,6 +9,10 @@ * file that was distributed with this source code. */ +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + // load new map $data = json_decode(file_get_contents('https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.49.0/db.json'), true); $new = []; diff --git a/vendor/symfony/mime/Test/Constraint/EmailAttachmentCount.php b/vendor/symfony/mime/Test/Constraint/EmailAttachmentCount.php index c0adbe3a..3243ec60 100644 --- a/vendor/symfony/mime/Test/Constraint/EmailAttachmentCount.php +++ b/vendor/symfony/mime/Test/Constraint/EmailAttachmentCount.php @@ -20,7 +20,7 @@ final class EmailAttachmentCount extends Constraint private $expectedValue; private $transport; - public function __construct(int $expectedValue, string $transport = null) + public function __construct(int $expectedValue, ?string $transport = null) { $this->expectedValue = $expectedValue; $this->transport = $transport; diff --git a/vendor/symfony/mime/Test/Constraint/EmailHeaderSame.php b/vendor/symfony/mime/Test/Constraint/EmailHeaderSame.php index 74bdc63c..74b41218 100644 --- a/vendor/symfony/mime/Test/Constraint/EmailHeaderSame.php +++ b/vendor/symfony/mime/Test/Constraint/EmailHeaderSame.php @@ -55,12 +55,14 @@ final class EmailHeaderSame extends Constraint */ protected function failureDescription($message): string { - return sprintf('the Email %s (value is %s)', $this->toString(), $this->getHeaderValue($message)); + return sprintf('the Email %s (value is %s)', $this->toString(), $this->getHeaderValue($message) ?? 'null'); } - private function getHeaderValue($message): string + private function getHeaderValue($message): ?string { - $header = $message->getHeaders()->get($this->headerName); + if (null === $header = $message->getHeaders()->get($this->headerName)) { + return null; + } return $header instanceof UnstructuredHeader ? $header->getValue() : $header->getBodyAsString(); } diff --git a/vendor/symfony/mime/composer.json b/vendor/symfony/mime/composer.json index cd04969b..3bb60955 100644 --- a/vendor/symfony/mime/composer.json +++ b/vendor/symfony/mime/composer.json @@ -23,18 +23,20 @@ "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", + "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.4", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3" }, "conflict": { "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/mailer": "<4.4", + "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3" }, "autoload": { "psr-4": { "Symfony\\Component\\Mime\\": "" }, diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE index 3f853aaf..7536caea 100644 --- a/vendor/symfony/polyfill-ctype/LICENSE +++ b/vendor/symfony/polyfill-ctype/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-ctype/README.md b/vendor/symfony/polyfill-ctype/README.md index 8add1ab0..b144d03c 100644 --- a/vendor/symfony/polyfill-ctype/README.md +++ b/vendor/symfony/polyfill-ctype/README.md @@ -4,7 +4,7 @@ Symfony Polyfill / Ctype This component provides `ctype_*` functions to users who run php versions without the ctype extension. More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json index ccb8e570..b222fdab 100644 --- a/vendor/symfony/polyfill-ctype/composer.json +++ b/vendor/symfony/polyfill-ctype/composer.json @@ -30,9 +30,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-iconv/LICENSE b/vendor/symfony/polyfill-iconv/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-iconv/LICENSE +++ b/vendor/symfony/polyfill-iconv/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-iconv/README.md b/vendor/symfony/polyfill-iconv/README.md index b0c8984c..b089088b 100644 --- a/vendor/symfony/polyfill-iconv/README.md +++ b/vendor/symfony/polyfill-iconv/README.md @@ -6,7 +6,7 @@ This component provides a native PHP implementation of the (short of [`ob_iconv_handler`](https://php.net/ob-iconv-handler)). More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-iconv/composer.json b/vendor/symfony/polyfill-iconv/composer.json index a1bd3a0c..2044a166 100644 --- a/vendor/symfony/polyfill-iconv/composer.json +++ b/vendor/symfony/polyfill-iconv/composer.json @@ -30,9 +30,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-intl-grapheme/Grapheme.php b/vendor/symfony/polyfill-intl-grapheme/Grapheme.php index 6f7c0c78..5373f168 100644 --- a/vendor/symfony/polyfill-intl-grapheme/Grapheme.php +++ b/vendor/symfony/polyfill-intl-grapheme/Grapheme.php @@ -48,7 +48,7 @@ final class Grapheme $start = \strlen($s) + $start; } - if (!is_scalar($s)) { + if (!\is_scalar($s)) { $hasError = false; set_error_handler(function () use (&$hasError) { $hasError = true; }); $next = substr($s, $start); diff --git a/vendor/symfony/polyfill-intl-grapheme/LICENSE b/vendor/symfony/polyfill-intl-grapheme/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-intl-grapheme/LICENSE +++ b/vendor/symfony/polyfill-intl-grapheme/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-intl-grapheme/README.md b/vendor/symfony/polyfill-intl-grapheme/README.md index 77523ea2..f55d92c5 100644 --- a/vendor/symfony/polyfill-intl-grapheme/README.md +++ b/vendor/symfony/polyfill-intl-grapheme/README.md @@ -23,7 +23,7 @@ This component provides a partial, native PHP implementation of the - [`grapheme_substr`](https://php.net/grapheme_substr): Return part of a string More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-intl-grapheme/composer.json b/vendor/symfony/polyfill-intl-grapheme/composer.json index 02c98ee3..a20d3faa 100644 --- a/vendor/symfony/polyfill-intl-grapheme/composer.json +++ b/vendor/symfony/polyfill-intl-grapheme/composer.json @@ -27,9 +27,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-intl-idn/Idn.php b/vendor/symfony/polyfill-intl-idn/Idn.php index fee3026d..3dc06120 100644 --- a/vendor/symfony/polyfill-intl-idn/Idn.php +++ b/vendor/symfony/polyfill-intl-idn/Idn.php @@ -11,8 +11,6 @@ namespace Symfony\Polyfill\Intl\Idn; -use Exception; -use Normalizer; use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; @@ -167,7 +165,7 @@ final class Idn if (1 === preg_match('/[^\x00-\x7F]/', $label)) { try { $label = 'xn--'.self::punycodeEncode($label); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; } @@ -335,8 +333,8 @@ final class Idn $domain = self::mapCodePoints($domain, $options, $info); // Step 2. Normalize the domain name string to Unicode Normalization Form C. - if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { - $domain = Normalizer::normalize($domain, Normalizer::FORM_C); + if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) { + $domain = \Normalizer::normalize($domain, \Normalizer::FORM_C); } // Step 3. Break the string into labels at U+002E (.) FULL STOP. @@ -350,7 +348,7 @@ final class Idn if ('xn--' === substr($label, 0, 4)) { try { $label = self::punycodeDecode(substr($label, 4)); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; continue; @@ -496,7 +494,7 @@ final class Idn } // Step 1. The label must be in Unicode Normalization Form C. - if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { + if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) { $info->errors |= self::ERROR_INVALID_ACE_LABEL; } @@ -583,7 +581,7 @@ final class Idn for ($j = 0; $j < $b; ++$j) { if ($bytes[$j] > 0x7F) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $output[$out++] = $input[$j]; @@ -599,17 +597,17 @@ final class Idn for ($k = self::BASE; /* no condition */; $k += self::BASE) { if ($in >= $inputLength) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; if ($digit < 0) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } if ($digit > intdiv(self::MAX_INT - $i, $w)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $i += $digit * $w; @@ -629,7 +627,7 @@ final class Idn $baseMinusT = self::BASE - $t; if ($w > intdiv(self::MAX_INT, $baseMinusT)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $w *= $baseMinusT; @@ -639,7 +637,7 @@ final class Idn $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $n += intdiv($i, $outPlusOne); @@ -694,7 +692,7 @@ final class Idn } if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $delta += ($m - $n) * ($h + 1); @@ -702,7 +700,7 @@ final class Idn foreach ($iter as $codePoint) { if ($codePoint < $n && 0 === ++$delta) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } if ($codePoint === $n) { @@ -723,7 +721,7 @@ final class Idn $qMinusT = $q - $t; $baseMinusT = self::BASE - $t; - $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false); + $output .= self::encodeDigit($t + $qMinusT % $baseMinusT, false); ++$out; $q = intdiv($qMinusT, $baseMinusT); } diff --git a/vendor/symfony/polyfill-intl-idn/LICENSE b/vendor/symfony/polyfill-intl-idn/LICENSE index 03c5e257..fd0a0626 100644 --- a/vendor/symfony/polyfill-intl-idn/LICENSE +++ b/vendor/symfony/polyfill-intl-idn/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham +Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-intl-idn/README.md b/vendor/symfony/polyfill-intl-idn/README.md index 2e75f2e5..cae55170 100644 --- a/vendor/symfony/polyfill-intl-idn/README.md +++ b/vendor/symfony/polyfill-intl-idn/README.md @@ -4,7 +4,7 @@ Symfony Polyfill / Intl: Idn This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension. More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php index 5bb70e48..d285acd1 100644 --- a/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +++ b/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php index 5c1c51dd..3c6af0c1 100644 --- a/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +++ b/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/vendor/symfony/polyfill-intl-idn/composer.json b/vendor/symfony/polyfill-intl-idn/composer.json index c5a2a462..12f75bce 100644 --- a/vendor/symfony/polyfill-intl-idn/composer.json +++ b/vendor/symfony/polyfill-intl-idn/composer.json @@ -33,9 +33,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-intl-normalizer/LICENSE b/vendor/symfony/polyfill-intl-normalizer/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-intl-normalizer/LICENSE +++ b/vendor/symfony/polyfill-intl-normalizer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/vendor/symfony/polyfill-intl-normalizer/Normalizer.php index 4443c232..81704ab3 100644 --- a/vendor/symfony/polyfill-intl-normalizer/Normalizer.php +++ b/vendor/symfony/polyfill-intl-normalizer/Normalizer.php @@ -90,7 +90,7 @@ class Normalizer self::$cC = self::getData('combiningClass'); } - if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { + if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { mb_internal_encoding('8bit'); } diff --git a/vendor/symfony/polyfill-intl-normalizer/README.md b/vendor/symfony/polyfill-intl-normalizer/README.md index 15060c5f..b9b762e8 100644 --- a/vendor/symfony/polyfill-intl-normalizer/README.md +++ b/vendor/symfony/polyfill-intl-normalizer/README.md @@ -6,7 +6,7 @@ This component provides a fallback implementation for the by the [Intl](https://php.net/intl) extension. More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-intl-normalizer/composer.json b/vendor/symfony/polyfill-intl-normalizer/composer.json index 393edf70..1b93573a 100644 --- a/vendor/symfony/polyfill-intl-normalizer/composer.json +++ b/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -28,9 +28,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-mbstring/LICENSE +++ b/vendor/symfony/polyfill-mbstring/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php index b65c54a6..2e0b9694 100644 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -69,7 +69,7 @@ final class Mbstring { public const MB_CASE_FOLD = \PHP_INT_MAX; - private const CASE_FOLD = [ + private const SIMPLE_CASE_FOLD = [ ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], ]; @@ -80,7 +80,7 @@ final class Mbstring public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { - if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) { + if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) { $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); } else { $fromEncoding = self::getEncoding($fromEncoding); @@ -102,7 +102,7 @@ final class Mbstring $fromEncoding = 'Windows-1252'; } if ('UTF-8' !== $fromEncoding) { - $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); } return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); @@ -113,7 +113,7 @@ final class Mbstring $fromEncoding = 'UTF-8'; } - return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); } public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) @@ -130,7 +130,7 @@ final class Mbstring public static function mb_decode_mimeheader($s) { - return \iconv_mime_decode($s, 2, self::$internalEncoding); + return iconv_mime_decode($s, 2, self::$internalEncoding); } public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) @@ -140,7 +140,7 @@ final class Mbstring public static function mb_decode_numericentity($s, $convmap, $encoding = null) { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); return null; @@ -150,7 +150,7 @@ final class Mbstring return false; } - if (null !== $encoding && !is_scalar($encoding)) { + if (null !== $encoding && !\is_scalar($encoding)) { trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); return ''; // Instead of null (cf. mb_encode_numericentity). @@ -166,10 +166,10 @@ final class Mbstring if ('UTF-8' === $encoding) { $encoding = null; if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } $cnt = floor(\count($convmap) / 4) * 4; @@ -195,12 +195,12 @@ final class Mbstring return $s; } - return \iconv('UTF-8', $encoding.'//IGNORE', $s); + return iconv('UTF-8', $encoding.'//IGNORE', $s); } public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) { - if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); return null; @@ -210,13 +210,13 @@ final class Mbstring return false; } - if (null !== $encoding && !is_scalar($encoding)) { + if (null !== $encoding && !\is_scalar($encoding)) { trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); return null; // Instead of '' (cf. mb_decode_numericentity). } - if (null !== $is_hex && !is_scalar($is_hex)) { + if (null !== $is_hex && !\is_scalar($is_hex)) { trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); return null; @@ -232,10 +232,10 @@ final class Mbstring if ('UTF-8' === $encoding) { $encoding = null; if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; @@ -265,7 +265,7 @@ final class Mbstring return $result; } - return \iconv('UTF-8', $encoding.'//IGNORE', $result); + return iconv('UTF-8', $encoding.'//IGNORE', $result); } public static function mb_convert_case($s, $mode, $encoding = null) @@ -280,10 +280,10 @@ final class Mbstring if ('UTF-8' === $encoding) { $encoding = null; if (!preg_match('//u', $s)) { - $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } if (\MB_CASE_TITLE == $mode) { @@ -301,7 +301,11 @@ final class Mbstring $map = $upper; } else { if (self::MB_CASE_FOLD === $mode) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); + static $caseFolding = null; + if (null === $caseFolding) { + $caseFolding = self::getData('caseFolding'); + } + $s = strtr($s, $caseFolding); } static $lower = null; @@ -343,7 +347,7 @@ final class Mbstring return $s; } - return \iconv('UTF-8', $encoding.'//IGNORE', $s); + return iconv('UTF-8', $encoding.'//IGNORE', $s); } public static function mb_internal_encoding($encoding = null) @@ -354,7 +358,7 @@ final class Mbstring $normalizedEncoding = self::getEncoding($encoding); - if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { + if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) { self::$internalEncoding = $normalizedEncoding; return true; @@ -406,6 +410,12 @@ final class Mbstring public static function mb_check_encoding($var = null, $encoding = null) { + if (PHP_VERSION_ID < 70200 && \is_array($var)) { + trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); + + return null; + } + if (null === $encoding) { if (null === $var) { return false; @@ -413,7 +423,21 @@ final class Mbstring $encoding = self::$internalEncoding; } - return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); + if (!\is_array($var)) { + return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); + } + + foreach ($var as $key => $value) { + if (!self::mb_check_encoding($key, $encoding)) { + return false; + } + if (!self::mb_check_encoding($value, $encoding)) { + return false; + } + } + + return true; + } public static function mb_detect_encoding($str, $encodingList = null, $strict = false) @@ -488,7 +512,7 @@ final class Mbstring return \strlen($s); } - return @\iconv_strlen($s, $encoding); + return @iconv_strlen($s, $encoding); } public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) @@ -509,7 +533,7 @@ final class Mbstring return 0; } - return \iconv_strpos($haystack, $needle, $offset, $encoding); + return iconv_strpos($haystack, $needle, $offset, $encoding); } public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) @@ -533,7 +557,7 @@ final class Mbstring } $pos = '' !== $needle || 80000 > \PHP_VERSION_ID - ? \iconv_strrpos($haystack, $needle, $encoding) + ? iconv_strrpos($haystack, $needle, $encoding) : self::mb_strlen($haystack, $encoding); return false !== $pos ? $offset + $pos : false; @@ -541,7 +565,7 @@ final class Mbstring public static function mb_str_split($string, $split_length = 1, $encoding = null) { - if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); return null; @@ -550,6 +574,7 @@ final class Mbstring if (1 > $split_length = (int) $split_length) { if (80000 > \PHP_VERSION_ID) { trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); + return false; } @@ -568,7 +593,7 @@ final class Mbstring } $rx .= '.{'.$split_length.'})/us'; - return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); } $result = []; @@ -617,7 +642,7 @@ final class Mbstring } if ($start < 0) { - $start = \iconv_strlen($s, $encoding) + $start; + $start = iconv_strlen($s, $encoding) + $start; if ($start < 0) { $start = 0; } @@ -626,19 +651,21 @@ final class Mbstring if (null === $length) { $length = 2147483647; } elseif ($length < 0) { - $length = \iconv_strlen($s, $encoding) + $length - $start; + $length = iconv_strlen($s, $encoding) + $length - $start; if ($length < 0) { return ''; } } - return (string) \iconv_substr($s, $start, $length, $encoding); + return (string) iconv_substr($s, $start, $length, $encoding); } public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [ + self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), + self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding), + ]); return self::mb_strpos($haystack, $needle, $offset, $encoding); } @@ -657,7 +684,7 @@ final class Mbstring $pos = strrpos($haystack, $needle); } else { $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = \iconv_strrpos($haystack, $needle, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); } return self::getSubpart($pos, $part, $haystack, $encoding); @@ -673,8 +700,11 @@ final class Mbstring public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); + $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); + + $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); + $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); return self::mb_strrpos($haystack, $needle, $offset, $encoding); } @@ -736,12 +766,12 @@ final class Mbstring $encoding = self::getEncoding($encoding); if ('UTF-8' !== $encoding) { - $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); - return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); } public static function mb_substr_count($haystack, $needle, $encoding = null) @@ -797,6 +827,50 @@ final class Mbstring return $code; } + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string + { + if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { + throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); + } + + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } + + try { + $validEncoding = @self::mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + if (self::mb_strlen($pad_string, $encoding) <= 0) { + throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); + } + + $paddingRequired = $length - self::mb_strlen($string, $encoding); + + if ($paddingRequired < 1) { + return $string; + } + + switch ($pad_type) { + case \STR_PAD_LEFT: + return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; + case \STR_PAD_RIGHT: + return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); + default: + $leftPaddingLength = floor($paddingRequired / 2); + $rightPaddingLength = $paddingRequired - $leftPaddingLength; + + return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); + } + } + private static function getSubpart($pos, $part, $haystack, $encoding) { if (false === $pos) { diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md index 4efb599d..478b40da 100644 --- a/vendor/symfony/polyfill-mbstring/README.md +++ b/vendor/symfony/polyfill-mbstring/README.md @@ -5,7 +5,7 @@ This component provides a partial, native PHP implementation for the [Mbstring](https://php.net/mbstring) extension. More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php index 1fedd1f7..ecf1a035 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -132,6 +132,10 @@ if (!function_exists('mb_str_split')) { function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } } +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php index 82f5ac4d..2f9fb5b4 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -128,6 +128,10 @@ if (!function_exists('mb_str_split')) { function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } } +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index 1fa21ca1..bd99d4b9 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -30,9 +30,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-php72/LICENSE b/vendor/symfony/polyfill-php72/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-php72/LICENSE +++ b/vendor/symfony/polyfill-php72/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php index 5e20d5bf..7bf96c99 100644 --- a/vendor/symfony/polyfill-php72/Php72.php +++ b/vendor/symfony/polyfill-php72/Php72.php @@ -83,7 +83,7 @@ final class Php72 'SunOS' => 'Solaris', ]; - return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown'; + return $map[\PHP_OS] ?? 'Unknown'; } public static function spl_object_id($object) @@ -96,7 +96,7 @@ final class Php72 } // On 32-bit systems, PHP_INT_SIZE is 4, - return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); } public static function sapi_windows_vt100_support($stream, $enable = null) @@ -167,7 +167,7 @@ final class Php72 self::$hashMask = (int) substr(ob_get_clean(), 17); } - self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); } public static function mb_chr($code, $encoding = null) diff --git a/vendor/symfony/polyfill-php72/README.md b/vendor/symfony/polyfill-php72/README.md index 59dec8a2..ed190505 100644 --- a/vendor/symfony/polyfill-php72/README.md +++ b/vendor/symfony/polyfill-php72/README.md @@ -6,6 +6,12 @@ This component provides functions added to PHP 7.2 core: - [`spl_object_id`](https://php.net/spl_object_id) - [`stream_isatty`](https://php.net/stream_isatty) +And also functions added to PHP 7.2 mbstring: + +- [`mb_ord`](https://php.net/mb_ord) +- [`mb_chr`](https://php.net/mb_chr) +- [`mb_scrub`](https://php.net/mb_scrub) + On Windows only: - [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) @@ -16,11 +22,12 @@ Moved to core since 7.2 (was in the optional XML extension earlier): - [`utf8_decode`](https://php.net/utf8_decode) Also, it provides constants added to PHP 7.2: + - [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) - [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json index c96c8447..1882576d 100644 --- a/vendor/symfony/polyfill-php72/composer.json +++ b/vendor/symfony/polyfill-php72/composer.json @@ -24,9 +24,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE index 3f853aaf..7536caea 100644 --- a/vendor/symfony/polyfill-php73/LICENSE +++ b/vendor/symfony/polyfill-php73/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php73/README.md b/vendor/symfony/polyfill-php73/README.md index b3ebbce5..032fafbd 100644 --- a/vendor/symfony/polyfill-php73/README.md +++ b/vendor/symfony/polyfill-php73/README.md @@ -10,7 +10,7 @@ This component provides functions added to PHP 7.3 core: - [`JsonException`](https://php.net/JsonException) More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json index a7fe4787..3d47d154 100644 --- a/vendor/symfony/polyfill-php73/composer.json +++ b/vendor/symfony/polyfill-php73/composer.json @@ -25,9 +25,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE index 5593b1d8..0ed3a246 100644 --- a/vendor/symfony/polyfill-php80/LICENSE +++ b/vendor/symfony/polyfill-php80/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020 Fabien Potencier +Copyright (c) 2020-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php80/README.md b/vendor/symfony/polyfill-php80/README.md index 10b8ee49..3816c559 100644 --- a/vendor/symfony/polyfill-php80/README.md +++ b/vendor/symfony/polyfill-php80/README.md @@ -3,12 +3,13 @@ Symfony Polyfill / Php80 This component provides features added to PHP 8.0 core: -- `Stringable` interface +- [`Stringable`](https://php.net/stringable) interface - [`fdiv`](https://php.net/fdiv) -- `ValueError` class -- `UnhandledMatchError` class +- [`ValueError`](https://php.net/valueerror) class +- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class - `FILTER_VALIDATE_BOOL` constant - [`get_debug_type`](https://php.net/get_debug_type) +- [`PhpToken`](https://php.net/phptoken) class - [`preg_last_error_msg`](https://php.net/preg_last_error_msg) - [`str_contains`](https://php.net/str_contains) - [`str_starts_with`](https://php.net/str_starts_with) diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php index 7ea6d277..2b955423 100644 --- a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +++ b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + #[Attribute(Attribute::TARGET_CLASS)] final class Attribute { diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php index 72f10812..bd1212f6 100644 --- a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +++ b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php @@ -1,6 +1,15 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) { class PhpToken extends Symfony\Polyfill\Php80\PhpToken { } diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php index 77e037cb..7c62d750 100644 --- a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +++ b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + if (\PHP_VERSION_ID < 80000) { interface Stringable { diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php index 37937cbf..01c6c6c8 100644 --- a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +++ b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + if (\PHP_VERSION_ID < 80000) { class UnhandledMatchError extends Error { diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php index a3a9b88b..783dbc28 100644 --- a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +++ b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + if (\PHP_VERSION_ID < 80000) { class ValueError extends Error { diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json index 5fe679db..46ccde20 100644 --- a/vendor/symfony/polyfill-php80/composer.json +++ b/vendor/symfony/polyfill-php80/composer.json @@ -29,9 +29,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/polyfill-php81/LICENSE b/vendor/symfony/polyfill-php81/LICENSE index efb17f98..99c6bdf3 100644 --- a/vendor/symfony/polyfill-php81/LICENSE +++ b/vendor/symfony/polyfill-php81/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021 Fabien Potencier +Copyright (c) 2021-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php81/README.md b/vendor/symfony/polyfill-php81/README.md index 5ef61be6..c07ef782 100644 --- a/vendor/symfony/polyfill-php81/README.md +++ b/vendor/symfony/polyfill-php81/README.md @@ -4,11 +4,13 @@ Symfony Polyfill / Php81 This component provides features added to PHP 8.1 core: - [`array_is_list`](https://php.net/array_is_list) -- [`MYSQLI_REFRESH_REPLICA`](https://www.php.net/manual/en/mysqli.constants.php#constantmysqli-refresh-replica) constant +- [`enum_exists`](https://php.net/enum-exists) +- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant - [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types) +- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used) More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). +[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). License ======= diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php index f4cad34f..cb7720a8 100644 --- a/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php +++ b/vendor/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + if (\PHP_VERSION_ID < 80100) { #[Attribute(Attribute::TARGET_METHOD)] final class ReturnTypeWillChange diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json index c39ccf47..381af79a 100644 --- a/vendor/symfony/polyfill-php81/composer.json +++ b/vendor/symfony/polyfill-php81/composer.json @@ -25,9 +25,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php index 5914b4cd..f392c962 100644 --- a/vendor/symfony/process/ExecutableFinder.php +++ b/vendor/symfony/process/ExecutableFinder.php @@ -46,10 +46,10 @@ class ExecutableFinder * * @return string|null */ - public function find(string $name, string $default = null, array $extraDirs = []) + public function find(string $name, ?string $default = null, array $extraDirs = []) { - if (ini_get('open_basedir')) { - $searchPath = array_merge(explode(\PATH_SEPARATOR, ini_get('open_basedir')), $extraDirs); + if (\ini_get('open_basedir')) { + $searchPath = array_merge(explode(\PATH_SEPARATOR, \ini_get('open_basedir')), $extraDirs); $dirs = []; foreach ($searchPath as $path) { // Silencing against https://bugs.php.net/69240 diff --git a/vendor/symfony/process/InputStream.php b/vendor/symfony/process/InputStream.php index 240665f3..0c45b524 100644 --- a/vendor/symfony/process/InputStream.php +++ b/vendor/symfony/process/InputStream.php @@ -30,7 +30,7 @@ class InputStream implements \IteratorAggregate /** * Sets a callback that is called when the write buffer becomes empty. */ - public function onEmpty(callable $onEmpty = null) + public function onEmpty(?callable $onEmpty = null) { $this->onEmpty = $onEmpty; } diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/process/LICENSE +++ b/vendor/symfony/process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php index 998808b6..45dbcca4 100644 --- a/vendor/symfony/process/PhpExecutableFinder.php +++ b/vendor/symfony/process/PhpExecutableFinder.php @@ -35,7 +35,7 @@ class PhpExecutableFinder { if ($php = getenv('PHP_BINARY')) { if (!is_executable($php)) { - $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; + $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v --'; if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) { if (!is_executable($php)) { return false; @@ -56,7 +56,7 @@ class PhpExecutableFinder $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; // PHP_BINARY return the current sapi executable - if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) { + if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) { return \PHP_BINARY.$args; } diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php index 2bc338e5..3a1d147c 100644 --- a/vendor/symfony/process/PhpProcess.php +++ b/vendor/symfony/process/PhpProcess.php @@ -32,7 +32,7 @@ class PhpProcess extends Process * @param int $timeout The timeout in seconds * @param array|null $php Path to the PHP binary to use with any additional arguments */ - public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null) + public function __construct(string $script, ?string $cwd = null, ?array $env = null, int $timeout = 60, ?array $php = null) { if (null === $php) { $executableFinder = new PhpExecutableFinder(); @@ -53,7 +53,7 @@ class PhpProcess extends Process /** * {@inheritdoc} */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) + public static function fromShellCommandline(string $command, ?string $cwd = null, ?array $env = null, $input = null, ?float $timeout = 60) { throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class)); } @@ -61,7 +61,7 @@ class PhpProcess extends Process /** * {@inheritdoc} */ - public function start(callable $callback = null, array $env = []) + public function start(?callable $callback = null, array $env = []) { if (null === $this->getCommandLine()) { throw new RuntimeException('Unable to find the PHP executable.'); diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php index 01051005..656dc032 100644 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/vendor/symfony/process/Pipes/AbstractPipes.php @@ -104,7 +104,7 @@ abstract class AbstractPipes implements PipesInterface stream_set_blocking($input, 0); } elseif (!isset($this->inputBuffer[0])) { if (!\is_string($input)) { - if (!is_scalar($input)) { + if (!\is_scalar($input)) { throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', get_debug_type($this->input), get_debug_type($input))); } $input = (string) $input; diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index bca84f57..968dd026 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -149,7 +149,7 @@ class WindowsPipes extends AbstractPipes if ($w) { @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); } elseif ($this->fileHandles) { - usleep(Process::TIMEOUT_PRECISION * 1E6); + usleep((int) (Process::TIMEOUT_PRECISION * 1E6)); } } foreach ($this->fileHandles as $type => $fileHandle) { diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php index 14e17774..a4b0a784 100644 --- a/vendor/symfony/process/Process.php +++ b/vendor/symfony/process/Process.php @@ -80,6 +80,7 @@ class Process implements \IteratorAggregate private $processPipes; private $latestSignal; + private $cachedExitCode; private static $sigchild; @@ -140,7 +141,7 @@ class Process implements \IteratorAggregate * * @throws LogicException When proc_open is not installed */ - public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) + public function __construct(array $command, ?string $cwd = null, ?array $env = null, $input = null, ?float $timeout = 60) { if (!\function_exists('proc_open')) { throw new LogicException('The Process class relies on proc_open, which is not available on your PHP installation.'); @@ -189,7 +190,7 @@ class Process implements \IteratorAggregate * * @throws LogicException When proc_open is not installed */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) + public static function fromShellCommandline(string $command, ?string $cwd = null, ?array $env = null, $input = null, ?float $timeout = 60) { $process = new static([], $cwd, $env, $input, $timeout); $process->commandline = $command; @@ -247,7 +248,7 @@ class Process implements \IteratorAggregate * * @final */ - public function run(callable $callback = null, array $env = []): int + public function run(?callable $callback = null, array $env = []): int { $this->start($callback, $env); @@ -266,7 +267,7 @@ class Process implements \IteratorAggregate * * @final */ - public function mustRun(callable $callback = null, array $env = []): self + public function mustRun(?callable $callback = null, array $env = []): self { if (0 !== $this->run($callback, $env)) { throw new ProcessFailedException($this); @@ -294,7 +295,7 @@ class Process implements \IteratorAggregate * @throws RuntimeException When process is already running * @throws LogicException In case a callback is provided and output has been disabled */ - public function start(callable $callback = null, array $env = []) + public function start(?callable $callback = null, array $env = []) { if ($this->isRunning()) { throw new RuntimeException('Process is already running.'); @@ -331,7 +332,7 @@ class Process implements \IteratorAggregate // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; - $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; + $commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code'; // Workaround for the bug, when PTS functionality is enabled. // @see : https://bugs.php.net/69442 @@ -385,7 +386,7 @@ class Process implements \IteratorAggregate * * @final */ - public function restart(callable $callback = null, array $env = []): self + public function restart(?callable $callback = null, array $env = []): self { if ($this->isRunning()) { throw new RuntimeException('Process is already running.'); @@ -412,7 +413,7 @@ class Process implements \IteratorAggregate * @throws ProcessSignaledException When process stopped after receiving signal * @throws LogicException When process is not yet started */ - public function wait(callable $callback = null) + public function wait(?callable $callback = null) { $this->requireProcessIsStarted(__FUNCTION__); @@ -428,7 +429,7 @@ class Process implements \IteratorAggregate do { $this->checkTimeout(); - $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); + $running = $this->isRunning() && ('\\' === \DIRECTORY_SEPARATOR || $this->processPipes->areOpen()); $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); } while ($running); @@ -617,10 +618,10 @@ class Process implements \IteratorAggregate * * @param int $flags A bit field of Process::ITER_* flags * + * @return \Generator + * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started - * - * @return \Generator */ #[\ReturnTypeWillChange] public function getIterator(int $flags = 0) @@ -910,11 +911,11 @@ class Process implements \IteratorAggregate * Stops the process. * * @param int|float $timeout The timeout in seconds - * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) + * @param int|null $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) * * @return int|null The exit-code of the process or null if it's not running */ - public function stop(float $timeout = 10, int $signal = null) + public function stop(float $timeout = 10, ?int $signal = null) { $timeoutMicro = microtime(true) + $timeout; if ($this->isRunning()) { @@ -1310,7 +1311,7 @@ class Process implements \IteratorAggregate * * @return \Closure */ - protected function buildCallback(callable $callback = null) + protected function buildCallback(?callable $callback = null) { if ($this->outputDisabled) { return function ($type, $data) use ($callback): bool { @@ -1345,6 +1346,19 @@ class Process implements \IteratorAggregate $this->processInformation = proc_get_status($this->process); $running = $this->processInformation['running']; + // In PHP < 8.3, "proc_get_status" only returns the correct exit status on the first call. + // Subsequent calls return -1 as the process is discarded. This workaround caches the first + // retrieved exit status for consistent results in later calls, mimicking PHP 8.3 behavior. + if (\PHP_VERSION_ID < 80300) { + if (!isset($this->cachedExitCode) && !$running && -1 !== $this->processInformation['exitcode']) { + $this->cachedExitCode = $this->processInformation['exitcode']; + } + + if (isset($this->cachedExitCode) && !$running && -1 === $this->processInformation['exitcode']) { + $this->processInformation['exitcode'] = $this->cachedExitCode; + } + } + $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running); if ($this->fallbackStatus && $this->isSigchildEnabled()) { diff --git a/vendor/symfony/process/ProcessUtils.php b/vendor/symfony/process/ProcessUtils.php index 6cc7a610..2a7aff71 100644 --- a/vendor/symfony/process/ProcessUtils.php +++ b/vendor/symfony/process/ProcessUtils.php @@ -48,7 +48,7 @@ class ProcessUtils if (\is_string($input)) { return $input; } - if (is_scalar($input)) { + if (\is_scalar($input)) { return (string) $input; } if ($input instanceof Process) { diff --git a/vendor/symfony/routing/Annotation/Route.php b/vendor/symfony/routing/Annotation/Route.php index 81563df2..957344f0 100644 --- a/vendor/symfony/routing/Annotation/Route.php +++ b/vendor/symfony/routing/Annotation/Route.php @@ -49,20 +49,20 @@ class Route public function __construct( $data = [], $path = null, - string $name = null, + ?string $name = null, array $requirements = [], array $options = [], array $defaults = [], - string $host = null, + ?string $host = null, $methods = [], $schemes = [], - string $condition = null, - int $priority = null, - string $locale = null, - string $format = null, - bool $utf8 = null, - bool $stateless = null, - string $env = null + ?string $condition = null, + ?int $priority = null, + ?string $locale = null, + ?string $format = null, + ?bool $utf8 = null, + ?bool $stateless = null, + ?string $env = null ) { if (\is_string($data)) { $data = ['path' => $data]; diff --git a/vendor/symfony/routing/CompiledRoute.php b/vendor/symfony/routing/CompiledRoute.php index 1449cdb9..64bf9cac 100644 --- a/vendor/symfony/routing/CompiledRoute.php +++ b/vendor/symfony/routing/CompiledRoute.php @@ -37,7 +37,7 @@ class CompiledRoute implements \Serializable * @param array $hostVariables An array of host variables * @param array $variables An array of variables (variables defined in the path and in the host patterns) */ - public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = []) + public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, ?string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = []) { $this->staticPrefix = $staticPrefix; $this->regex = $regex; diff --git a/vendor/symfony/routing/Exception/MethodNotAllowedException.php b/vendor/symfony/routing/Exception/MethodNotAllowedException.php index 27cf2125..a73e1e6e 100644 --- a/vendor/symfony/routing/Exception/MethodNotAllowedException.php +++ b/vendor/symfony/routing/Exception/MethodNotAllowedException.php @@ -25,7 +25,7 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn /** * @param string[] $allowedMethods */ - public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null) + public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, ?\Throwable $previous = null) { if (null === $message) { trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); diff --git a/vendor/symfony/routing/Generator/CompiledUrlGenerator.php b/vendor/symfony/routing/Generator/CompiledUrlGenerator.php index 8cbbf8f7..8af3ae78 100644 --- a/vendor/symfony/routing/Generator/CompiledUrlGenerator.php +++ b/vendor/symfony/routing/Generator/CompiledUrlGenerator.php @@ -23,7 +23,7 @@ class CompiledUrlGenerator extends UrlGenerator private $compiledRoutes = []; private $defaultLocale; - public function __construct(array $compiledRoutes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) + public function __construct(array $compiledRoutes, RequestContext $context, ?LoggerInterface $logger = null, ?string $defaultLocale = null) { $this->compiledRoutes = $compiledRoutes; $this->context = $context; diff --git a/vendor/symfony/routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Generator/UrlGenerator.php index acf3ead4..4419e9ef 100644 --- a/vendor/symfony/routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Generator/UrlGenerator.php @@ -82,7 +82,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt '%7C' => '|', ]; - public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null) + public function __construct(RouteCollection $routes, RequestContext $context, ?LoggerInterface $logger = null, ?string $defaultLocale = null) { $this->routes = $routes; $this->context = $context; @@ -162,11 +162,11 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt } /** + * @return string + * * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement - * - * @return string */ protected function doGenerate(array $variables, array $defaults, array $requirements, array $tokens, array $parameters, string $name, int $referenceType, array $hostTokens, array $requiredSchemes = []) { diff --git a/vendor/symfony/routing/LICENSE b/vendor/symfony/routing/LICENSE index 88bf75bb..0138f8f0 100644 --- a/vendor/symfony/routing/LICENSE +++ b/vendor/symfony/routing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Loader/AnnotationClassLoader.php index ad5af5c9..c0bcb471 100644 --- a/vendor/symfony/routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationClassLoader.php @@ -85,7 +85,7 @@ abstract class AnnotationClassLoader implements LoaderInterface */ protected $defaultRouteIndex = 0; - public function __construct(Reader $reader = null, string $env = null) + public function __construct(?Reader $reader = null, ?string $env = null) { $this->reader = $reader; $this->env = $env; @@ -108,7 +108,7 @@ abstract class AnnotationClassLoader implements LoaderInterface * * @throws \InvalidArgumentException When route can't be parsed */ - public function load($class, string $type = null) + public function load($class, ?string $type = null) { if (!class_exists($class)) { throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); @@ -239,7 +239,7 @@ abstract class AnnotationClassLoader implements LoaderInterface /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); } diff --git a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php index ae825a39..8cd60f82 100644 --- a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php @@ -32,7 +32,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader * * @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed */ - public function load($path, string $type = null) + public function load($path, ?string $type = null) { if (!is_dir($dir = $this->locator->locate($path))) { return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection(); @@ -74,7 +74,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { if ('annotation' === $type) { return true; diff --git a/vendor/symfony/routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Loader/AnnotationFileLoader.php index 27af66ee..a1d70c0f 100644 --- a/vendor/symfony/routing/Loader/AnnotationFileLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationFileLoader.php @@ -47,7 +47,7 @@ class AnnotationFileLoader extends FileLoader * * @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed */ - public function load($file, string $type = null) + public function load($file, ?string $type = null) { $path = $this->locator->locate($file); @@ -70,7 +70,7 @@ class AnnotationFileLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); } diff --git a/vendor/symfony/routing/Loader/ClosureLoader.php b/vendor/symfony/routing/Loader/ClosureLoader.php index 42f950f5..a5081ca2 100644 --- a/vendor/symfony/routing/Loader/ClosureLoader.php +++ b/vendor/symfony/routing/Loader/ClosureLoader.php @@ -31,7 +31,7 @@ class ClosureLoader extends Loader * * @return RouteCollection */ - public function load($closure, string $type = null) + public function load($closure, ?string $type = null) { return $closure($this->env); } @@ -39,7 +39,7 @@ class ClosureLoader extends Loader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return $resource instanceof \Closure && (!$type || 'closure' === $type); } diff --git a/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php b/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php index 09274ccd..ec59f7ee 100644 --- a/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php +++ b/vendor/symfony/routing/Loader/Configurator/CollectionConfigurator.php @@ -28,7 +28,7 @@ class CollectionConfigurator private $parentPrefixes; private $host; - public function __construct(RouteCollection $parent, string $name, self $parentConfigurator = null, array $parentPrefixes = null) + public function __construct(RouteCollection $parent, string $name, ?self $parentConfigurator = null, ?array $parentPrefixes = null) { $this->parent = $parent; $this->name = $name; diff --git a/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php b/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php index bb6ce267..fcd1c215 100644 --- a/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php +++ b/vendor/symfony/routing/Loader/Configurator/RouteConfigurator.php @@ -24,7 +24,7 @@ class RouteConfigurator protected $parentConfigurator; - public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', CollectionConfigurator $parentConfigurator = null, array $prefixes = null) + public function __construct(RouteCollection $collection, RouteCollection $route, string $name = '', ?CollectionConfigurator $parentConfigurator = null, ?array $prefixes = null) { $this->collection = $collection; $this->route = $route; diff --git a/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php b/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php index 4687bf68..620b2d58 100644 --- a/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php +++ b/vendor/symfony/routing/Loader/Configurator/RoutingConfigurator.php @@ -26,7 +26,7 @@ class RoutingConfigurator private $file; private $env; - public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, string $env = null) + public function __construct(RouteCollection $collection, PhpFileLoader $loader, string $path, string $file, ?string $env = null) { $this->collection = $collection; $this->loader = $loader; @@ -38,7 +38,7 @@ class RoutingConfigurator /** * @param string|string[]|null $exclude Glob patterns to exclude from the import */ - final public function import($resource, string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator + final public function import($resource, ?string $type = null, bool $ignoreErrors = false, $exclude = null): ImportConfigurator { $this->loader->setCurrentDir(\dirname($this->path)); diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php index 4734a4ea..44fb047a 100644 --- a/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php +++ b/vendor/symfony/routing/Loader/Configurator/Traits/LocalizedRouteTrait.php @@ -27,7 +27,7 @@ trait LocalizedRouteTrait * * @param string|array $path the path, or the localized paths of the route */ - final protected function createLocalizedRoute(RouteCollection $collection, string $name, $path, string $namePrefix = '', array $prefixes = null): RouteCollection + final protected function createLocalizedRoute(RouteCollection $collection, string $name, $path, string $namePrefix = '', ?array $prefixes = null): RouteCollection { $paths = []; diff --git a/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php b/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php index 27053bca..0b19573e 100644 --- a/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php +++ b/vendor/symfony/routing/Loader/Configurator/Traits/PrefixTrait.php @@ -29,6 +29,7 @@ trait PrefixTrait } foreach ($routes->all() as $name => $route) { if (null === $locale = $route->getDefault('_locale')) { + $priority = $routes->getPriority($name) ?? 0; $routes->remove($name); foreach ($prefix as $locale => $localePrefix) { $localizedRoute = clone $route; @@ -36,13 +37,13 @@ trait PrefixTrait $localizedRoute->setRequirement('_locale', preg_quote($locale)); $localizedRoute->setDefault('_canonical_route', $name); $localizedRoute->setPath($localePrefix.(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name.'.'.$locale, $localizedRoute); + $routes->add($name.'.'.$locale, $localizedRoute, $priority); } } elseif (!isset($prefix[$locale])) { throw new \InvalidArgumentException(sprintf('Route "%s" with locale "%s" is missing a corresponding prefix in its parent collection.', $name, $locale)); } else { $route->setPath($prefix[$locale].(!$trailingSlashOnRoot && '/' === $route->getPath() ? '' : $route->getPath())); - $routes->add($name, $route); + $routes->add($name, $route, $routes->getPriority($name) ?? 0); } } diff --git a/vendor/symfony/routing/Loader/ContainerLoader.php b/vendor/symfony/routing/Loader/ContainerLoader.php index d8730aec..a03d4652 100644 --- a/vendor/symfony/routing/Loader/ContainerLoader.php +++ b/vendor/symfony/routing/Loader/ContainerLoader.php @@ -22,7 +22,7 @@ class ContainerLoader extends ObjectLoader { private $container; - public function __construct(ContainerInterface $container, string $env = null) + public function __construct(ContainerInterface $container, ?string $env = null) { $this->container = $container; parent::__construct($env); @@ -31,7 +31,7 @@ class ContainerLoader extends ObjectLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return 'service' === $type && \is_string($resource); } diff --git a/vendor/symfony/routing/Loader/DirectoryLoader.php b/vendor/symfony/routing/Loader/DirectoryLoader.php index c0f34917..24cf185d 100644 --- a/vendor/symfony/routing/Loader/DirectoryLoader.php +++ b/vendor/symfony/routing/Loader/DirectoryLoader.php @@ -20,7 +20,7 @@ class DirectoryLoader extends FileLoader /** * {@inheritdoc} */ - public function load($file, string $type = null) + public function load($file, ?string $type = null) { $path = $this->locator->locate($file); @@ -49,7 +49,7 @@ class DirectoryLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { // only when type is forced to directory, not to conflict with AnnotationLoader diff --git a/vendor/symfony/routing/Loader/GlobFileLoader.php b/vendor/symfony/routing/Loader/GlobFileLoader.php index 780fb15d..9c2f4ed4 100644 --- a/vendor/symfony/routing/Loader/GlobFileLoader.php +++ b/vendor/symfony/routing/Loader/GlobFileLoader.php @@ -24,7 +24,7 @@ class GlobFileLoader extends FileLoader /** * {@inheritdoc} */ - public function load($resource, string $type = null) + public function load($resource, ?string $type = null) { $collection = new RouteCollection(); @@ -40,7 +40,7 @@ class GlobFileLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return 'glob' === $type; } diff --git a/vendor/symfony/routing/Loader/ObjectLoader.php b/vendor/symfony/routing/Loader/ObjectLoader.php index 06245390..d212f8e8 100644 --- a/vendor/symfony/routing/Loader/ObjectLoader.php +++ b/vendor/symfony/routing/Loader/ObjectLoader.php @@ -40,7 +40,7 @@ abstract class ObjectLoader extends Loader * * @return RouteCollection */ - public function load($resource, string $type = null) + public function load($resource, ?string $type = null) { if (!preg_match('/^[^\:]+(?:::(?:[^\:]+))?$/', $resource)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the %s route loader: use the format "object_id::method" or "object_id" if your object class has an "__invoke" method.', $resource, \is_string($type) ? '"'.$type.'"' : 'object')); diff --git a/vendor/symfony/routing/Loader/PhpFileLoader.php b/vendor/symfony/routing/Loader/PhpFileLoader.php index 39ac8127..3f1cf9cd 100644 --- a/vendor/symfony/routing/Loader/PhpFileLoader.php +++ b/vendor/symfony/routing/Loader/PhpFileLoader.php @@ -35,7 +35,7 @@ class PhpFileLoader extends FileLoader * * @return RouteCollection */ - public function load($file, string $type = null) + public function load($file, ?string $type = null) { $path = $this->locator->locate($file); $this->setCurrentDir(\dirname($path)); @@ -62,7 +62,7 @@ class PhpFileLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'php' === $type); } diff --git a/vendor/symfony/routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Loader/XmlFileLoader.php index 9f502dfc..85bb0ee8 100644 --- a/vendor/symfony/routing/Loader/XmlFileLoader.php +++ b/vendor/symfony/routing/Loader/XmlFileLoader.php @@ -45,7 +45,7 @@ class XmlFileLoader extends FileLoader * @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be * parsed because it does not validate against the scheme */ - public function load($file, string $type = null) + public function load($file, ?string $type = null) { $path = $this->locator->locate($file); @@ -102,7 +102,7 @@ class XmlFileLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type); } @@ -195,7 +195,7 @@ class XmlFileLoader extends FileLoader $this->setCurrentDir(\dirname($path)); /** @var RouteCollection[] $imported */ - $imported = $this->import($resource, ('' !== $type ? $type : null), false, $file, $exclude) ?: []; + $imported = $this->import($resource, '' !== $type ? $type : null, false, $file, $exclude) ?: []; if (!\is_array($imported)) { $imported = [$imported]; diff --git a/vendor/symfony/routing/Loader/YamlFileLoader.php b/vendor/symfony/routing/Loader/YamlFileLoader.php index ae98a314..1087817b 100644 --- a/vendor/symfony/routing/Loader/YamlFileLoader.php +++ b/vendor/symfony/routing/Loader/YamlFileLoader.php @@ -48,7 +48,7 @@ class YamlFileLoader extends FileLoader * * @throws \InvalidArgumentException When a route can't be parsed because YAML is invalid */ - public function load($file, string $type = null) + public function load($file, ?string $type = null) { $path = $this->locator->locate($file); @@ -117,7 +117,7 @@ class YamlFileLoader extends FileLoader /** * {@inheritdoc} */ - public function supports($resource, string $type = null) + public function supports($resource, ?string $type = null) { return \is_string($resource) && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), ['yml', 'yaml'], true) && (!$type || 'yaml' === $type); } diff --git a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php index 123130ed..ddf231f0 100644 --- a/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php +++ b/vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php @@ -139,7 +139,7 @@ EOF; foreach ($staticRoutes as $path => $routes) { $code .= sprintf(" %s => [\n", self::export($path)); foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); + $code .= vsprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", array_map([__CLASS__, 'export'], $route)); } $code .= " ],\n"; } @@ -151,7 +151,7 @@ EOF; foreach ($dynamicRoutes as $path => $routes) { $code .= sprintf(" %s => [\n", self::export($path)); foreach ($routes as $route) { - $code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route)); + $code .= vsprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", array_map([__CLASS__, 'export'], $route)); } $code .= " ],\n"; } diff --git a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php b/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php index 97bd692a..47d923c6 100644 --- a/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php +++ b/vendor/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php @@ -200,6 +200,7 @@ class StaticPrefixCollection public static function handleError(int $type, string $msg) { - return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length'); + return str_contains($msg, 'Compilation failed: lookbehind assertion is not fixed length') + || str_contains($msg, 'Compilation failed: length of lookbehind assertion is not limited'); } } diff --git a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php b/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php index d07f4209..a43888b3 100644 --- a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php +++ b/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php @@ -27,5 +27,5 @@ interface RedirectableUrlMatcherInterface * * @return array */ - public function redirect(string $path, string $route, string $scheme = null); + public function redirect(string $path, string $route, ?string $scheme = null); } diff --git a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php index 9e8c4c42..cddfe025 100644 --- a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php +++ b/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php @@ -152,7 +152,7 @@ class TraceableUrlMatcher extends UrlMatcher return []; } - private function addTrace(string $log, int $level = self::ROUTE_DOES_NOT_MATCH, string $name = null, Route $route = null) + private function addTrace(string $log, int $level = self::ROUTE_DOES_NOT_MATCH, ?string $name = null, ?Route $route = null) { $this->traces[] = [ 'log' => $log, diff --git a/vendor/symfony/routing/RouteCollection.php b/vendor/symfony/routing/RouteCollection.php index 1b5ffd43..95faead6 100644 --- a/vendor/symfony/routing/RouteCollection.php +++ b/vendor/symfony/routing/RouteCollection.php @@ -89,7 +89,7 @@ class RouteCollection implements \IteratorAggregate, \Countable /** * @param int $priority */ - public function add(string $name, Route $route/*, int $priority = 0*/) + public function add(string $name, Route $route/* , int $priority = 0 */) { if (\func_num_args() < 3 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) { trigger_deprecation('symfony/routing', '5.1', 'The "%s()" method will have a new "int $priority = 0" argument in version 6.0, not defining it is deprecated.', __METHOD__); @@ -157,9 +157,24 @@ class RouteCollection implements \IteratorAggregate, \Countable */ public function remove($name) { + $routes = []; foreach ((array) $name as $n) { + if (isset($this->routes[$n])) { + $routes[] = $n; + } + unset($this->routes[$n], $this->priorities[$n], $this->aliases[$n]); } + + if (!$routes) { + return; + } + + foreach ($this->aliases as $k => $alias) { + if (\in_array($alias->getId(), $routes, true)) { + unset($this->aliases[$k]); + } + } } /** @@ -380,4 +395,9 @@ class RouteCollection implements \IteratorAggregate, \Countable { return $this->aliases[$name] ?? null; } + + public function getPriority(string $name): ?int + { + return $this->priorities[$name] ?? null; + } } diff --git a/vendor/symfony/routing/RouteCollectionBuilder.php b/vendor/symfony/routing/RouteCollectionBuilder.php index d7eed31e..04a44397 100644 --- a/vendor/symfony/routing/RouteCollectionBuilder.php +++ b/vendor/symfony/routing/RouteCollectionBuilder.php @@ -43,7 +43,7 @@ class RouteCollectionBuilder private $methods; private $resources = []; - public function __construct(LoaderInterface $loader = null) + public function __construct(?LoaderInterface $loader = null) { $this->loader = $loader; } @@ -59,7 +59,7 @@ class RouteCollectionBuilder * * @throws LoaderLoadException */ - public function import($resource, string $prefix = '/', string $type = null) + public function import($resource, string $prefix = '/', ?string $type = null) { /** @var RouteCollection[] $collections */ $collections = $this->load($resource, $type); @@ -92,7 +92,7 @@ class RouteCollectionBuilder * * @return Route */ - public function add(string $path, string $controller, string $name = null) + public function add(string $path, string $controller, ?string $name = null) { $route = new Route($path); $route->setDefault('_controller', $controller); @@ -125,7 +125,7 @@ class RouteCollectionBuilder * * @return $this */ - public function addRoute(Route $route, string $name = null) + public function addRoute(Route $route, ?string $name = null) { if (null === $name) { // used as a flag to know which routes will need a name later @@ -337,7 +337,7 @@ class RouteCollectionBuilder * * @throws LoaderLoadException If no loader is found */ - private function load($resource, string $type = null): array + private function load($resource, ?string $type = null): array { if (null === $this->loader) { throw new \BadMethodCallException('Cannot import other routing resources: you must pass a LoaderInterface when constructing RouteCollectionBuilder.'); diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php index fbab1a79..48ec1018 100644 --- a/vendor/symfony/routing/Router.php +++ b/vendor/symfony/routing/Router.php @@ -97,7 +97,7 @@ class Router implements RouterInterface, RequestMatcherInterface /** * @param mixed $resource The main resource to load */ - public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, string $defaultLocale = null) + public function __construct(LoaderInterface $loader, $resource, array $options = [], ?RequestContext $context = null, ?LoggerInterface $logger = null, ?string $defaultLocale = null) { $this->loader = $loader; $this->resource = $resource; @@ -313,14 +313,12 @@ class Router implements RouterInterface, RequestMatcherInterface if (null === $this->options['cache_dir']) { $routes = $this->getRouteCollection(); - $aliases = []; $compiled = is_a($this->options['generator_class'], CompiledUrlGenerator::class, true); if ($compiled) { $generatorDumper = new CompiledUrlGeneratorDumper($routes); - $routes = $generatorDumper->getCompiledRoutes(); - $aliases = $generatorDumper->getCompiledAliases(); + $routes = array_merge($generatorDumper->getCompiledRoutes(), $generatorDumper->getCompiledAliases()); } - $this->generator = new $this->options['generator_class'](array_merge($routes, $aliases), $this->context, $this->logger, $this->defaultLocale); + $this->generator = new $this->options['generator_class']($routes, $this->context, $this->logger, $this->defaultLocale); } else { $cache = $this->getConfigCacheFactory()->cache($this->options['cache_dir'].'/url_generating_routes.php', function (ConfigCacheInterface $cache) { @@ -376,7 +374,7 @@ class Router implements RouterInterface, RequestMatcherInterface private static function getCompiledRoutes(string $path): array { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { + if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { self::$cache = null; } diff --git a/vendor/symfony/routing/composer.json b/vendor/symfony/routing/composer.json index b978c062..c32219e6 100644 --- a/vendor/symfony/routing/composer.json +++ b/vendor/symfony/routing/composer.json @@ -2,7 +2,7 @@ "name": "symfony/routing", "type": "library", "description": "Maps an HTTP request to a set of configuration variables", - "keywords": ["routing", "router", "URL", "URI"], + "keywords": ["routing", "router", "url", "uri"], "homepage": "https://symfony.com", "license": "MIT", "authors": [ @@ -26,7 +26,7 @@ "symfony/yaml": "^4.4|^5.0|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3" }, "conflict": { diff --git a/vendor/symfony/service-contracts/LICENSE b/vendor/symfony/service-contracts/LICENSE index 74cdc2db..7536caea 100644 --- a/vendor/symfony/service-contracts/LICENSE +++ b/vendor/symfony/service-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2022 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php index f7fc2df6..6c560a42 100644 --- a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php +++ b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php @@ -30,12 +30,6 @@ trait ServiceSubscriberTrait */ public static function getSubscribedServices(): array { - static $services; - - if (null !== $services) { - return $services; - } - $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; $attributeOptIn = false; @@ -104,12 +98,13 @@ trait ServiceSubscriberTrait */ public function setContainer(ContainerInterface $container) { - $this->container = $container; - + $ret = null; if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - return parent::setContainer($container); + $ret = parent::setContainer($container); } - return null; + $this->container = $container; + + return $ret; } } diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php index 2a1b565f..07d12b4a 100644 --- a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php +++ b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php @@ -11,85 +11,13 @@ namespace Symfony\Contracts\Service\Test; -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\ServiceLocatorTrait; +class_alias(ServiceLocatorTestCase::class, ServiceLocatorTest::class); -abstract class ServiceLocatorTest extends TestCase -{ +if (false) { /** - * @return ContainerInterface + * @deprecated since PHPUnit 9.6 */ - protected function getServiceLocator(array $factories) + class ServiceLocatorTest { - return new class($factories) implements ContainerInterface { - use ServiceLocatorTrait; - }; - } - - public function testHas() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - function () { return 'dummy'; }, - ]); - - $this->assertTrue($locator->has('foo')); - $this->assertTrue($locator->has('bar')); - $this->assertFalse($locator->has('dummy')); - } - - public function testGet() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('baz', $locator->get('bar')); - } - - public function testGetDoesNotMemoize() - { - $i = 0; - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$i) { - ++$i; - - return 'bar'; - }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame(2, $i); - } - - public function testThrowsOnUndefinedInternalService() - { - if (!$this->getExpectedException()) { - $this->expectException(\Psr\Container\NotFoundExceptionInterface::class); - $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); - } - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); - } - - public function testThrowsOnCircularReference() - { - $this->expectException(\Psr\Container\ContainerExceptionInterface::class); - $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - 'bar' => function () use (&$locator) { return $locator->get('baz'); }, - 'baz' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); } } diff --git a/vendor/symfony/string/AbstractString.php b/vendor/symfony/string/AbstractString.php index 8564430b..cf96a837 100644 --- a/vendor/symfony/string/AbstractString.php +++ b/vendor/symfony/string/AbstractString.php @@ -244,7 +244,7 @@ abstract class AbstractString implements \Stringable, \JsonSerializable public function collapseWhitespace(): static { $str = clone $this; - $str->string = trim(preg_replace('/(?:\s{2,}+|[^\S ])/', ' ', $str->string)); + $str->string = trim(preg_replace("/(?:[ \n\r\t\x0C]{2,}+|[\n\r\t\x0C])/", ' ', $str->string), " \n\r\t\x0C"); return $str; } diff --git a/vendor/symfony/string/AbstractUnicodeString.php b/vendor/symfony/string/AbstractUnicodeString.php index aab3e47f..00096df0 100644 --- a/vendor/symfony/string/AbstractUnicodeString.php +++ b/vendor/symfony/string/AbstractUnicodeString.php @@ -159,7 +159,7 @@ abstract class AbstractUnicodeString extends AbstractString public function camel(): static { $str = clone $this; - $str->string = str_replace(' ', '', preg_replace_callback('/\b./u', static function ($m) use (&$i) { + $str->string = str_replace(' ', '', preg_replace_callback('/\b.(?![A-Z]{2,})/u', static function ($m) use (&$i) { return 1 === ++$i ? ('İ' === $m[0] ? 'i̇' : mb_strtolower($m[0], 'UTF-8')) : mb_convert_case($m[0], \MB_CASE_TITLE, 'UTF-8'); }, preg_replace('/[^\pL0-9]++/u', ' ', $this->string))); @@ -356,7 +356,7 @@ abstract class AbstractUnicodeString extends AbstractString public function snake(): static { - $str = $this->camel()->title(); + $str = $this->camel(); $str->string = mb_strtolower(preg_replace(['/(\p{Lu}+)(\p{Lu}\p{Ll})/u', '/([\p{Ll}0-9])(\p{Lu})/u'], '\1_\2', $str->string), 'UTF-8'); return $str; @@ -484,8 +484,11 @@ abstract class AbstractUnicodeString extends AbstractString )|[\p{Cc}\x7F]++)/xu', '', $s); } - // Non printable characters have been dropped, so wcswidth cannot logically return -1. - $width += $this->wcswidth($s); + $lineWidth = $this->wcswidth($s); + + if ($lineWidth > $width) { + $width = $lineWidth; + } } return $width; diff --git a/vendor/symfony/string/ByteString.php b/vendor/symfony/string/ByteString.php index b3649b6c..639d6435 100644 --- a/vendor/symfony/string/ByteString.php +++ b/vendor/symfony/string/ByteString.php @@ -103,7 +103,10 @@ class ByteString extends AbstractString public function camel(): static { $str = clone $this; - $str->string = lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + + $parts = explode(' ', trim(ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->string)))); + $parts[0] = 1 !== \strlen($parts[0]) && ctype_upper($parts[0]) ? $parts[0] : lcfirst($parts[0]); + $str->string = implode('', $parts); return $str; } @@ -347,7 +350,7 @@ class ByteString extends AbstractString public function snake(): static { - $str = $this->camel()->title(); + $str = $this->camel(); $str->string = strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1_\2', $str->string)); return $str; diff --git a/vendor/symfony/string/Inflector/FrenchInflector.php b/vendor/symfony/string/Inflector/FrenchInflector.php index 42f6125a..612c8f2e 100644 --- a/vendor/symfony/string/Inflector/FrenchInflector.php +++ b/vendor/symfony/string/Inflector/FrenchInflector.php @@ -100,7 +100,7 @@ final class FrenchInflector implements InflectorInterface ['/^mes(sieur|seigneur)s$/', 'mon\1'], ['/^Mes(sieur|seigneur)s$/', 'Mon\1'], - //Default rule + // Default rule ['/s$/i', ''], ]; @@ -108,7 +108,7 @@ final class FrenchInflector implements InflectorInterface * A list of words which should not be inflected. * This list is only used by singularize. */ - private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; + private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i'; /** * {@inheritdoc} diff --git a/vendor/symfony/string/LICENSE b/vendor/symfony/string/LICENSE index 9c907a46..5c7ba055 100644 --- a/vendor/symfony/string/LICENSE +++ b/vendor/symfony/string/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019-2022 Fabien Potencier +Copyright (c) 2019-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/string/LazyString.php b/vendor/symfony/string/LazyString.php index 15b8d729..37330782 100644 --- a/vendor/symfony/string/LazyString.php +++ b/vendor/symfony/string/LazyString.php @@ -64,7 +64,7 @@ class LazyString implements \Stringable, \JsonSerializable */ final public static function isStringable(mixed $value): bool { - return \is_string($value) || $value instanceof \Stringable || is_scalar($value); + return \is_string($value) || $value instanceof \Stringable || \is_scalar($value); } /** @@ -127,7 +127,7 @@ class LazyString implements \Stringable, \JsonSerializable } elseif ($callback instanceof \Closure) { $r = new \ReflectionFunction($callback); - if (false !== strpos($r->name, '{closure}') || !$class = $r->getClosureScopeClass()) { + if (false !== strpos($r->name, '{closure}') || !$class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { return $r->name; } diff --git a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php b/vendor/symfony/string/Resources/data/wcswidth_table_wide.php index 43c802d0..5a647e67 100644 --- a/vendor/symfony/string/Resources/data/wcswidth_table_wide.php +++ b/vendor/symfony/string/Resources/data/wcswidth_table_wide.php @@ -3,8 +3,8 @@ /* * This file has been auto-generated by the Symfony String Component for internal use. * - * Unicode version: 14.0.0 - * Date: 2021-09-17T09:20:30+02:00 + * Unicode version: 15.0.0 + * Date: 2022-10-05T17:16:36+02:00 */ return [ @@ -856,10 +856,18 @@ return [ 110848, 110882, ], + [ + 110898, + 110898, + ], [ 110928, 110930, ], + [ + 110933, + 110933, + ], [ 110948, 110951, @@ -1005,7 +1013,7 @@ return [ 128727, ], [ - 128733, + 128732, 128735, ], [ @@ -1038,39 +1046,31 @@ return [ ], [ 129648, - 129652, - ], - [ - 129656, 129660, ], [ 129664, - 129670, + 129672, ], [ 129680, - 129708, + 129725, ], [ - 129712, - 129722, - ], - [ - 129728, + 129727, 129733, ], [ - 129744, - 129753, + 129742, + 129755, ], [ 129760, - 129767, + 129768, ], [ 129776, - 129782, + 129784, ], [ 131072, @@ -1082,10 +1082,10 @@ return [ ], [ 173824, - 177976, + 177977, ], [ - 177977, + 177978, 177983, ], [ @@ -1130,6 +1130,14 @@ return [ ], [ 201547, + 201551, + ], + [ + 201552, + 205743, + ], + [ + 205744, 262141, ], ]; diff --git a/vendor/symfony/string/Resources/data/wcswidth_table_zero.php b/vendor/symfony/string/Resources/data/wcswidth_table_zero.php index 63b08247..9ae73303 100644 --- a/vendor/symfony/string/Resources/data/wcswidth_table_zero.php +++ b/vendor/symfony/string/Resources/data/wcswidth_table_zero.php @@ -3,8 +3,8 @@ /* * This file has been auto-generated by the Symfony String Component for internal use. * - * Unicode version: 14.0.0 - * Date: 2021-09-17T09:20:30+02:00 + * Unicode version: 15.0.0 + * Date: 2022-10-05T17:16:37+02:00 */ return [ @@ -382,7 +382,7 @@ return [ ], [ 3784, - 3789, + 3790, ], [ 3864, @@ -920,6 +920,10 @@ return [ 69291, 69292, ], + [ + 69373, + 69375, + ], [ 69446, 69456, @@ -1008,6 +1012,10 @@ return [ 70206, 70206, ], + [ + 70209, + 70209, + ], [ 70367, 70367, @@ -1252,6 +1260,30 @@ return [ 73459, 73460, ], + [ + 73472, + 73473, + ], + [ + 73526, + 73530, + ], + [ + 73536, + 73536, + ], + [ + 73538, + 73538, + ], + [ + 78912, + 78912, + ], + [ + 78919, + 78933, + ], [ 92912, 92916, @@ -1348,6 +1380,10 @@ return [ 122918, 122922, ], + [ + 123023, + 123023, + ], [ 123184, 123190, @@ -1360,6 +1396,10 @@ return [ 123628, 123631, ], + [ + 124140, + 124143, + ], [ 125136, 125142, diff --git a/vendor/symfony/translation-contracts/Test/TranslatorTest.php b/vendor/symfony/translation-contracts/Test/TranslatorTest.php index c2c30a91..4e5999df 100644 --- a/vendor/symfony/translation-contracts/Test/TranslatorTest.php +++ b/vendor/symfony/translation-contracts/Test/TranslatorTest.php @@ -356,7 +356,7 @@ class TranslatorTest extends TestCase foreach ($matrix as $langCode => $data) { $indexes = array_flip($data); if ($expectSuccess) { - $this->assertEquals($nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + $this->assertCount($nplural, $indexes, "Langcode '$langCode' has '$nplural' plural forms."); } else { $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); } diff --git a/vendor/symfony/translation/Command/TranslationPullCommand.php b/vendor/symfony/translation/Command/TranslationPullCommand.php index 42513a8a..f30e64d7 100644 --- a/vendor/symfony/translation/Command/TranslationPullCommand.php +++ b/vendor/symfony/translation/Command/TranslationPullCommand.php @@ -141,7 +141,7 @@ EOF switch ($format) { case 'xlf20': $xliffVersion = '2.0'; - // no break + // no break case 'xlf12': $format = 'xlf'; } @@ -159,7 +159,7 @@ EOF if ($force) { foreach ($providerTranslations->getCatalogues() as $catalogue) { - $operation = new TargetOperation((new MessageCatalogue($catalogue->getLocale())), $catalogue); + $operation = new TargetOperation(new MessageCatalogue($catalogue->getLocale()), $catalogue); if ($intlIcu) { $operation->moveMessagesToIntlDomainsIfPossible(); } diff --git a/vendor/symfony/translation/Command/TranslationPushCommand.php b/vendor/symfony/translation/Command/TranslationPushCommand.php index 9743f460..795e68c1 100644 --- a/vendor/symfony/translation/Command/TranslationPushCommand.php +++ b/vendor/symfony/translation/Command/TranslationPushCommand.php @@ -130,16 +130,16 @@ EOF $force = $input->getOption('force'); $deleteMissing = $input->getOption('delete-missing'); + if (!$domains && $provider instanceof FilteringProvider) { + $domains = $provider->getDomains(); + } + + // Reading local translations must be done after retrieving the domains from the provider + // in order to manage only translations from configured domains $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths); if (!$domains) { - if ($provider instanceof FilteringProvider) { - $domains = $provider->getDomains(); - } - - if (!$domains) { - $domains = $this->getDomainsFromTranslatorBag($localTranslations); - } + $domains = $this->getDomainsFromTranslatorBag($localTranslations); } if (!$deleteMissing && $force) { diff --git a/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Dumper/IcuResFileDumper.php index b62ea153..f13f86c8 100644 --- a/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -47,7 +47,7 @@ class IcuResFileDumper extends FileDumper $data .= pack('V', \strlen($target)) .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') .$this->writePadding($data) - ; + ; } $resOffset = $this->getPosition($data); @@ -56,7 +56,7 @@ class IcuResFileDumper extends FileDumper .$indexes .$this->writePadding($data) .$resources - ; + ; $bundleTop = $this->getPosition($data); diff --git a/vendor/symfony/translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Dumper/MoFileDumper.php index 08c8f899..1ea54627 100644 --- a/vendor/symfony/translation/Dumper/MoFileDumper.php +++ b/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -62,7 +62,7 @@ class MoFileDumper extends FileDumper .$targetOffsets .$sources .$targets - ; + ; return $output; } diff --git a/vendor/symfony/translation/LICENSE b/vendor/symfony/translation/LICENSE index 88bf75bb..00837045 100644 --- a/vendor/symfony/translation/LICENSE +++ b/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2022 Fabien Potencier +Copyright (c) 2004-2023 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/translation/Loader/PhpFileLoader.php b/vendor/symfony/translation/Loader/PhpFileLoader.php index 6bc2a05f..ae299c2a 100644 --- a/vendor/symfony/translation/Loader/PhpFileLoader.php +++ b/vendor/symfony/translation/Loader/PhpFileLoader.php @@ -25,7 +25,7 @@ class PhpFileLoader extends FileLoader */ protected function loadResource(string $resource): array { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { + if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { self::$cache = null; } diff --git a/vendor/symfony/translation/MessageCatalogue.php b/vendor/symfony/translation/MessageCatalogue.php index 7aa27efd..848594b6 100644 --- a/vendor/symfony/translation/MessageCatalogue.php +++ b/vendor/symfony/translation/MessageCatalogue.php @@ -155,19 +155,14 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf */ public function add(array $messages, string $domain = 'messages') { - if (!isset($this->messages[$domain])) { - $this->messages[$domain] = []; - } - $intlDomain = $domain; - if (!str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { - $intlDomain .= self::INTL_DOMAIN_SUFFIX; - } + $altDomain = str_ends_with($domain, self::INTL_DOMAIN_SUFFIX) ? substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)) : $domain.self::INTL_DOMAIN_SUFFIX; foreach ($messages as $id => $message) { - if (isset($this->messages[$intlDomain]) && \array_key_exists($id, $this->messages[$intlDomain])) { - $this->messages[$intlDomain][$id] = $message; - } else { - $this->messages[$domain][$id] = $message; - } + unset($this->messages[$altDomain][$id]); + $this->messages[$domain][$id] = $message; + } + + if ([] === ($this->messages[$altDomain] ?? null)) { + unset($this->messages[$altDomain]); } } diff --git a/vendor/symfony/translation/PseudoLocalizationTranslator.php b/vendor/symfony/translation/PseudoLocalizationTranslator.php index 848dc1d2..ba7319d4 100644 --- a/vendor/symfony/translation/PseudoLocalizationTranslator.php +++ b/vendor/symfony/translation/PseudoLocalizationTranslator.php @@ -283,7 +283,7 @@ final class PseudoLocalizationTranslator implements TranslatorInterface } $visibleLength = $this->strlen($visibleText); - $missingLength = (int) (ceil($visibleLength * $this->expansionFactor)) - $visibleLength; + $missingLength = (int) ceil($visibleLength * $this->expansionFactor) - $visibleLength; if ($this->brackets) { $missingLength -= 2; } diff --git a/vendor/symfony/translation/Resources/bin/translation-status.php b/vendor/symfony/translation/Resources/bin/translation-status.php index a7691642..4fe814cf 100644 --- a/vendor/symfony/translation/Resources/bin/translation-status.php +++ b/vendor/symfony/translation/Resources/bin/translation-status.php @@ -9,6 +9,10 @@ * file that was distributed with this source code. */ +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + $usageInstructions = << $v) { - $values[$k] = !is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; + $values[$k] = !\is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; } if (null === $params) { parent::__construct($values, false); diff --git a/vendor/symfony/var-dumper/Caster/Caster.php b/vendor/symfony/var-dumper/Caster/Caster.php index 53f4461d..09238093 100644 --- a/vendor/symfony/var-dumper/Caster/Caster.php +++ b/vendor/symfony/var-dumper/Caster/Caster.php @@ -42,12 +42,12 @@ class Caster * * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not */ - public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array + public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, ?string $debugClass = null): array { if ($hasDebugInfo) { try { $debugInfo = $obj->__debugInfo(); - } catch (\Exception $e) { + } catch (\Throwable $e) { // ignore failing __debugInfo() $hasDebugInfo = false; } @@ -115,7 +115,7 @@ class Caster * @param array $a The array containing the properties to filter * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set - * @param int &$count Set to the number of removed properties + * @param int|null &$count Set to the number of removed properties */ public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array { diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php index 99f53849..d07bac58 100644 --- a/vendor/symfony/var-dumper/Caster/DateCaster.php +++ b/vendor/symfony/var-dumper/Caster/DateCaster.php @@ -27,7 +27,7 @@ class DateCaster public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) { $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); + $location = $d->getTimezone() ? $d->getTimezone()->getLocation() : null; $fromNow = (new \DateTime())->diff($d); $title = $d->format('l, F j, Y') @@ -103,11 +103,11 @@ class DateCaster } $period = sprintf( - 'every %s, from %s (%s) %s', + 'every %s, from %s%s %s', self::formatInterval($p->getDateInterval()), + $p->include_start_date ? '[' : ']', self::formatDateTime($p->getStartDate()), - $p->include_start_date ? 'included' : 'excluded', - ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end) : 'recurring '.$p->recurrences.' time/s' + ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ? ']' : '[') : 'recurring '.$p->recurrences.' time/s' ); $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; diff --git a/vendor/symfony/var-dumper/Caster/IntlCaster.php b/vendor/symfony/var-dumper/Caster/IntlCaster.php index 23b9d5da..1ed91d4d 100644 --- a/vendor/symfony/var-dumper/Caster/IntlCaster.php +++ b/vendor/symfony/var-dumper/Caster/IntlCaster.php @@ -102,7 +102,7 @@ class IntlCaster 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), ] - ), + ), ]; return self::castError($c, $a); diff --git a/vendor/symfony/var-dumper/Caster/LinkStub.php b/vendor/symfony/var-dumper/Caster/LinkStub.php index 7e078033..bd4c796a 100644 --- a/vendor/symfony/var-dumper/Caster/LinkStub.php +++ b/vendor/symfony/var-dumper/Caster/LinkStub.php @@ -23,7 +23,7 @@ class LinkStub extends ConstStub private static $vendorRoots; private static $composerRoots; - public function __construct(string $label, int $line = 0, string $href = null) + public function __construct(string $label, int $line = 0, ?string $href = null) { $this->value = $label; diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php index 274ee0d9..35fd1e8a 100644 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -42,7 +42,7 @@ class ReflectionCaster $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - if (!str_contains($c->name, '{closure}')) { + if (!str_contains($c->name, '{closure')) { $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; unset($a[$prefix.'class']); } @@ -116,10 +116,16 @@ class ReflectionCaster public static function castAttribute(\ReflectionAttribute $c, array $a, Stub $stub, bool $isNested) { - self::addMap($a, $c, [ + $map = [ 'name' => 'getName', 'arguments' => 'getArguments', - ]); + ]; + + if (\PHP_VERSION_ID >= 80400) { + unset($map['name']); + } + + self::addMap($a, $c, $map); return $a; } @@ -197,7 +203,7 @@ class ReflectionCaster self::addMap($a, $c, [ 'returnsReference' => 'returnsReference', 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', + 'class' => \PHP_VERSION_ID >= 80111 ? 'getClosureCalledClass' : 'getClosureScopeClass', 'this' => 'getClosureThis', ]); @@ -292,7 +298,7 @@ class ReflectionCaster if ($c->isOptional()) { try { $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if ($c->isDefaultValueConstant()) { + if ($c->isDefaultValueConstant() && !\is_object($v)) { $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); } if (null === $v) { @@ -362,7 +368,7 @@ class ReflectionCaster if (!$type instanceof \ReflectionNamedType) { $signature .= $type.' '; } else { - if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { + if ($param->allowsNull() && 'mixed' !== $type->getName()) { $signature .= '?'; } $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; diff --git a/vendor/symfony/var-dumper/Caster/SplCaster.php b/vendor/symfony/var-dumper/Caster/SplCaster.php index 07f44511..d7db8f89 100644 --- a/vendor/symfony/var-dumper/Caster/SplCaster.php +++ b/vendor/symfony/var-dumper/Caster/SplCaster.php @@ -229,10 +229,11 @@ class SplCaster $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); $c->setFlags($flags); } - if (\PHP_VERSION_ID < 70400) { - $a[$prefix.'storage'] = $c->getArrayCopy(); - } + + unset($a["\0ArrayObject\0storage"], $a["\0ArrayIterator\0storage"]); + $a += [ + $prefix.'storage' => $c->getArrayCopy(), $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), ]; diff --git a/vendor/symfony/var-dumper/Caster/TraceStub.php b/vendor/symfony/var-dumper/Caster/TraceStub.php index 5eea1c87..d215d8db 100644 --- a/vendor/symfony/var-dumper/Caster/TraceStub.php +++ b/vendor/symfony/var-dumper/Caster/TraceStub.php @@ -25,7 +25,7 @@ class TraceStub extends Stub public $sliceLength; public $numberingOffset; - public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) + public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, ?int $sliceLength = null, int $numberingOffset = 0) { $this->value = $trace; $this->keepArgs = $keepArgs; diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php index f74a61d7..e811fbf7 100644 --- a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php @@ -216,7 +216,7 @@ abstract class AbstractCloner implements ClonerInterface * * @see addCasters */ - public function __construct(array $casters = null) + public function __construct(?array $casters = null) { if (null === $casters) { $casters = static::$defaultCasters; diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php index 0f4de086..66da669d 100644 --- a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -42,10 +42,10 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface * @param string|null $charset The default character encoding to use for non-UTF8 strings * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation */ - public function __construct($output = null, string $charset = null, int $flags = 0) + public function __construct($output = null, ?string $charset = null, int $flags = 0) { $this->flags = $flags; - $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); + $this->setCharset($charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'); $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point']; $this->setOutput($output ?: static::$defaultOutput); if (!$output && \is_string(static::$defaultOutput)) { diff --git a/vendor/symfony/var-dumper/Dumper/CliDumper.php b/vendor/symfony/var-dumper/Dumper/CliDumper.php index d5147b04..3e86e4ab 100644 --- a/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ b/vendor/symfony/var-dumper/Dumper/CliDumper.php @@ -64,7 +64,7 @@ class CliDumper extends AbstractDumper /** * {@inheritdoc} */ - public function __construct($output = null, string $charset = null, int $flags = 0) + public function __construct($output = null, ?string $charset = null, int $flags = 0) { parent::__construct($output, $charset, $flags); @@ -83,7 +83,7 @@ class CliDumper extends AbstractDumper ]); } - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; + $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; } /** @@ -128,6 +128,7 @@ class CliDumper extends AbstractDumper public function dumpScalar(Cursor $cursor, string $type, $value) { $this->dumpKey($cursor); + $this->collapseNextHash = $this->expandNextHash = false; $style = 'const'; $attr = $cursor->attr; @@ -191,6 +192,7 @@ class CliDumper extends AbstractDumper public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) { $this->dumpKey($cursor); + $this->collapseNextHash = $this->expandNextHash = false; $attr = $cursor->attr; if ($bin) { @@ -198,6 +200,9 @@ class CliDumper extends AbstractDumper } if ('' === $str) { $this->line .= '""'; + if ($cut) { + $this->line .= '…'.$cut; + } $this->endValue($cursor); } else { $attr += [ @@ -283,6 +288,7 @@ class CliDumper extends AbstractDumper } $this->dumpKey($cursor); + $this->expandNextHash = false; $attr = $cursor->attr; if ($this->collapseNextHash) { @@ -445,7 +451,8 @@ class CliDumper extends AbstractDumper if (null === $this->handlesHrefGracefully) { $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); + && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100) + && !isset($_SERVER['IDEA_INITIAL_DIRECTORY']); } if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { @@ -557,6 +564,10 @@ class CliDumper extends AbstractDumper */ protected function dumpLine(int $depth, bool $endOfValue = false) { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + if ($this->colors) { $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); } @@ -599,19 +610,30 @@ class CliDumper extends AbstractDumper return false; } - if ('Hyper' === getenv('TERM_PROGRAM')) { + // Detect msysgit/mingw and assume this is a tty because detection + // does not work correctly, see https://github.com/composer/composer/issues/9690 + if (!@stream_isatty($stream) && !\in_array(strtoupper((string) getenv('MSYSTEM')), ['MINGW32', 'MINGW64'], true)) { + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR && @sapi_windows_vt100_support($stream)) { return true; } - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); + if ('Hyper' === getenv('TERM_PROGRAM') + || false !== getenv('COLORTERM') + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + ) { + return true; } - return stream_isatty($stream); + if ('dumb' === $term = (string) getenv('TERM')) { + return false; + } + + // See https://github.com/chalk/supports-color/blob/d4f413efaf8da045c5ab440ed418ef02dbb28bf1/index.js#L157 + return preg_match('/^((screen|xterm|vt100|vt220|putty|rxvt|ansi|cygwin|linux).*)|(.*-256(color)?(-bce)?)$/', $term); } /** diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php index 2e2c8181..dee887ec 100644 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php @@ -30,7 +30,7 @@ final class SourceContextProvider implements ContextProviderInterface private $projectDir; private $fileLinkFormatter; - public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) + public function __construct(?string $charset = null, ?string $projectDir = null, ?FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) { $this->charset = $charset; $this->projectDir = $projectDir; @@ -44,7 +44,7 @@ final class SourceContextProvider implements ContextProviderInterface $file = $trace[1]['file']; $line = $trace[1]['line']; - $name = false; + $name = '-' === $file || 'Standard input code' === $file ? 'Standard input code' : false; $fileExcerpt = false; for ($i = 2; $i < $this->limit; ++$i) { diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index 6be9d30a..55030cfd 100644 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -77,11 +77,11 @@ class HtmlDumper extends CliDumper /** * {@inheritdoc} */ - public function __construct($output = null, string $charset = null, int $flags = 0) + public function __construct($output = null, ?string $charset = null, int $flags = 0) { AbstractDumper::__construct($output, $charset, $flags); $this->dumpId = 'sf-dump-'.mt_rand(); - $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); $this->styles = static::$themes['dark'] ?? self::$themes['dark']; } @@ -167,9 +167,9 @@ var refStyle = doc.createElement('style'), }; refStyle.innerHTML = 'pre.sf-dump .sf-dump-compact, .sf-dump-str-collapse .sf-dump-str-collapse, .sf-dump-str-expand .sf-dump-str-expand { display: none; }'; -(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle); +doc.head.appendChild(refStyle); refStyle = doc.createElement('style'); -(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle); +doc.head.appendChild(refStyle); if (!doc.addEventListener) { addEventListener = function (element, eventName, callback) { @@ -864,7 +864,7 @@ EOHTML } if ('const' === $style && isset($attr['value'])) { - $style .= sprintf(' title="%s"', esc(is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); + $style .= sprintf(' title="%s"', esc(\is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); } elseif ('public' === $style) { $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); } elseif ('str' === $style && 1 < $attr['length']) { @@ -960,7 +960,7 @@ EOHTML } $this->lastDepth = $depth; - $this->line = mb_encode_numericentity($this->line, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8'); + $this->line = mb_encode_numericentity($this->line, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); if (-1 === $depth) { AbstractDumper::dumpLine(0); diff --git a/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/vendor/symfony/var-dumper/Dumper/ServerDumper.php index 94795bf6..b8871b00 100644 --- a/vendor/symfony/var-dumper/Dumper/ServerDumper.php +++ b/vendor/symfony/var-dumper/Dumper/ServerDumper.php @@ -30,7 +30,7 @@ class ServerDumper implements DataDumperInterface * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name */ - public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) + public function __construct(string $host, ?DataDumperInterface $wrappedDumper = null, array $contextProviders = []) { $this->connection = new Connection($host, $contextProviders); $this->wrappedDumper = $wrappedDumper; diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE index a843ec12..29f72d5e 100644 --- a/vendor/symfony/var-dumper/LICENSE +++ b/vendor/symfony/var-dumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2022 Fabien Potencier +Copyright (c) 2014-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/vendor/symfony/var-dumper/Resources/bin/var-dump-server old mode 100755 new mode 100644 index 98c813a0..f398fcef --- a/vendor/symfony/var-dumper/Resources/bin/var-dump-server +++ b/vendor/symfony/var-dumper/Resources/bin/var-dump-server @@ -10,6 +10,10 @@ * file that was distributed with this source code. */ +if ('cli' !== PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + /** * Starts a dump server to collect and output dumps on a single place with multiple formats support. * diff --git a/vendor/symfony/var-dumper/Server/Connection.php b/vendor/symfony/var-dumper/Server/Connection.php index d0611a1f..ebfc6506 100644 --- a/vendor/symfony/var-dumper/Server/Connection.php +++ b/vendor/symfony/var-dumper/Server/Connection.php @@ -91,7 +91,7 @@ class Connection { set_error_handler([self::class, 'nullErrorHandler']); try { - return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); + return stream_socket_client($this->host, $errno, $errstr, 3); } finally { restore_error_handler(); } diff --git a/vendor/symfony/var-dumper/Server/DumpServer.php b/vendor/symfony/var-dumper/Server/DumpServer.php index f9735db7..b006ea12 100644 --- a/vendor/symfony/var-dumper/Server/DumpServer.php +++ b/vendor/symfony/var-dumper/Server/DumpServer.php @@ -32,7 +32,7 @@ class DumpServer */ private $socket; - public function __construct(string $host, LoggerInterface $logger = null) + public function __construct(string $host, ?LoggerInterface $logger = null) { if (!str_contains($host, '://')) { $host = 'tcp://'.$host; diff --git a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php index 33d60c02..5959195c 100644 --- a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php +++ b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -27,7 +27,7 @@ trait VarDumperTestTrait 'flags' => null, ]; - protected function setUpVarDumper(array $casters, int $flags = null): void + protected function setUpVarDumper(array $casters, ?int $flags = null): void { $this->varDumperConfig['casters'] = $casters; $this->varDumperConfig['flags'] = $flags; diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php index a1c63172..9db5811e 100644 --- a/vendor/symfony/var-dumper/VarDumper.php +++ b/vendor/symfony/var-dumper/VarDumper.php @@ -49,7 +49,7 @@ class VarDumper /** * @return callable|null */ - public static function setHandler(callable $callable = null) + public static function setHandler(?callable $callable = null) { $prevHandler = self::$handler; @@ -99,7 +99,7 @@ class VarDumper { $contextProviders = []; - if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && (class_exists(Request::class))) { + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && class_exists(Request::class)) { $requestStack = new RequestStack(); $requestStack->push(Request::createFromGlobals()); $contextProviders['request'] = new RequestContextProvider($requestStack); diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json index dc46f58d..ea46a72b 100644 --- a/vendor/symfony/var-dumper/composer.json +++ b/vendor/symfony/var-dumper/composer.json @@ -23,12 +23,12 @@ "require-dev": { "ext-iconv": "*", "symfony/console": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", "symfony/process": "^4.4|^5.0|^6.0", "symfony/uid": "^5.1|^6.0", "twig/twig": "^2.13|^3.0.4" }, "conflict": { - "phpunit/phpunit": "<5.4.3", "symfony/console": "<4.4" }, "suggest": { diff --git a/vendor/theseer/tokenizer/.php_cs.dist b/vendor/theseer/tokenizer/.php_cs.dist deleted file mode 100644 index 8ac26d09..00000000 --- a/vendor/theseer/tokenizer/.php_cs.dist +++ /dev/null @@ -1,213 +0,0 @@ -registerCustomFixers([ - new \PharIo\CSFixer\PhpdocSingleLineVarFixer() - ]) - ->setRiskyAllowed(true) - ->setRules( - [ - 'PharIo/phpdoc_single_line_var_fixer' => true, - - 'align_multiline_comment' => true, - 'array_indentation' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'operators' => [ - '=' => 'align_single_space_minimal', - '=>' => 'align', - ], - ], - 'blank_line_after_namespace' => true, - 'blank_line_after_opening_tag' => false, - 'blank_line_before_statement' => [ - 'statements' => [ - 'break', - 'continue', - 'declare', - 'do', - 'for', - 'foreach', - 'if', - 'include', - 'include_once', - 'require', - 'require_once', - 'return', - 'switch', - 'throw', - 'try', - 'while', - 'yield', - ], - ], - 'braces' => [ - 'allow_single_line_closure' => false, - 'position_after_anonymous_constructs' => 'same', - 'position_after_control_structures' => 'same', - 'position_after_functions_and_oop_constructs' => 'same' - ], - 'cast_spaces' => ['space' => 'none'], - - // This fixer removes the blank line at class start, no way to disable that, so we disable the fixer :( - //'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], - - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'date_time_immutable' => true, - 'declare_equal_normalize' => ['space' => 'single'], - 'declare_strict_types' => true, - 'dir_constant' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'fully_qualified_strict_types' => true, - 'function_declaration' => [ - 'closure_function_spacing' => 'one' - ], - 'header_comment' => false, - 'indentation_type' => true, - 'is_null' => true, - 'line_ending' => true, - 'list_syntax' => ['syntax' => 'short'], - 'logical_operators' => true, - 'lowercase_cast' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'lowercase_static_reference' => true, - 'magic_constant_casing' => true, - 'method_argument_space' => ['ensure_fully_multiline' => true], - 'modernize_types_casting' => true, - 'multiline_comment_opening_closing' => true, - 'multiline_whitespace_before_semicolons' => true, - 'native_constant_invocation' => true, - 'native_function_casing' => true, - 'native_function_invocation' => true, - 'new_with_braces' => false, - 'no_alias_functions' => true, - 'no_alternative_syntax' => true, - 'no_blank_lines_after_class_opening' => false, - 'no_blank_lines_after_phpdoc' => true, - 'no_blank_lines_before_namespace' => true, - 'no_closing_tag' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_homoglyph_names' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => ['use' => 'print'], - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_null_property_initialization' => true, - 'no_php4_constructor' => true, - 'no_short_bool_cast' => true, - 'no_short_echo_tag' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'no_unneeded_control_parentheses' => false, - 'no_unneeded_curly_braces' => false, - 'no_unneeded_final_method' => true, - 'no_unreachable_default_argument_value' => true, - 'no_unset_on_property' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, - 'ordered_class_elements' => [ - 'order' => [ - 'use_trait', - 'constant_public', - 'constant_protected', - 'constant_private', - 'property_public_static', - 'property_protected_static', - 'property_private_static', - 'property_public', - 'property_protected', - 'property_private', - 'method_public_static', - 'construct', - 'destruct', - 'magic', - 'phpunit', - 'method_public', - 'method_protected', - 'method_private', - 'method_protected_static', - 'method_private_static', - ], - ], - 'ordered_imports' => true, - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_align' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_order' => true, - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_to_comment' => false, - 'phpdoc_trim' => true, - 'phpdoc_trim_consecutive_blank_line_separation' => true, - 'phpdoc_types' => ['groups' => ['simple', 'meta']], - 'phpdoc_types_order' => true, - 'phpdoc_to_return_type' => true, - 'phpdoc_var_without_name' => true, - 'pow_to_exponentiation' => true, - 'protected_to_private' => true, - 'return_assignment' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'self_accessor' => false, - 'semicolon_after_instruction' => true, - 'set_type_to_cast' => true, - 'short_scalar_cast' => true, - 'simplified_null_return' => true, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_to_null_coalescing' => true, - 'trailing_comma_in_multiline_array' => false, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'visibility_required' => [ - 'elements' => [ - 'const', - 'method', - 'property', - ], - ], - 'void_return' => true, - 'whitespace_after_comma_in_array' => true, - 'yoda_style' => false - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') - ->notName('*.phpt') - ->notName('autoload.php') - ); diff --git a/vendor/theseer/tokenizer/CHANGELOG.md b/vendor/theseer/tokenizer/CHANGELOG.md index 1eff3830..d867649f 100644 --- a/vendor/theseer/tokenizer/CHANGELOG.md +++ b/vendor/theseer/tokenizer/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to Tokenizer are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [1.2.3] - 2024-03-03 + +### Changed + +* Do not use implicitly nullable parameters + +## [1.2.2] - 2023-11-20 + +### Fixed + +* [#18](https://github.com/theseer/tokenizer/issues/18): Tokenizer fails on protobuf metadata files + ## [1.2.1] - 2021-07-28 @@ -64,6 +76,10 @@ This release is now PHP 8.0 compliant. Initial Release +[1.2.3]: https://github.com/theseer/tokenizer/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/theseer/tokenizer/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/theseer/tokenizer/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/theseer/tokenizer/compare/1.1.3...1.2.0 [1.1.3]: https://github.com/theseer/tokenizer/compare/1.1.2...1.1.3 [1.1.2]: https://github.com/theseer/tokenizer/compare/1.1.1...1.1.2 [1.1.1]: https://github.com/theseer/tokenizer/compare/1.1.0...1.1.1 diff --git a/vendor/theseer/tokenizer/README.md b/vendor/theseer/tokenizer/README.md index e91ed891..a5f891b4 100644 --- a/vendor/theseer/tokenizer/README.md +++ b/vendor/theseer/tokenizer/README.md @@ -3,9 +3,6 @@ A small library for converting tokenized PHP source code into XML. [![Test](https://github.com/theseer/tokenizer/actions/workflows/ci.yml/badge.svg)](https://github.com/theseer/tokenizer/actions/workflows/ci.yml) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/theseer/tokenizer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/theseer/tokenizer/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/theseer/tokenizer/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/theseer/tokenizer/?branch=master) -[![Build Status](https://scrutinizer-ci.com/g/theseer/tokenizer/badges/build.png?b=master)](https://scrutinizer-ci.com/g/theseer/tokenizer/build-status/master) ## Installation diff --git a/vendor/theseer/tokenizer/src/Tokenizer.php b/vendor/theseer/tokenizer/src/Tokenizer.php index f582d958..2dc79fea 100644 --- a/vendor/theseer/tokenizer/src/Tokenizer.php +++ b/vendor/theseer/tokenizer/src/Tokenizer.php @@ -70,6 +70,18 @@ class Tokenizer { $line = $tok[2]; $values = \preg_split('/\R+/Uu', $tok[1]); + if (!$values) { + $result->addToken( + new Token( + $line, + \token_name($tok[0]), + '{binary data}' + ) + ); + + continue; + } + foreach ($values as $v) { $token = new Token( $line, @@ -100,13 +112,6 @@ class Tokenizer { $final = new TokenCollection(); foreach ($tokens as $token) { - if ($prev === null) { - $final->addToken($token); - $prev = $token; - - continue; - } - $gap = $token->getLine() - $prev->getLine(); while ($gap > 1) { diff --git a/vendor/theseer/tokenizer/src/XMLSerializer.php b/vendor/theseer/tokenizer/src/XMLSerializer.php index e67a7fe8..518bfb06 100644 --- a/vendor/theseer/tokenizer/src/XMLSerializer.php +++ b/vendor/theseer/tokenizer/src/XMLSerializer.php @@ -19,7 +19,7 @@ class XMLSerializer { * * @param NamespaceUri $xmlns */ - public function __construct(NamespaceUri $xmlns = null) { + public function __construct(?NamespaceUri $xmlns = null) { if ($xmlns === null) { $xmlns = new NamespaceUri('https://github.com/theseer/tokenizer'); } diff --git a/vendor/tijsverkoyen/css-to-inline-styles/.github/workflows/ci.yml b/vendor/tijsverkoyen/css-to-inline-styles/.github/workflows/ci.yml deleted file mode 100644 index 3171c010..00000000 --- a/vendor/tijsverkoyen/css-to-inline-styles/.github/workflows/ci.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: CI - -on: - push: - branches: - - master - pull_request: ~ - -jobs: - check_composer: - name: Check composer.json - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - coverage: none - php-version: '8.0' - - run: composer validate --strict --no-check-lock - - tests: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php: [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] - composer_flags: [ '' ] - include: - - php: '5.5' - composer_flags: '--prefer-lowest' - - php: '7.0' - composer_flags: '--prefer-lowest' - - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - - name: Install dependencies - run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }} - - name: Run tests - run: vendor/bin/phpunit -v --colors=always --coverage-clover=coverage.clover - - name: Upload code coverage - continue-on-error: true - run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover - diff --git a/vendor/tijsverkoyen/css-to-inline-styles/composer.json b/vendor/tijsverkoyen/css-to-inline-styles/composer.json index 828f0c4a..055ba410 100644 --- a/vendor/tijsverkoyen/css-to-inline-styles/composer.json +++ b/vendor/tijsverkoyen/css-to-inline-styles/composer.json @@ -15,7 +15,7 @@ "php": "^5.5 || ^7.0 || ^8.0", "ext-dom": "*", "ext-libxml": "*", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" diff --git a/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php b/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php index 3268c5f2..e40ae25d 100644 --- a/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php +++ b/vendor/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php @@ -113,7 +113,7 @@ class CssToInlineStyles { $document = new \DOMDocument('1.0', 'UTF-8'); $internalErrors = libxml_use_internal_errors(true); - $document->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); + $document->loadHTML(mb_encode_numericentity($html, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8')); libxml_use_internal_errors($internalErrors); $document->formatOutput = true; diff --git a/vendor/vlucas/phpdotenv/composer.json b/vendor/vlucas/phpdotenv/composer.json index a30f9c04..10bc27a1 100644 --- a/vendor/vlucas/phpdotenv/composer.json +++ b/vendor/vlucas/phpdotenv/composer.json @@ -24,7 +24,7 @@ "ext-filter": "*", "ext-pcre": "*", "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30" }, "autoload": { "psr-4": { @@ -41,11 +41,18 @@ "ext-pcre": "Required to use most of the library." }, "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, "preferred-install": "dist" }, "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/vlucas/phpdotenv/src/Loader/Lines.php b/vendor/vlucas/phpdotenv/src/Loader/Lines.php index 89d9c34b..688c5d35 100644 --- a/vendor/vlucas/phpdotenv/src/Loader/Lines.php +++ b/vendor/vlucas/phpdotenv/src/Loader/Lines.php @@ -41,15 +41,17 @@ class Lines */ private static function multilineProcess($multiline, $line, array $buffer) { + $startsOnCurrentLine = $multiline ? false : self::looksLikeMultilineStart($line); + // check if $line can be multiline variable - if ($started = self::looksLikeMultilineStart($line)) { + if ($startsOnCurrentLine) { $multiline = true; } if ($multiline) { array_push($buffer, $line); - if (self::looksLikeMultilineStop($line, $started)) { + if (self::looksLikeMultilineStop($line, $startsOnCurrentLine)) { $multiline = false; $line = implode("\n", $buffer); $buffer = []; diff --git a/vendor/vlucas/phpdotenv/src/Regex/Regex.php b/vendor/vlucas/phpdotenv/src/Regex/Regex.php index 2b322ab0..5cf0e28d 100644 --- a/vendor/vlucas/phpdotenv/src/Regex/Regex.php +++ b/vendor/vlucas/phpdotenv/src/Regex/Regex.php @@ -88,9 +88,11 @@ class Regex $result = $operation($subject); if (($e = preg_last_error()) !== PREG_NO_ERROR) { + /** @var Result */ return Error::create(self::lookupError($e)); } + /** @var Result */ return Success::create($result); } diff --git a/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php b/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php index 57c7b432..04994e06 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php +++ b/vendor/vlucas/phpdotenv/src/Repository/AbstractRepository.php @@ -46,8 +46,8 @@ abstract class AbstractRepository implements RepositoryInterface */ public function get($name) { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); + if (!is_string($name) || '' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); } return $this->getInternal($name); @@ -56,7 +56,7 @@ abstract class AbstractRepository implements RepositoryInterface /** * Get an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return string|null */ @@ -74,8 +74,8 @@ abstract class AbstractRepository implements RepositoryInterface */ public function set($name, $value = null) { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); + if (!is_string($name) || '' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); } // Don't overwrite existing environment variables if we're immutable @@ -91,8 +91,8 @@ abstract class AbstractRepository implements RepositoryInterface /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -109,8 +109,8 @@ abstract class AbstractRepository implements RepositoryInterface */ public function clear($name) { - if (!is_string($name)) { - throw new InvalidArgumentException('Expected name to be a string.'); + if (!is_string($name) || '' === $name) { + throw new InvalidArgumentException('Expected name to be a non-empty string.'); } // Don't clear anything if we're immutable. @@ -124,7 +124,7 @@ abstract class AbstractRepository implements RepositoryInterface /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ @@ -139,7 +139,7 @@ abstract class AbstractRepository implements RepositoryInterface */ public function has($name) { - return is_string($name) && $this->get($name) !== null; + return is_string($name) && $name !== '' && $this->get($name) !== null; } /** diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php index 73ce87d1..4c95d315 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php @@ -24,7 +24,7 @@ class ApacheAdapter implements AvailabilityInterface, ReaderInterface, WriterInt * This is intentionally not implemented, since this adapter exists only as * a means to overwrite existing apache environment variables. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ @@ -38,22 +38,24 @@ class ApacheAdapter implements AvailabilityInterface, ReaderInterface, WriterInt * * Only if an existing apache variable exists do we overwrite it. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ public function set($name, $value = null) { - if (apache_getenv($name) !== false) { - apache_setenv($name, (string) $value); + if (apache_getenv($name) === false) { + return; } + + apache_setenv($name, (string) $value); } /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php index dc234aa6..58e4958c 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php @@ -10,7 +10,7 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte /** * The variables and their values. * - * @var array + * @var array */ private $variables = []; @@ -27,24 +27,24 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte /** * Get an environment variable, if it exists. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ public function get($name) { - if (array_key_exists($name, $this->variables)) { - return Some::create($this->variables[$name]); + if (!array_key_exists($name, $this->variables)) { + return None::create(); } - return None::create(); + return Some::create($this->variables[$name]); } /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -56,7 +56,7 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php index 41bfc67b..858e5e25 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php @@ -20,14 +20,26 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI /** * Get an environment variable, if it exists. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ public function get($name) { - if (array_key_exists($name, $_ENV)) { - return Some::create($_ENV[$name]); + if (!array_key_exists($name, $_ENV)) { + return None::create(); + } + + $value = $_ENV[$name]; + + if (is_scalar($value)) { + /** @var \PhpOption\Option */ + return Some::create((string) $value); + } + + if (null === $value) { + /** @var \PhpOption\Option */ + return Some::create(null); } return None::create(); @@ -36,8 +48,8 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -49,7 +61,7 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php index 766afd3b..a824a50c 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php @@ -19,7 +19,7 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt /** * Get an environment variable, if it exists. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ @@ -32,8 +32,8 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -45,7 +45,7 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php index 90a1fabe..008eed1c 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php @@ -7,7 +7,7 @@ interface ReaderInterface extends AvailabilityInterface /** * Get an environment variable, if it exists. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php index 529df96f..3189f3b7 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php @@ -20,14 +20,26 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ /** * Get an environment variable, if it exists. * - * @param string $name + * @param non-empty-string $name * * @return \PhpOption\Option */ public function get($name) { - if (array_key_exists($name, $_SERVER)) { - return Some::create($_SERVER[$name]); + if (!array_key_exists($name, $_SERVER)) { + return None::create(); + } + + $value = $_SERVER[$name]; + + if (is_scalar($value)) { + /** @var \PhpOption\Option */ + return Some::create((string) $value); + } + + if (null === $value) { + /** @var \PhpOption\Option */ + return Some::create(null); } return None::create(); @@ -36,8 +48,8 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -49,7 +61,7 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php b/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php index 6670b728..968aeeae 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php +++ b/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php @@ -7,8 +7,8 @@ interface WriterInterface extends AvailabilityInterface /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -17,7 +17,7 @@ interface WriterInterface extends AvailabilityInterface /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php b/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php index e1b6bccd..d997c9ac 100644 --- a/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php +++ b/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php @@ -39,7 +39,7 @@ class AdapterRepository extends AbstractRepository * * We do this by querying our readers sequentially. * - * @param string $name + * @param non-empty-string $name * * @return string|null */ @@ -58,8 +58,8 @@ class AdapterRepository extends AbstractRepository /** * Set an environment variable. * - * @param string $name - * @param string|null $value + * @param non-empty-string $name + * @param string|null $value * * @return void */ @@ -73,7 +73,7 @@ class AdapterRepository extends AbstractRepository /** * Clear an environment variable. * - * @param string $name + * @param non-empty-string $name * * @return void */ diff --git a/vendor/webmozart/assert/.editorconfig b/vendor/webmozart/assert/.editorconfig deleted file mode 100644 index 384453bf..00000000 --- a/vendor/webmozart/assert/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -charset=utf-8 -end_of_line=lf -trim_trailing_whitespace=true -insert_final_newline=true -indent_style=space -indent_size=4 - -[*.yml] -indent_size=2 diff --git a/vendor/webmozart/assert/.github/workflows/ci.yaml b/vendor/webmozart/assert/.github/workflows/ci.yaml deleted file mode 100644 index 636fc5ab..00000000 --- a/vendor/webmozart/assert/.github/workflows/ci.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# https://docs.github.com/en/actions - -name: "CI" - -on: - pull_request: ~ - push: - branches: - - "master" - -env: - COMPOSER_ROOT_VERSION: 1.99 - -jobs: - coding-standards: - name: "Coding Standards" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - tools: "composer-normalize" - - - name: "Validate composer.json" - run: "composer validate --strict" - - - name: "Normalize composer.json" - run: "composer-normalize --dry-run" - - - name: "PHP-CS-Fixer" - uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0" - with: - args: "--dry-run --diff-format udiff" - - static-code-analysis: - name: "Static Code Analysis" - - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "7.4" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress && composer i --working-dir=ci" - - - name: "Run vimeo/psalm" - run: "ci/vendor/bin/psalm --threads=4" - - tests: - name: "Tests" - - runs-on: "ubuntu-latest" - - strategy: - matrix: - php-version: - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit" - - windows-tests: - name: "Windows tests" - - runs-on: "windows-latest" - - strategy: - matrix: - php-version: - - "7.4" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2.3.4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@2.9.0" - with: - coverage: "none" - extensions: "mbstring" - php-version: "${{ matrix.php-version }}" - - - name: "Install dependencies with composer" - run: "composer update --no-interaction --no-progress" - - - name: "Run unit tests" - run: "vendor/bin/phpunit tests/AssertTest.php" diff --git a/vendor/webmozart/assert/.php_cs b/vendor/webmozart/assert/.php_cs deleted file mode 100644 index f7afd3ed..00000000 --- a/vendor/webmozart/assert/.php_cs +++ /dev/null @@ -1,24 +0,0 @@ -in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules([ - '@PSR2' => true, - '@Symfony' => true, - 'ordered_imports' => true, - 'array_syntax' => ['syntax' => 'long'], - 'no_superfluous_phpdoc_tags' => false, - 'phpdoc_annotation_without_dot' => false, - 'phpdoc_types_order' => false, - 'phpdoc_summary' => false, - 'phpdoc_to_comment' => false, - 'phpdoc_align' => false, - 'yoda_style' => false, - ]) - ->setFinder($finder) -; diff --git a/vendor/webmozart/assert/CHANGELOG.md b/vendor/webmozart/assert/CHANGELOG.md deleted file mode 100644 index 8629248b..00000000 --- a/vendor/webmozart/assert/CHANGELOG.md +++ /dev/null @@ -1,190 +0,0 @@ -Changelog -========= - -## UNRELEASED - -## 1.10.0 - -### Added - -* On invalid assertion, we throw a `Webmozart\Assert\InvalidArgumentException` -* Added `Assert::positiveInteger()` - -### Changed - -* Using a trait with real implementations of `all*()` and `nullOr*()` methods to improve psalm compatibility. - -### Removed - -* Support for PHP <7.2 - -## 1.9.1 - -## Fixed - -* provisional support for PHP 8.0 - -## 1.9.0 - -* added better Psalm support for `all*` & `nullOr*` methods -* These methods are now understood by Psalm through a mixin. You may need a newer version of Psalm in order to use this -* added `@psalm-pure` annotation to `Assert::notFalse()` -* added more `@psalm-assert` annotations where appropriate - -## Changed - -* the `all*` & `nullOr*` methods are now declared on an interface, instead of `@method` annotations. -This interface is linked to the `Assert` class with a `@mixin` annotation. Most IDE's have supported this -for a long time, and you should not lose any autocompletion capabilities. PHPStan has supported this since -version `0.12.20`. This package is marked incompatible (with a composer conflict) with phpstan version prior to that. -If you do not use PHPStan than this does not matter. - -## 1.8.0 - -### Added - -* added `Assert::notStartsWith()` -* added `Assert::notEndsWith()` -* added `Assert::inArray()` -* added `@psalm-pure` annotations to pure assertions - -### Fixed - -* Exception messages of comparisons between `DateTime(Immutable)` objects now display their date & time. -* Custom Exception messages for `Assert::count()` now use the values to render the exception message. - -## 1.7.0 (2020-02-14) - -### Added - -* added `Assert::notFalse()` -* added `Assert::isAOf()` -* added `Assert::isAnyOf()` -* added `Assert::isNotA()` - -## 1.6.0 (2019-11-24) - -### Added - -* added `Assert::validArrayKey()` -* added `Assert::isNonEmptyList()` -* added `Assert::isNonEmptyMap()` -* added `@throws InvalidArgumentException` annotations to all methods that throw. -* added `@psalm-assert` for the list type to the `isList` assertion. - -### Fixed - -* `ResourceBundle` & `SimpleXMLElement` now pass the `isCountable` assertions. -They are countable, without implementing the `Countable` interface. -* The doc block of `range` now has the proper variables. -* An empty array will now pass `isList` and `isMap`. As it is a valid form of both. -If a non-empty variant is needed, use `isNonEmptyList` or `isNonEmptyMap`. - -### Changed - -* Removed some `@psalm-assert` annotations, that were 'side effect' assertions See: - * [#144](https://github.com/webmozart/assert/pull/144) - * [#145](https://github.com/webmozart/assert/issues/145) - * [#146](https://github.com/webmozart/assert/pull/146) - * [#150](https://github.com/webmozart/assert/pull/150) -* If you use Psalm, the minimum version needed is `3.6.0`. Which is enforced through a composer conflict. -If you don't use Psalm, then this has no impact. - -## 1.5.0 (2019-08-24) - -### Added - -* added `Assert::uniqueValues()` -* added `Assert::unicodeLetters()` -* added: `Assert::email()` -* added support for [Psalm](https://github.com/vimeo/psalm), by adding `@psalm-assert` annotations where appropriate. - -### Fixed - -* `Assert::endsWith()` would not give the correct result when dealing with a multibyte suffix. -* `Assert::length(), minLength, maxLength, lengthBetween` would not give the correct result when dealing with multibyte characters. - -**NOTE**: These 2 changes may break your assertions if you relied on the fact that multibyte characters didn't behave correctly. - -### Changed - -* The names of some variables have been updated to better reflect what they are. -* All function calls are now in their FQN form, slightly increasing performance. -* Tests are now properly ran against HHVM-3.30 and PHP nightly. - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - * This was already done in 1.3.0, but it was only done through a silenced `trigger_error`. It is now annotated as well. - -## 1.4.0 (2018-12-25) - -### Added - -* added `Assert::ip()` -* added `Assert::ipv4()` -* added `Assert::ipv6()` -* added `Assert::notRegex()` -* added `Assert::interfaceExists()` -* added `Assert::isList()` -* added `Assert::isMap()` -* added polyfill for ctype - -### Fixed - -* Special case when comparing objects implementing `__toString()` - -## 1.3.0 (2018-01-29) - -### Added - -* added `Assert::minCount()` -* added `Assert::maxCount()` -* added `Assert::countBetween()` -* added `Assert::isCountable()` -* added `Assert::notWhitespaceOnly()` -* added `Assert::natural()` -* added `Assert::notContains()` -* added `Assert::isArrayAccessible()` -* added `Assert::isInstanceOfAny()` -* added `Assert::isIterable()` - -### Fixed - -* `stringNotEmpty` will no longer report "0" is an empty string - -### Deprecation - -* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` - -## 1.2.0 (2016-11-23) - - * added `Assert::throws()` - * added `Assert::count()` - * added extension point `Assert::reportInvalidArgument()` for custom subclasses - -## 1.1.0 (2016-08-09) - - * added `Assert::object()` - * added `Assert::propertyExists()` - * added `Assert::propertyNotExists()` - * added `Assert::methodExists()` - * added `Assert::methodNotExists()` - * added `Assert::uuid()` - -## 1.0.2 (2015-08-24) - - * integrated Style CI - * add tests for minimum package dependencies on Travis CI - -## 1.0.1 (2015-05-12) - - * added support for PHP 5.3.3 - -## 1.0.0 (2015-05-12) - - * first stable release - -## 1.0.0-beta (2015-03-19) - - * first beta release diff --git a/vendor/webmozart/assert/LICENSE b/vendor/webmozart/assert/LICENSE deleted file mode 100644 index 9e2e3075..00000000 --- a/vendor/webmozart/assert/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Bernhard Schussek - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/webmozart/assert/README.md b/vendor/webmozart/assert/README.md deleted file mode 100644 index b85d5981..00000000 --- a/vendor/webmozart/assert/README.md +++ /dev/null @@ -1,287 +0,0 @@ -Webmozart Assert -================ - -[![Latest Stable Version](https://poser.pugx.org/webmozart/assert/v/stable.svg)](https://packagist.org/packages/webmozart/assert) -[![Total Downloads](https://poser.pugx.org/webmozart/assert/downloads.svg)](https://packagist.org/packages/webmozart/assert) - -This library contains efficient assertions to test the input and output of -your methods. With these assertions, you can greatly reduce the amount of coding -needed to write a safe implementation. - -All assertions in the [`Assert`] class throw an `Webmozart\Assert\InvalidArgumentException` if -they fail. - -FAQ ---- - -**What's the difference to [beberlei/assert]?** - -This library is heavily inspired by Benjamin Eberlei's wonderful [assert package], -but fixes a usability issue with error messages that can't be fixed there without -breaking backwards compatibility. - -This package features usable error messages by default. However, you can also -easily write custom error messages: - -``` -Assert::string($path, 'The path is expected to be a string. Got: %s'); -``` - -In [beberlei/assert], the ordering of the `%s` placeholders is different for -every assertion. This package, on the contrary, provides consistent placeholder -ordering for all assertions: - -* `%s`: The tested value as string, e.g. `"/foo/bar"`. -* `%2$s`, `%3$s`, ...: Additional assertion-specific values, e.g. the - minimum/maximum length, allowed values, etc. - -Check the source code of the assertions to find out details about the additional -available placeholders. - -Installation ------------- - -Use [Composer] to install the package: - -``` -$ composer require webmozart/assert -``` - -Example -------- - -```php -use Webmozart\Assert\Assert; - -class Employee -{ - public function __construct($id) - { - Assert::integer($id, 'The employee ID must be an integer. Got: %s'); - Assert::greaterThan($id, 0, 'The employee ID must be a positive integer. Got: %s'); - } -} -``` - -If you create an employee with an invalid ID, an exception is thrown: - -```php -new Employee('foobar'); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be an integer. Got: string - -new Employee(-10); -// => Webmozart\Assert\InvalidArgumentException: -// The employee ID must be a positive integer. Got: -10 -``` - -Assertions ----------- - -The [`Assert`] class provides the following assertions: - -### Type Assertions - -Method | Description --------------------------------------------------------- | -------------------------------------------------- -`string($value, $message = '')` | Check that a value is a string -`stringNotEmpty($value, $message = '')` | Check that a value is a non-empty string -`integer($value, $message = '')` | Check that a value is an integer -`integerish($value, $message = '')` | Check that a value casts to an integer -`positiveInteger($value, $message = '')` | Check that a value is a positive (non-zero) integer -`float($value, $message = '')` | Check that a value is a float -`numeric($value, $message = '')` | Check that a value is numeric -`natural($value, $message= ''')` | Check that a value is a non-negative integer -`boolean($value, $message = '')` | Check that a value is a boolean -`scalar($value, $message = '')` | Check that a value is a scalar -`object($value, $message = '')` | Check that a value is an object -`resource($value, $type = null, $message = '')` | Check that a value is a resource -`isCallable($value, $message = '')` | Check that a value is a callable -`isArray($value, $message = '')` | Check that a value is an array -`isTraversable($value, $message = '')` (deprecated) | Check that a value is an array or a `\Traversable` -`isIterable($value, $message = '')` | Check that a value is an array or a `\Traversable` -`isCountable($value, $message = '')` | Check that a value is an array or a `\Countable` -`isInstanceOf($value, $class, $message = '')` | Check that a value is an `instanceof` a class -`isInstanceOfAny($value, array $classes, $message = '')` | Check that a value is an `instanceof` at least one class on the array of classes -`notInstanceOf($value, $class, $message = '')` | Check that a value is not an `instanceof` a class -`isAOf($value, $class, $message = '')` | Check that a value is of the class or has one of its parents -`isAnyOf($value, array $classes, $message = '')` | Check that a value is of at least one of the classes or has one of its parents -`isNotA($value, $class, $message = '')` | Check that a value is not of the class or has not one of its parents -`isArrayAccessible($value, $message = '')` | Check that a value can be accessed as an array -`uniqueValues($values, $message = '')` | Check that the given array contains unique values - -### Comparison Assertions - -Method | Description ------------------------------------------------ | ------------------------------------------------------------------ -`true($value, $message = '')` | Check that a value is `true` -`false($value, $message = '')` | Check that a value is `false` -`notFalse($value, $message = '')` | Check that a value is not `false` -`null($value, $message = '')` | Check that a value is `null` -`notNull($value, $message = '')` | Check that a value is not `null` -`isEmpty($value, $message = '')` | Check that a value is `empty()` -`notEmpty($value, $message = '')` | Check that a value is not `empty()` -`eq($value, $value2, $message = '')` | Check that a value equals another (`==`) -`notEq($value, $value2, $message = '')` | Check that a value does not equal another (`!=`) -`same($value, $value2, $message = '')` | Check that a value is identical to another (`===`) -`notSame($value, $value2, $message = '')` | Check that a value is not identical to another (`!==`) -`greaterThan($value, $value2, $message = '')` | Check that a value is greater than another -`greaterThanEq($value, $value2, $message = '')` | Check that a value is greater than or equal to another -`lessThan($value, $value2, $message = '')` | Check that a value is less than another -`lessThanEq($value, $value2, $message = '')` | Check that a value is less than or equal to another -`range($value, $min, $max, $message = '')` | Check that a value is within a range -`inArray($value, array $values, $message = '')` | Check that a value is one of a list of values -`oneOf($value, array $values, $message = '')` | Check that a value is one of a list of values (alias of `inArray`) - -### String Assertions - -You should check that a value is a string with `Assert::string()` before making -any of the following assertions. - -Method | Description ---------------------------------------------------- | ----------------------------------------------------------------- -`contains($value, $subString, $message = '')` | Check that a string contains a substring -`notContains($value, $subString, $message = '')` | Check that a string does not contain a substring -`startsWith($value, $prefix, $message = '')` | Check that a string has a prefix -`notStartsWith($value, $prefix, $message = '')` | Check that a string does not have a prefix -`startsWithLetter($value, $message = '')` | Check that a string starts with a letter -`endsWith($value, $suffix, $message = '')` | Check that a string has a suffix -`notEndsWith($value, $suffix, $message = '')` | Check that a string does not have a suffix -`regex($value, $pattern, $message = '')` | Check that a string matches a regular expression -`notRegex($value, $pattern, $message = '')` | Check that a string does not match a regular expression -`unicodeLetters($value, $message = '')` | Check that a string contains Unicode letters only -`alpha($value, $message = '')` | Check that a string contains letters only -`digits($value, $message = '')` | Check that a string contains digits only -`alnum($value, $message = '')` | Check that a string contains letters and digits only -`lower($value, $message = '')` | Check that a string contains lowercase characters only -`upper($value, $message = '')` | Check that a string contains uppercase characters only -`length($value, $length, $message = '')` | Check that a string has a certain number of characters -`minLength($value, $min, $message = '')` | Check that a string has at least a certain number of characters -`maxLength($value, $max, $message = '')` | Check that a string has at most a certain number of characters -`lengthBetween($value, $min, $max, $message = '')` | Check that a string has a length in the given range -`uuid($value, $message = '')` | Check that a string is a valid UUID -`ip($value, $message = '')` | Check that a string is a valid IP (either IPv4 or IPv6) -`ipv4($value, $message = '')` | Check that a string is a valid IPv4 -`ipv6($value, $message = '')` | Check that a string is a valid IPv6 -`email($value, $message = '')` | Check that a string is a valid e-mail address -`notWhitespaceOnly($value, $message = '')` | Check that a string contains at least one non-whitespace character - -### File Assertions - -Method | Description ------------------------------------ | -------------------------------------------------- -`fileExists($value, $message = '')` | Check that a value is an existing path -`file($value, $message = '')` | Check that a value is an existing file -`directory($value, $message = '')` | Check that a value is an existing directory -`readable($value, $message = '')` | Check that a value is a readable path -`writable($value, $message = '')` | Check that a value is a writable path - -### Object Assertions - -Method | Description ------------------------------------------------------ | -------------------------------------------------- -`classExists($value, $message = '')` | Check that a value is an existing class name -`subclassOf($value, $class, $message = '')` | Check that a class is a subclass of another -`interfaceExists($value, $message = '')` | Check that a value is an existing interface name -`implementsInterface($value, $class, $message = '')` | Check that a class implements an interface -`propertyExists($value, $property, $message = '')` | Check that a property exists in a class/object -`propertyNotExists($value, $property, $message = '')` | Check that a property does not exist in a class/object -`methodExists($value, $method, $message = '')` | Check that a method exists in a class/object -`methodNotExists($value, $method, $message = '')` | Check that a method does not exist in a class/object - -### Array Assertions - -Method | Description --------------------------------------------------- | ------------------------------------------------------------------ -`keyExists($array, $key, $message = '')` | Check that a key exists in an array -`keyNotExists($array, $key, $message = '')` | Check that a key does not exist in an array -`validArrayKey($key, $message = '')` | Check that a value is a valid array key (int or string) -`count($array, $number, $message = '')` | Check that an array contains a specific number of elements -`minCount($array, $min, $message = '')` | Check that an array contains at least a certain number of elements -`maxCount($array, $max, $message = '')` | Check that an array contains at most a certain number of elements -`countBetween($array, $min, $max, $message = '')` | Check that an array has a count in the given range -`isList($array, $message = '')` | Check that an array is a non-associative list -`isNonEmptyList($array, $message = '')` | Check that an array is a non-associative list, and not empty -`isMap($array, $message = '')` | Check that an array is associative and has strings as keys -`isNonEmptyMap($array, $message = '')` | Check that an array is associative and has strings as keys, and is not empty - -### Function Assertions - -Method | Description -------------------------------------------- | ----------------------------------------------------------------------------------------------------- -`throws($closure, $class, $message = '')` | Check that a function throws a certain exception. Subclasses of the exception class will be accepted. - -### Collection Assertions - -All of the above assertions can be prefixed with `all*()` to test the contents -of an array or a `\Traversable`: - -```php -Assert::allIsInstanceOf($employees, 'Acme\Employee'); -``` - -### Nullable Assertions - -All of the above assertions can be prefixed with `nullOr*()` to run the -assertion only if it the value is not `null`: - -```php -Assert::nullOrString($middleName, 'The middle name must be a string or null. Got: %s'); -``` - -### Extending Assert - -The `Assert` class comes with a few methods, which can be overridden to change the class behaviour. You can also extend it to -add your own assertions. - -#### Overriding methods - -Overriding the following methods in your assertion class allows you to change the behaviour of the assertions: - -* `public static function __callStatic($name, $arguments)` - * This method is used to 'create' the `nullOr` and `all` versions of the assertions. -* `protected static function valueToString($value)` - * This method is used for error messages, to convert the value to a string value for displaying. You could use this for representing a value object with a `__toString` method for example. -* `protected static function typeToString($value)` - * This method is used for error messages, to convert the a value to a string representing its type. -* `protected static function strlen($value)` - * This method is used to calculate string length for relevant methods, using the `mb_strlen` if available and useful. -* `protected static function reportInvalidArgument($message)` - * This method is called when an assertion fails, with the specified error message. Here you can throw your own exception, or log something. - -## Static analysis support - -Where applicable, assertion functions are annotated to support Psalm's -[Assertion syntax](https://psalm.dev/docs/annotating_code/assertion_syntax/). -A dedicated [PHPStan Plugin](https://github.com/phpstan/phpstan-webmozart-assert) is -required for proper type support. - -Authors -------- - -* [Bernhard Schussek] a.k.a. [@webmozart] -* [The Community Contributors] - -Contribute ----------- - -Contributions to the package are always welcome! - -* Report any bugs or issues you find on the [issue tracker]. -* You can grab the source code at the package's [Git repository]. - -License -------- - -All contents of this package are licensed under the [MIT license]. - -[beberlei/assert]: https://github.com/beberlei/assert -[assert package]: https://github.com/beberlei/assert -[Composer]: https://getcomposer.org -[Bernhard Schussek]: https://webmozarts.com -[The Community Contributors]: https://github.com/webmozart/assert/graphs/contributors -[issue tracker]: https://github.com/webmozart/assert/issues -[Git repository]: https://github.com/webmozart/assert -[@webmozart]: https://twitter.com/webmozart -[MIT license]: LICENSE -[`Assert`]: src/Assert.php diff --git a/vendor/webmozart/assert/composer.json b/vendor/webmozart/assert/composer.json deleted file mode 100644 index cfae60e5..00000000 --- a/vendor/webmozart/assert/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "webmozart/assert", - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "license": "MIT", - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Webmozart\\Assert\\Tests\\": "tests/", - "Webmozart\\Assert\\Bin\\": "bin/src" - } - } -} diff --git a/vendor/webmozart/assert/psalm.xml b/vendor/webmozart/assert/psalm.xml deleted file mode 100644 index 9a430081..00000000 --- a/vendor/webmozart/assert/psalm.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/vendor/webmozart/assert/src/Assert.php b/vendor/webmozart/assert/src/Assert.php deleted file mode 100644 index e0fbabc8..00000000 --- a/vendor/webmozart/assert/src/Assert.php +++ /dev/null @@ -1,2066 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -use ArrayAccess; -use BadMethodCallException; -use Closure; -use Countable; -use DateTime; -use DateTimeImmutable; -use Exception; -use ResourceBundle; -use SimpleXMLElement; -use Throwable; -use Traversable; - -/** - * Efficient assertions to validate the input/output of your methods. - * - * @since 1.0 - * - * @author Bernhard Schussek - */ -class Assert -{ - use Mixin; - - /** - * @psalm-pure - * @psalm-assert string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function string($value, $message = '') - { - if (!\is_string($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a string. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function stringNotEmpty($value, $message = '') - { - static::string($value, $message); - static::notEq($value, '', $message); - } - - /** - * @psalm-pure - * @psalm-assert int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integer($value, $message = '') - { - if (!\is_int($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function integerish($value, $message = '') - { - if (!\is_numeric($value) || $value != (int) $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an integerish value. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function positiveInteger($value, $message = '') - { - if (!(\is_int($value) && $value > 0)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a positive integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert float $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function float($value, $message = '') - { - if (!\is_float($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a float. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert numeric $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function numeric($value, $message = '') - { - if (!\is_numeric($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a numeric. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0 $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function natural($value, $message = '') - { - if (!\is_int($value) || $value < 0) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-negative integer. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert bool $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function boolean($value, $message = '') - { - if (!\is_bool($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a boolean. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert scalar $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function scalar($value, $message = '') - { - if (!\is_scalar($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a scalar. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert object $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function object($value, $message = '') - { - if (!\is_object($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an object. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert resource $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function resource($value, $type = null, $message = '') - { - if (!\is_resource($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource. Got: %s', - static::typeToString($value) - )); - } - - if ($type && $type !== \get_resource_type($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a resource of type %2$s. Got: %s', - static::typeToString($value), - $type - )); - } - } - - /** - * @psalm-pure - * @psalm-assert callable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCallable($value, $message = '') - { - if (!\is_callable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a callable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArray($value, $message = '') - { - if (!\is_array($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isTraversable($value, $message = '') - { - @\trigger_error( - \sprintf( - 'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.', - __METHOD__ - ), - \E_USER_DEPRECATED - ); - - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a traversable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isArrayAccessible($value, $message = '') - { - if (!\is_array($value) && !($value instanceof ArrayAccess)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array accessible. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert countable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isCountable($value, $message = '') - { - if ( - !\is_array($value) - && !($value instanceof Countable) - && !($value instanceof ResourceBundle) - && !($value instanceof SimpleXMLElement) - ) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a countable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isIterable($value, $message = '') - { - if (!\is_array($value) && !($value instanceof Traversable)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an iterable. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOf($value, $class, $message = '') - { - if (!($value instanceof $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert !ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notInstanceOf($value, $class, $message = '') - { - if ($value instanceof $class) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance other than %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isInstanceOfAny($value, array $classes, $message = '') - { - foreach ($classes as $class) { - if ($value instanceof $class) { - return; - } - } - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an instance of any of %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) - )); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAOf($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (!\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * @psalm-assert !UnexpectedType $value - * @psalm-assert !class-string $value - * - * @param object|string $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNotA($value, $class, $message = '') - { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), - $class - )); - } - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isAnyOf($value, array $classes, $message = '') - { - foreach ($classes as $class) { - static::string($class, 'Expected class as a string. Got: %s'); - - if (\is_a($value, $class, \is_string($value))) { - return; - } - } - - static::reportInvalidArgument(sprintf( - $message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s', - static::typeToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $classes)) - )); - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isEmpty($value, $message = '') - { - if (!empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEmpty($value, $message = '') - { - if (empty($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-empty value. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function null($value, $message = '') - { - if (null !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected null. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notNull($value, $message = '') - { - if (null === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than null.' - ); - } - } - - /** - * @psalm-pure - * @psalm-assert true $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function true($value, $message = '') - { - if (true !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be true. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function false($value, $message = '') - { - if (false !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be false. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !false $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notFalse($value, $message = '') - { - if (false === $value) { - static::reportInvalidArgument( - $message ?: 'Expected a value other than false.' - ); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ip($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IP. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv4($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv4. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function ipv6($value, $message = '') - { - if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be an IPv6. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function email($value, $message = '') - { - if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to be a valid e-mail address. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * Does non strict comparisons on the items, so ['3', 3] will not pass the assertion. - * - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uniqueValues(array $values, $message = '') - { - $allValues = \count($values); - $uniqueValues = \count(\array_unique($values)); - - if ($allValues !== $uniqueValues) { - $difference = $allValues - $uniqueValues; - - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array of unique values, but %s of them %s duplicated', - $difference, - (1 === $difference ? 'is' : 'are') - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function eq($value, $expect, $message = '') - { - if ($expect != $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEq($value, $expect, $message = '') - { - if ($expect == $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a different value than %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function same($value, $expect, $message = '') - { - if ($expect !== $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value identical to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notSame($value, $expect, $message = '') - { - if ($expect === $value) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not identical to %s.', - static::valueToString($expect) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThan($value, $limit, $message = '') - { - if ($value <= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function greaterThanEq($value, $limit, $message = '') - { - if ($value < $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value greater than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThan($value, $limit, $message = '') - { - if ($value >= $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lessThanEq($value, $limit, $message = '') - { - if ($value > $limit) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value less than or equal to %2$s. Got: %s', - static::valueToString($value), - static::valueToString($limit) - )); - } - } - - /** - * Inclusive range, so Assert::(3, 3, 5) passes. - * - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function range($value, $min, $max, $message = '') - { - if ($value < $min || $value > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value between %2$s and %3$s. Got: %s', - static::valueToString($value), - static::valueToString($min), - static::valueToString($max) - )); - } - } - - /** - * A more human-readable alias of Assert::inArray(). - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function oneOf($value, array $values, $message = '') - { - static::inArray($value, $values, $message); - } - - /** - * Does strict comparison, so Assert::inArray(3, ['3']) does not pass the assertion. - * - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function inArray($value, array $values, $message = '') - { - if (!\in_array($value, $values, true)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected one of: %2$s. Got: %s', - static::valueToString($value), - \implode(', ', \array_map(array('static', 'valueToString'), $values)) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function contains($value, $subString, $message = '') - { - if (false === \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notContains($value, $subString, $message = '') - { - if (false !== \strpos($value, $subString)) { - static::reportInvalidArgument(\sprintf( - $message ?: '%2$s was not expected to be contained in a value. Got: %s', - static::valueToString($value), - static::valueToString($subString) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notWhitespaceOnly($value, $message = '') - { - if (\preg_match('/^\s*$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a non-whitespace string. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWith($value, $prefix, $message = '') - { - if (0 !== \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notStartsWith($value, $prefix, $message = '') - { - if (0 === \strpos($value, $prefix)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to start with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($prefix) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function startsWithLetter($value, $message = '') - { - static::string($value); - - $valid = isset($value[0]); - - if ($valid) { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = \ctype_alpha($value[0]); - \setlocale(LC_CTYPE, $locale); - } - - if (!$valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to start with a letter. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function endsWith($value, $suffix, $message = '') - { - if ($suffix !== \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notEndsWith($value, $suffix, $message = '') - { - if ($suffix === \substr($value, -\strlen($suffix))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value not to end with %2$s. Got: %s', - static::valueToString($value), - static::valueToString($suffix) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function regex($value, $pattern, $message = '') - { - if (!\preg_match($pattern, $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s does not match the expected pattern.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function notRegex($value, $pattern, $message = '') - { - if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The value %s matches the pattern %s (at offset %d).', - static::valueToString($value), - static::valueToString($pattern), - $matches[0][1] - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function unicodeLetters($value, $message = '') - { - static::string($value); - - if (!\preg_match('/^\p{L}+$/u', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only Unicode letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alpha($value, $message = '') - { - static::string($value); - - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alpha($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain only letters. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function digits($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_digit($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function alnum($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_alnum($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain letters and digits only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lower($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_lower($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain lowercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-assert !lowercase-string $value - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function upper($value, $message = '') - { - $locale = \setlocale(LC_CTYPE, 0); - \setlocale(LC_CTYPE, 'C'); - $valid = !\ctype_upper($value); - \setlocale(LC_CTYPE, $locale); - - if ($valid) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain uppercase characters only. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * - * @param string $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function length($value, $length, $message = '') - { - if ($length !== static::strlen($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain %2$s characters. Got: %s', - static::valueToString($value), - $length - )); - } - } - - /** - * Inclusive min. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minLength($value, $min, $message = '') - { - if (static::strlen($value) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at least %2$s characters. Got: %s', - static::valueToString($value), - $min - )); - } - } - - /** - * Inclusive max. - * - * @psalm-pure - * - * @param string $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxLength($value, $max, $message = '') - { - if (static::strlen($value) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain at most %2$s characters. Got: %s', - static::valueToString($value), - $max - )); - } - } - - /** - * Inclusive , so Assert::lengthBetween('asd', 3, 5); passes the assertion. - * - * @psalm-pure - * - * @param string $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function lengthBetween($value, $min, $max, $message = '') - { - $length = static::strlen($value); - - if ($length < $min || $length > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s', - static::valueToString($value), - $min, - $max - )); - } - } - - /** - * Will also pass if $value is a directory, use Assert::file() instead if you need to be sure it is a file. - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function fileExists($value, $message = '') - { - static::string($value); - - if (!\file_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The file %s does not exist.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function file($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_file($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not a file.', - static::valueToString($value) - )); - } - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function directory($value, $message = '') - { - static::fileExists($value, $message); - - if (!\is_dir($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is no directory.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function readable($value, $message = '') - { - if (!\is_readable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not readable.', - static::valueToString($value) - )); - } - } - - /** - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function writable($value, $message = '') - { - if (!\is_writable($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'The path %s is not writable.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function classExists($value, $message = '') - { - if (!\class_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing class name. Got: %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function subclassOf($value, $class, $message = '') - { - if (!\is_subclass_of($value, $class)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected a sub-class of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($class) - )); - } - } - - /** - * @psalm-assert class-string $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function interfaceExists($value, $message = '') - { - if (!\interface_exists($value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an existing interface name. got %s', - static::valueToString($value) - )); - } - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function implementsInterface($value, $interface, $message = '') - { - if (!\in_array($interface, \class_implements($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an implementation of %2$s. Got: %s', - static::valueToString($value), - static::valueToString($interface) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyExists($classOrObject, $property, $message = '') - { - if (!\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function propertyNotExists($classOrObject, $property, $message = '') - { - if (\property_exists($classOrObject, $property)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the property %s to not exist.', - static::valueToString($property) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodExists($classOrObject, $method, $message = '') - { - if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * @psalm-param class-string|object $classOrObject - * - * @param string|object $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function methodNotExists($classOrObject, $method, $message = '') - { - if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the method %s to not exist.', - static::valueToString($method) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyExists($array, $key, $message = '') - { - if (!(isset($array[$key]) || \array_key_exists($key, $array))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to exist.', - static::valueToString($key) - )); - } - } - - /** - * @psalm-pure - * - * @param array $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function keyNotExists($array, $key, $message = '') - { - if (isset($array[$key]) || \array_key_exists($key, $array)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected the key %s to not exist.', - static::valueToString($key) - )); - } - } - - /** - * Checks if a value is a valid array key (int or string). - * - * @psalm-pure - * @psalm-assert array-key $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function validArrayKey($value, $message = '') - { - if (!(\is_int($value) || \is_string($value))) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected string or integer. Got: %s', - static::typeToString($value) - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function count($array, $number, $message = '') - { - static::eq( - \count($array), - $number, - \sprintf( - $message ?: 'Expected an array to contain %d elements. Got: %d.', - $number, - \count($array) - ) - ); - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function minCount($array, $min, $message = '') - { - if (\count($array) < $min) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at least %2$d elements. Got: %d', - \count($array), - $min - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function maxCount($array, $max, $message = '') - { - if (\count($array) > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain at most %2$d elements. Got: %d', - \count($array), - $max - )); - } - } - - /** - * Does not check if $array is countable, this can generate a warning on php versions after 7.2. - * - * @param Countable|array $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function countBetween($array, $min, $max, $message = '') - { - $count = \count($array); - - if ($count < $min || $count > $max) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Expected an array to contain between %2$d and %3$d elements. Got: %d', - $count, - $min, - $max - )); - } - } - - /** - * @psalm-pure - * @psalm-assert list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isList($array, $message = '') - { - if (!\is_array($array) || $array !== \array_values($array)) { - static::reportInvalidArgument( - $message ?: 'Expected list - non-associative array.' - ); - } - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyList($array, $message = '') - { - static::isList($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isMap($array, $message = '') - { - if ( - !\is_array($array) || - \array_keys($array) !== \array_filter(\array_keys($array), '\is_string') - ) { - static::reportInvalidArgument( - $message ?: 'Expected map - associative array with string keys.' - ); - } - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array $array - * @psalm-assert array $array - * @psalm-assert !empty $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function isNonEmptyMap($array, $message = '') - { - static::isMap($array, $message); - static::notEmpty($array, $message); - } - - /** - * @psalm-pure - * - * @param string $value - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function uuid($value, $message = '') - { - $value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value); - - // The nil UUID is special form of UUID that is specified to have all - // 128 bits set to zero. - if ('00000000-0000-0000-0000-000000000000' === $value) { - return; - } - - if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) { - static::reportInvalidArgument(\sprintf( - $message ?: 'Value %s is not a valid UUID.', - static::valueToString($value) - )); - } - } - - /** - * @psalm-param class-string $class - * - * @param Closure $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - */ - public static function throws(Closure $expression, $class = 'Exception', $message = '') - { - static::string($class); - - $actual = 'none'; - - try { - $expression(); - } catch (Exception $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } catch (Throwable $e) { - $actual = \get_class($e); - if ($e instanceof $class) { - return; - } - } - - static::reportInvalidArgument($message ?: \sprintf( - 'Expected to throw "%s", got "%s"', - $class, - $actual - )); - } - - /** - * @throws BadMethodCallException - */ - public static function __callStatic($name, $arguments) - { - if ('nullOr' === \substr($name, 0, 6)) { - if (null !== $arguments[0]) { - $method = \lcfirst(\substr($name, 6)); - \call_user_func_array(array('static', $method), $arguments); - } - - return; - } - - if ('all' === \substr($name, 0, 3)) { - static::isIterable($arguments[0]); - - $method = \lcfirst(\substr($name, 3)); - $args = $arguments; - - foreach ($arguments[0] as $entry) { - $args[0] = $entry; - - \call_user_func_array(array('static', $method), $args); - } - - return; - } - - throw new BadMethodCallException('No such method: '.$name); - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function valueToString($value) - { - if (null === $value) { - return 'null'; - } - - if (true === $value) { - return 'true'; - } - - if (false === $value) { - return 'false'; - } - - if (\is_array($value)) { - return 'array'; - } - - if (\is_object($value)) { - if (\method_exists($value, '__toString')) { - return \get_class($value).': '.self::valueToString($value->__toString()); - } - - if ($value instanceof DateTime || $value instanceof DateTimeImmutable) { - return \get_class($value).': '.self::valueToString($value->format('c')); - } - - return \get_class($value); - } - - if (\is_resource($value)) { - return 'resource'; - } - - if (\is_string($value)) { - return '"'.$value.'"'; - } - - return (string) $value; - } - - /** - * @param mixed $value - * - * @return string - */ - protected static function typeToString($value) - { - return \is_object($value) ? \get_class($value) : \gettype($value); - } - - protected static function strlen($value) - { - if (!\function_exists('mb_detect_encoding')) { - return \strlen($value); - } - - if (false === $encoding = \mb_detect_encoding($value)) { - return \strlen($value); - } - - return \mb_strlen($value, $encoding); - } - - /** - * @param string $message - * - * @throws InvalidArgumentException - * - * @psalm-pure this method is not supposed to perform side-effects - */ - protected static function reportInvalidArgument($message) - { - throw new InvalidArgumentException($message); - } - - private function __construct() - { - } -} diff --git a/vendor/webmozart/assert/src/InvalidArgumentException.php b/vendor/webmozart/assert/src/InvalidArgumentException.php deleted file mode 100644 index 9d95a58c..00000000 --- a/vendor/webmozart/assert/src/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Webmozart\Assert; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/vendor/webmozart/assert/src/Mixin.php b/vendor/webmozart/assert/src/Mixin.php deleted file mode 100644 index 5e98823d..00000000 --- a/vendor/webmozart/assert/src/Mixin.php +++ /dev/null @@ -1,2916 +0,0 @@ - $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allString($value, $message = '') - { - static::__callStatic('allString', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert non-empty-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStringNotEmpty($value, $message = '') - { - static::__callStatic('nullOrStringNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStringNotEmpty($value, $message = '') - { - static::__callStatic('allStringNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInteger($value, $message = '') - { - static::__callStatic('nullOrInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInteger($value, $message = '') - { - static::__callStatic('allInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIntegerish($value, $message = '') - { - static::__callStatic('nullOrIntegerish', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIntegerish($value, $message = '') - { - static::__callStatic('allIntegerish', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert positive-int|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPositiveInteger($value, $message = '') - { - static::__callStatic('nullOrPositiveInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPositiveInteger($value, $message = '') - { - static::__callStatic('allPositiveInteger', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert float|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFloat($value, $message = '') - { - static::__callStatic('nullOrFloat', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFloat($value, $message = '') - { - static::__callStatic('allFloat', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert numeric|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNumeric($value, $message = '') - { - static::__callStatic('nullOrNumeric', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNumeric($value, $message = '') - { - static::__callStatic('allNumeric', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert positive-int|0|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNatural($value, $message = '') - { - static::__callStatic('nullOrNatural', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNatural($value, $message = '') - { - static::__callStatic('allNatural', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert bool|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrBoolean($value, $message = '') - { - static::__callStatic('nullOrBoolean', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allBoolean($value, $message = '') - { - static::__callStatic('allBoolean', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert scalar|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrScalar($value, $message = '') - { - static::__callStatic('nullOrScalar', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allScalar($value, $message = '') - { - static::__callStatic('allScalar', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert object|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrObject($value, $message = '') - { - static::__callStatic('nullOrObject', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allObject($value, $message = '') - { - static::__callStatic('allObject', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert resource|null $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrResource($value, $type = null, $message = '') - { - static::__callStatic('nullOrResource', array($value, $type, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|null $type type of resource this should be. @see https://www.php.net/manual/en/function.get-resource-type.php - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allResource($value, $type = null, $message = '') - { - static::__callStatic('allResource', array($value, $type, $message)); - } - - /** - * @psalm-pure - * @psalm-assert callable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCallable($value, $message = '') - { - static::__callStatic('nullOrIsCallable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCallable($value, $message = '') - { - static::__callStatic('allIsCallable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArray($value, $message = '') - { - static::__callStatic('nullOrIsArray', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArray($value, $message = '') - { - static::__callStatic('allIsArray', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsTraversable($value, $message = '') - { - static::__callStatic('nullOrIsTraversable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @deprecated use "isIterable" or "isInstanceOf" instead - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsTraversable($value, $message = '') - { - static::__callStatic('allIsTraversable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array|ArrayAccess|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsArrayAccessible($value, $message = '') - { - static::__callStatic('nullOrIsArrayAccessible', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsArrayAccessible($value, $message = '') - { - static::__callStatic('allIsArrayAccessible', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert countable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsCountable($value, $message = '') - { - static::__callStatic('nullOrIsCountable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsCountable($value, $message = '') - { - static::__callStatic('allIsCountable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsIterable($value, $message = '') - { - static::__callStatic('nullOrIsIterable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsIterable($value, $message = '') - { - static::__callStatic('allIsIterable', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOf($value, $class, $message = '') - { - static::__callStatic('nullOrIsInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOf($value, $class, $message = '') - { - static::__callStatic('allIsInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotInstanceOf($value, $class, $message = '') - { - static::__callStatic('nullOrNotInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotInstanceOf($value, $class, $message = '') - { - static::__callStatic('allNotInstanceOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsInstanceOfAny($value, $classes, $message = '') - { - static::__callStatic('nullOrIsInstanceOfAny', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param mixed $value - * @param array $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsInstanceOfAny($value, $classes, $message = '') - { - static::__callStatic('allIsInstanceOfAny', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert ExpectedType|class-string|null $value - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAOf($value, $class, $message = '') - { - static::__callStatic('nullOrIsAOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable> $value - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAOf($value, $class, $message = '') - { - static::__callStatic('allIsAOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param object|string|null $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNotA($value, $class, $message = '') - { - static::__callStatic('nullOrIsNotA', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template UnexpectedType of object - * @psalm-param class-string $class - * - * @param iterable $value - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNotA($value, $class, $message = '') - { - static::__callStatic('allIsNotA', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param object|string|null $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsAnyOf($value, $classes, $message = '') - { - static::__callStatic('nullOrIsAnyOf', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-param array $classes - * - * @param iterable $value - * @param string[] $classes - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsAnyOf($value, $classes, $message = '') - { - static::__callStatic('allIsAnyOf', array($value, $classes, $message)); - } - - /** - * @psalm-pure - * @psalm-assert empty $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsEmpty($value, $message = '') - { - static::__callStatic('nullOrIsEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsEmpty($value, $message = '') - { - static::__callStatic('allIsEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEmpty($value, $message = '') - { - static::__callStatic('nullOrNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEmpty($value, $message = '') - { - static::__callStatic('allNotEmpty', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNull($value, $message = '') - { - static::__callStatic('allNull', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotNull($value, $message = '') - { - static::__callStatic('allNotNull', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert true|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrTrue($value, $message = '') - { - static::__callStatic('nullOrTrue', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allTrue($value, $message = '') - { - static::__callStatic('allTrue', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert false|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFalse($value, $message = '') - { - static::__callStatic('nullOrFalse', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFalse($value, $message = '') - { - static::__callStatic('allFalse', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotFalse($value, $message = '') - { - static::__callStatic('nullOrNotFalse', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotFalse($value, $message = '') - { - static::__callStatic('allNotFalse', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIp($value, $message = '') - { - static::__callStatic('nullOrIp', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIp($value, $message = '') - { - static::__callStatic('allIp', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv4($value, $message = '') - { - static::__callStatic('nullOrIpv4', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv4($value, $message = '') - { - static::__callStatic('allIpv4', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIpv6($value, $message = '') - { - static::__callStatic('nullOrIpv6', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIpv6($value, $message = '') - { - static::__callStatic('allIpv6', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEmail($value, $message = '') - { - static::__callStatic('nullOrEmail', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEmail($value, $message = '') - { - static::__callStatic('allEmail', array($value, $message)); - } - - /** - * @param array|null $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUniqueValues($values, $message = '') - { - static::__callStatic('nullOrUniqueValues', array($values, $message)); - } - - /** - * @param iterable $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUniqueValues($values, $message = '') - { - static::__callStatic('allUniqueValues', array($values, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEq($value, $expect, $message = '') - { - static::__callStatic('nullOrEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEq($value, $expect, $message = '') - { - static::__callStatic('allEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEq($value, $expect, $message = '') - { - static::__callStatic('nullOrNotEq', array($value, $expect, $message)); - } - - /** - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEq($value, $expect, $message = '') - { - static::__callStatic('allNotEq', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSame($value, $expect, $message = '') - { - static::__callStatic('nullOrSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSame($value, $expect, $message = '') - { - static::__callStatic('allSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotSame($value, $expect, $message = '') - { - static::__callStatic('nullOrNotSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $expect - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotSame($value, $expect, $message = '') - { - static::__callStatic('allNotSame', array($value, $expect, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThan($value, $limit, $message = '') - { - static::__callStatic('nullOrGreaterThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThan($value, $limit, $message = '') - { - static::__callStatic('allGreaterThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrGreaterThanEq($value, $limit, $message = '') - { - static::__callStatic('nullOrGreaterThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allGreaterThanEq($value, $limit, $message = '') - { - static::__callStatic('allGreaterThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThan($value, $limit, $message = '') - { - static::__callStatic('nullOrLessThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThan($value, $limit, $message = '') - { - static::__callStatic('allLessThan', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLessThanEq($value, $limit, $message = '') - { - static::__callStatic('nullOrLessThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $limit - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLessThanEq($value, $limit, $message = '') - { - static::__callStatic('allLessThanEq', array($value, $limit, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRange($value, $min, $max, $message = '') - { - static::__callStatic('nullOrRange', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param mixed $min - * @param mixed $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRange($value, $min, $max, $message = '') - { - static::__callStatic('allRange', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrOneOf($value, $values, $message = '') - { - static::__callStatic('nullOrOneOf', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allOneOf($value, $values, $message = '') - { - static::__callStatic('allOneOf', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInArray($value, $values, $message = '') - { - static::__callStatic('nullOrInArray', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param array $values - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInArray($value, $values, $message = '') - { - static::__callStatic('allInArray', array($value, $values, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrContains($value, $subString, $message = '') - { - static::__callStatic('nullOrContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allContains($value, $subString, $message = '') - { - static::__callStatic('allContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotContains($value, $subString, $message = '') - { - static::__callStatic('nullOrNotContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $subString - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotContains($value, $subString, $message = '') - { - static::__callStatic('allNotContains', array($value, $subString, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotWhitespaceOnly($value, $message = '') - { - static::__callStatic('nullOrNotWhitespaceOnly', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotWhitespaceOnly($value, $message = '') - { - static::__callStatic('allNotWhitespaceOnly', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWith($value, $prefix, $message = '') - { - static::__callStatic('nullOrStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWith($value, $prefix, $message = '') - { - static::__callStatic('allStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotStartsWith($value, $prefix, $message = '') - { - static::__callStatic('nullOrNotStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $prefix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotStartsWith($value, $prefix, $message = '') - { - static::__callStatic('allNotStartsWith', array($value, $prefix, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrStartsWithLetter($value, $message = '') - { - static::__callStatic('nullOrStartsWithLetter', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allStartsWithLetter($value, $message = '') - { - static::__callStatic('allStartsWithLetter', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrEndsWith($value, $suffix, $message = '') - { - static::__callStatic('nullOrEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allEndsWith($value, $suffix, $message = '') - { - static::__callStatic('allEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotEndsWith($value, $suffix, $message = '') - { - static::__callStatic('nullOrNotEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $suffix - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotEndsWith($value, $suffix, $message = '') - { - static::__callStatic('allNotEndsWith', array($value, $suffix, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrRegex($value, $pattern, $message = '') - { - static::__callStatic('nullOrRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allRegex($value, $pattern, $message = '') - { - static::__callStatic('allRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrNotRegex($value, $pattern, $message = '') - { - static::__callStatic('nullOrNotRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $pattern - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allNotRegex($value, $pattern, $message = '') - { - static::__callStatic('allNotRegex', array($value, $pattern, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUnicodeLetters($value, $message = '') - { - static::__callStatic('nullOrUnicodeLetters', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUnicodeLetters($value, $message = '') - { - static::__callStatic('allUnicodeLetters', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlpha($value, $message = '') - { - static::__callStatic('nullOrAlpha', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlpha($value, $message = '') - { - static::__callStatic('allAlpha', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDigits($value, $message = '') - { - static::__callStatic('nullOrDigits', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDigits($value, $message = '') - { - static::__callStatic('allDigits', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrAlnum($value, $message = '') - { - static::__callStatic('nullOrAlnum', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allAlnum($value, $message = '') - { - static::__callStatic('allAlnum', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert lowercase-string|null $value - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLower($value, $message = '') - { - static::__callStatic('nullOrLower', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLower($value, $message = '') - { - static::__callStatic('allLower', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUpper($value, $message = '') - { - static::__callStatic('nullOrUpper', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUpper($value, $message = '') - { - static::__callStatic('allUpper', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLength($value, $length, $message = '') - { - static::__callStatic('nullOrLength', array($value, $length, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int $length - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLength($value, $length, $message = '') - { - static::__callStatic('allLength', array($value, $length, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinLength($value, $min, $message = '') - { - static::__callStatic('nullOrMinLength', array($value, $min, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinLength($value, $min, $message = '') - { - static::__callStatic('allMinLength', array($value, $min, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxLength($value, $max, $message = '') - { - static::__callStatic('nullOrMaxLength', array($value, $max, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxLength($value, $max, $message = '') - { - static::__callStatic('allMaxLength', array($value, $max, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrLengthBetween($value, $min, $max, $message = '') - { - static::__callStatic('nullOrLengthBetween', array($value, $min, $max, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allLengthBetween($value, $min, $max, $message = '') - { - static::__callStatic('allLengthBetween', array($value, $min, $max, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFileExists($value, $message = '') - { - static::__callStatic('nullOrFileExists', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFileExists($value, $message = '') - { - static::__callStatic('allFileExists', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrFile($value, $message = '') - { - static::__callStatic('nullOrFile', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allFile($value, $message = '') - { - static::__callStatic('allFile', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrDirectory($value, $message = '') - { - static::__callStatic('nullOrDirectory', array($value, $message)); - } - - /** - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allDirectory($value, $message = '') - { - static::__callStatic('allDirectory', array($value, $message)); - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrReadable($value, $message = '') - { - static::__callStatic('nullOrReadable', array($value, $message)); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allReadable($value, $message = '') - { - static::__callStatic('allReadable', array($value, $message)); - } - - /** - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrWritable($value, $message = '') - { - static::__callStatic('nullOrWritable', array($value, $message)); - } - - /** - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allWritable($value, $message = '') - { - static::__callStatic('allWritable', array($value, $message)); - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrClassExists($value, $message = '') - { - static::__callStatic('nullOrClassExists', array($value, $message)); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allClassExists($value, $message = '') - { - static::__callStatic('allClassExists', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert class-string|ExpectedType|null $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrSubclassOf($value, $class, $message = '') - { - static::__callStatic('nullOrSubclassOf', array($value, $class, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $class - * @psalm-assert iterable|ExpectedType> $value - * - * @param mixed $value - * @param string|object $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allSubclassOf($value, $class, $message = '') - { - static::__callStatic('allSubclassOf', array($value, $class, $message)); - } - - /** - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrInterfaceExists($value, $message = '') - { - static::__callStatic('nullOrInterfaceExists', array($value, $message)); - } - - /** - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allInterfaceExists($value, $message = '') - { - static::__callStatic('allInterfaceExists', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert class-string|null $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrImplementsInterface($value, $interface, $message = '') - { - static::__callStatic('nullOrImplementsInterface', array($value, $interface, $message)); - } - - /** - * @psalm-pure - * @psalm-template ExpectedType of object - * @psalm-param class-string $interface - * @psalm-assert iterable> $value - * - * @param mixed $value - * @param mixed $interface - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allImplementsInterface($value, $interface, $message = '') - { - static::__callStatic('allImplementsInterface', array($value, $interface, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyExists($classOrObject, $property, $message = '') - { - static::__callStatic('nullOrPropertyExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyExists($classOrObject, $property, $message = '') - { - static::__callStatic('allPropertyExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrPropertyNotExists($classOrObject, $property, $message = '') - { - static::__callStatic('nullOrPropertyNotExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $property - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allPropertyNotExists($classOrObject, $property, $message = '') - { - static::__callStatic('allPropertyNotExists', array($classOrObject, $property, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodExists($classOrObject, $method, $message = '') - { - static::__callStatic('nullOrMethodExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodExists($classOrObject, $method, $message = '') - { - static::__callStatic('allMethodExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param class-string|object|null $classOrObject - * - * @param string|object|null $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMethodNotExists($classOrObject, $method, $message = '') - { - static::__callStatic('nullOrMethodNotExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * @psalm-param iterable $classOrObject - * - * @param iterable $classOrObject - * @param mixed $method - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMethodNotExists($classOrObject, $method, $message = '') - { - static::__callStatic('allMethodNotExists', array($classOrObject, $method, $message)); - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyExists($array, $key, $message = '') - { - static::__callStatic('nullOrKeyExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyExists($array, $key, $message = '') - { - static::__callStatic('allKeyExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param array|null $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrKeyNotExists($array, $key, $message = '') - { - static::__callStatic('nullOrKeyNotExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $array - * @param string|int $key - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allKeyNotExists($array, $key, $message = '') - { - static::__callStatic('allKeyNotExists', array($array, $key, $message)); - } - - /** - * @psalm-pure - * @psalm-assert array-key|null $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrValidArrayKey($value, $message = '') - { - static::__callStatic('nullOrValidArrayKey', array($value, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $value - * - * @param mixed $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allValidArrayKey($value, $message = '') - { - static::__callStatic('allValidArrayKey', array($value, $message)); - } - - /** - * @param Countable|array|null $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCount($array, $number, $message = '') - { - static::__callStatic('nullOrCount', array($array, $number, $message)); - } - - /** - * @param iterable $array - * @param int $number - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCount($array, $number, $message = '') - { - static::__callStatic('allCount', array($array, $number, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMinCount($array, $min, $message = '') - { - static::__callStatic('nullOrMinCount', array($array, $min, $message)); - } - - /** - * @param iterable $array - * @param int|float $min - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMinCount($array, $min, $message = '') - { - static::__callStatic('allMinCount', array($array, $min, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrMaxCount($array, $max, $message = '') - { - static::__callStatic('nullOrMaxCount', array($array, $max, $message)); - } - - /** - * @param iterable $array - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allMaxCount($array, $max, $message = '') - { - static::__callStatic('allMaxCount', array($array, $max, $message)); - } - - /** - * @param Countable|array|null $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrCountBetween($array, $min, $max, $message = '') - { - static::__callStatic('nullOrCountBetween', array($array, $min, $max, $message)); - } - - /** - * @param iterable $array - * @param int|float $min - * @param int|float $max - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allCountBetween($array, $min, $max, $message = '') - { - static::__callStatic('allCountBetween', array($array, $min, $max, $message)); - } - - /** - * @psalm-pure - * @psalm-assert list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsList($array, $message = '') - { - static::__callStatic('nullOrIsList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsList($array, $message = '') - { - static::__callStatic('allIsList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert non-empty-list|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyList($array, $message = '') - { - static::__callStatic('nullOrIsNonEmptyList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-assert iterable $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyList($array, $message = '') - { - static::__callStatic('allIsNonEmptyList', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * @psalm-assert array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsMap($array, $message = '') - { - static::__callStatic('nullOrIsMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * @psalm-assert iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsMap($array, $message = '') - { - static::__callStatic('allIsMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param mixed|array|null $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrIsNonEmptyMap($array, $message = '') - { - static::__callStatic('nullOrIsNonEmptyMap', array($array, $message)); - } - - /** - * @psalm-pure - * @psalm-template T - * @psalm-param iterable> $array - * - * @param mixed $array - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allIsNonEmptyMap($array, $message = '') - { - static::__callStatic('allIsNonEmptyMap', array($array, $message)); - } - - /** - * @psalm-pure - * - * @param string|null $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrUuid($value, $message = '') - { - static::__callStatic('nullOrUuid', array($value, $message)); - } - - /** - * @psalm-pure - * - * @param iterable $value - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allUuid($value, $message = '') - { - static::__callStatic('allUuid', array($value, $message)); - } - - /** - * @psalm-param class-string $class - * - * @param Closure|null $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function nullOrThrows($expression, $class = 'Exception', $message = '') - { - static::__callStatic('nullOrThrows', array($expression, $class, $message)); - } - - /** - * @psalm-param class-string $class - * - * @param iterable $expression - * @param string $class - * @param string $message - * - * @throws InvalidArgumentException - * - * @return void - */ - public static function allThrows($expression, $class = 'Exception', $message = '') - { - static::__callStatic('allThrows', array($expression, $class, $message)); - } -}